80 lines
2.6 KiB
Ruby
80 lines
2.6 KiB
Ruby
class ImagemagickAT6 < Formula
|
|
desc "Tools and libraries to manipulate images in many formats"
|
|
homepage "https://legacy.imagemagick.org/"
|
|
url "https://www.imagemagick.org/download/releases/ImageMagick-6.9.12-33.tar.xz"
|
|
sha256 "2f0ece95b46c8137366b8d46af52dcb103c9e345a2698bdfb299a542c42e9dac"
|
|
license "ImageMagick"
|
|
head "https://github.com/imagemagick/imagemagick6.git", branch: "main"
|
|
|
|
livecheck do
|
|
url "https://download.imagemagick.org/ImageMagick/download/"
|
|
regex(/href=.*?ImageMagick[._-]v?(6(?:\.\d+)+(?:-\d+)?)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "1072c10e299a1912522e61b05e32f50749d7c979947926cd64ce8bbcbd9e0eed"
|
|
sha256 arm64_big_sur: "25c8cb2d8959c5b8db2f6c69109896ef2fc0db74748b925748fef0556a2cd92d"
|
|
sha256 monterey: "fbd565ccc52b70c354d2a46281e3fa183b4898afae8463490fd66a3e5facd82d"
|
|
sha256 big_sur: "6182b24598d8ff795cfd59e0a24b2803ee823be4844c4d1595bb8dfa08a9c9a7"
|
|
sha256 catalina: "cb7f9c04286f0616e52469b1d2855ac943d55d3a32827b097cdc40653a137b16"
|
|
sha256 x86_64_linux: "13b65f079ca94edb7299a4516b62892cc4401be3e68e9caabbb364a68eb656c6"
|
|
end
|
|
|
|
keg_only :versioned_formula
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "freetype"
|
|
depends_on "ghostscript"
|
|
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
|
|
# Avoid references to shim
|
|
inreplace Dir["**/*-config.in"], "@PKG_CONFIG@", Formula["pkg-config"].opt_bin/"pkg-config"
|
|
|
|
args = %W[
|
|
--enable-osx-universal-binary=no
|
|
--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
|
|
--with-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_BASE_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
|