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-41.tar.xz"
|
|
sha256 "53e7de745bd22dbaea1b22317775fde3f5ceb81dc87689767514135213fc450a"
|
|
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: "9a9bdfdf8106efa2b58230c2d51ba45b1292d0ed8d4672fea3b062c405f97d13"
|
|
sha256 arm64_big_sur: "909471902dccc9dda3ea5757206f18246b25f6f76fa1360d8aa9d01a5b86c570"
|
|
sha256 monterey: "d0e2bf2db91f8fd7aec670de91ecbad26a85e15d1a4a2e2b2ba75fd033c87acb"
|
|
sha256 big_sur: "1610ec522ea6fe1752fc61924521bb2bb64297559a2670129a9d9cb170e7c79d"
|
|
sha256 catalina: "952db9675710a09d7b369ac96f86e4d45aec4c5ad3c8a1d8c15f4eaefb56751e"
|
|
sha256 x86_64_linux: "4184d981a723566659a564b243b894f9da2981f7cb7e24c22ab8927ac02fe097"
|
|
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
|