homebrew-core/Formula/imagemagick.rb
2020-01-04 13:14:26 +01:00

74 lines
2.3 KiB
Ruby

class Imagemagick < Formula
desc "Tools and libraries to manipulate images in many formats"
homepage "https://www.imagemagick.org/"
url "https://dl.bintray.com/homebrew/mirror/ImageMagick-7.0.9-13.tar.xz"
mirror "https://www.imagemagick.org/download/releases/ImageMagick-7.0.9-13.tar.xz"
sha256 "c595da7bc601b289a4600cddd962bc666fcbf4bc8fc3c39c80f5c6764002668f"
head "https://github.com/ImageMagick/ImageMagick.git"
bottle do
sha256 "cf80ef87c23c1053f6e45c32c25b09a064e2bcf5f28b1ac14c19b6763de82322" => :catalina
sha256 "27b089c5d4fc3a30d3c034952df5f22149a832d0b5f9a6060005cc17679149f0" => :mojave
sha256 "17b627181c12989ed5686eb2bab115360b15a6342cb4f57eadd96908541b85b9" => :high_sierra
end
depends_on "pkg-config" => :build
depends_on "freetype"
depends_on "jpeg"
depends_on "libheif"
depends_on "libomp"
depends_on "libpng"
depends_on "libtiff"
depends_on "libtool"
depends_on "little-cms2"
depends_on "openexr"
depends_on "openjpeg"
depends_on "webp"
depends_on "xz"
uses_from_macos "bzip2"
uses_from_macos "libxml2"
skip_clean :la
def install
args = %W[
--disable-osx-universal-binary
--prefix=#{prefix}
--disable-dependency-tracking
--disable-silent-rules
--disable-opencl
--enable-shared
--enable-static
--with-freetype=yes
--with-modules
--with-openjp2
--with-openexr
--with-webp=yes
--with-heic=yes
--without-gslib
--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts
--without-fftw
--without-pango
--without-x
--without-wmf
--enable-openmp
ac_cv_prog_c_openmp=-Xpreprocessor\ -fopenmp
ac_cv_prog_cxx_openmp=-Xpreprocessor\ -fopenmp
LDFLAGS=-lomp
]
# versioned stuff in main tree is pointless for us
inreplace "configure", "${PACKAGE_NAME}-${PACKAGE_VERSION}", "${PACKAGE_NAME}"
system "./configure", *args
system "make", "install"
end
test do
assert_match "PNG", shell_output("#{bin}/identify #{test_fixtures("test.png")}")
# Check support for recommended features and delegates.
features = shell_output("#{bin}/convert -version")
%w[Modules freetype jpeg png tiff].each do |feature|
assert_match feature, features
end
end
end