class ImagemagickAT6 < Formula desc "Tools and libraries to manipulate images in many formats" homepage "https://www.imagemagick.org/" # Please always keep the Homebrew mirror as the primary URL as the # ImageMagick site removes tarballs regularly which means we get issues # unnecessarily and older versions of the formula are broken. url "https://dl.bintray.com/homebrew/mirror/imagemagick%406-6.9.10-73.tar.xz" mirror "https://www.imagemagick.org/download/ImageMagick-6.9.10-73.tar.xz" sha256 "cbcce069b493db60b819612fdd3fff53951f7ec01d739e01024dd9eb87960d54" head "https://github.com/imagemagick/imagemagick6.git" bottle do sha256 "6f446f0ab6da64ac38023e89c2a6db2158e0d1195d7213f3ff6410c60c29b7ff" => :catalina sha256 "df6dab3cd3768765224b249917a7562e52c8d8df9938808bdb322376c14bbc8a" => :mojave sha256 "96a6e45fbdc8d2e09dc6b9163dbace75d0a28e5b2a9ea74be89b66c2017addfc" => :high_sierra end keg_only :versioned_formula depends_on "pkg-config" => :build depends_on "freetype" depends_on "jpeg" depends_on "libpng" depends_on "libtiff" depends_on "libtool" depends_on "little-cms2" depends_on "openjpeg" depends_on "webp" depends_on "xz" skip_clean :la def install args = %W[ --disable-osx-universal-binary --prefix=#{prefix} --disable-dependency-tracking --disable-silent-rules --disable-opencl --disable-openmp --enable-shared --enable-static --with-freetype=yes --with-modules --with-webp=yes --with-openjp2 --without-gslib --with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts --without-fftw --without-pango --without-x --without-wmf ] # 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