homebrew-core/Formula/imagemagick.rb
2019-11-14 12:26:53 +01:00

74 lines
2.2 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-3.tar.xz"
mirror "https://www.imagemagick.org/download/ImageMagick-7.0.9-3.tar.xz"
sha256 "b110d49fd92d30294bc3e84f90a75479a765c40bb78fae3f9e83733a4f89d719"
head "https://github.com/ImageMagick/ImageMagick.git"
bottle do
sha256 "7e262d735c94196b6d11c7d740f15add0f4a4498ec444b5dd8202623ccdf9d58" => :catalina
sha256 "ccca19c76a216e937843b4eb50732b44b58cb2be46ad68ea8f1d04fd98500542" => :mojave
sha256 "9af5867b07799c2966516e6231c05a3d4d204128397a6c2a23ec85bb074ead9a" => :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