11class Imagemagick < Formula
2- desc "Tools and libraries to manipulate images in many formats"
2+ desc "Tools and libraries to manipulate images in select formats"
33 homepage "https://imagemagick.org/index.php"
44 url "https://imagemagick.org/archive/releases/ImageMagick-7.1.2-12.tar.xz"
55 sha256 "e22c5dc6cd3f8e708a2809483fd10f8e37438ef7831ec8d3a07951ccd70eceba"
66 license "ImageMagick"
7- revision 1
7+ revision 2
88 head "https://github.com/ImageMagick/ImageMagick.git" , branch : "main"
99
1010 livecheck do
@@ -13,32 +13,28 @@ class Imagemagick < Formula
1313 end
1414
1515 bottle do
16- sha256 arm64_tahoe : "70a4007af2df1cbceee0f1d245b9c3b63610c7e47ea17bafb6722964b401c8b3 "
17- sha256 arm64_sequoia : "aa09d81bf684995f2b039a6fea27b58c5fa68d69af3b1111bc4f659a691e55ba "
18- sha256 arm64_sonoma : "3a6ab91642e7cd983422eddfc2535c56365dad208e4ecc10b2162fab2029e55d "
19- sha256 sonoma : "126ce8dfc0ac26bcc92193f6c27d49a9d79a9fa652cf56bb37107f2789736940 "
20- sha256 arm64_linux : "0e44e1adc76f7985b20ef49cbeb1a96128b748fc27c2c8d52b3b2e192744c38d "
21- sha256 x86_64_linux : "97bf08e3d0a9dc3adaed58d3b6142bee0542de0add7c7882ccebf28f783a8949 "
16+ sha256 arm64_tahoe : "aad5fc7749d91edf4f9f8340a9a89b042368dc353e7751ab3fa463e2c78ec336 "
17+ sha256 arm64_sequoia : "cb1edb6b9073b44f9a9a9a96e88f2061be3332a8a933e329540764f8cc0f2983 "
18+ sha256 arm64_sonoma : "068e0c8ba5387c15421a00265147b04c3afdff8aa7c56cb1841c9a9c4467955a "
19+ sha256 sonoma : "d5b690a4b989f732c022673dc1a76ee566a10d290c536435b7408f74ef96c1f5 "
20+ sha256 arm64_linux : "724870b999a939457eb40326bdc8e8231b9a71f94a8b6cf50c19199b4b583df2 "
21+ sha256 x86_64_linux : "f9f3f1107aa32df9e481fca5cf2ade56b6d22072283d83d9007d1234d724c78c "
2222 end
2323
2424 depends_on "pkgconf" => :build
25- depends_on "cairo"
26- depends_on "fontconfig"
27- depends_on "freetype"
25+
26+ # Only add dependencies required for dependents in homebrew-core,
27+ # recursive dependencies or INCREDIBLY widely used and light formats in the
28+ # current year (2026).
29+ # Add other dependencies to imagemagick-full formula or consider making
30+ # formulae dependent on imagemagick-full.
31+ depends_on "glib"
2832 depends_on "jpeg-turbo"
29- depends_on "jpeg-xl"
3033 depends_on "libheif"
31- depends_on "liblqr"
3234 depends_on "libpng"
33- depends_on "libraw"
34- depends_on "librsvg"
3535 depends_on "libtiff"
3636 depends_on "libtool"
37- depends_on "libultrahdr"
38- depends_on "libzip"
3937 depends_on "little-cms2"
40- depends_on "openexr"
41- depends_on "openjpeg"
4238 depends_on "webp"
4339 depends_on "xz"
4440
@@ -47,27 +43,12 @@ class Imagemagick < Formula
4743 uses_from_macos "zlib"
4844
4945 on_macos do
50- depends_on "gdk-pixbuf"
5146 depends_on "gettext"
52- depends_on "glib"
5347 depends_on "imath"
54- depends_on "libomp"
55- end
56-
57- on_linux do
58- depends_on "glib"
59- depends_on "libx11"
60- depends_on "libxext"
6148 end
6249
6350 skip_clean :la
6451
65- # Patch to fix build with LibRaw 0.22+
66- patch do
67- url "https://gitlab.archlinux.org/archlinux/packaging/packages/imagemagick/-/raw/ca9b35f767e1c4a166847fbfe17c2d715aa80582/libraw-0.22.patch"
68- sha256 "baed7cbfb378734d32d277b6e13882ac541932ef67e6aa8867b185ffef12f986"
69- end
70-
7152 def install
7253 # Avoid references to shim
7354 inreplace Dir [ "**/*-config.in" ] , "@PKG_CONFIG@" , Formula [ "pkg-config" ] . opt_bin /"pkg-config"
@@ -80,33 +61,23 @@ def install
8061 "--disable-opencl" ,
8162 "--enable-shared" ,
8263 "--enable-static" ,
83- "--with-freetype=yes" ,
84- "--with-rsvg=yes" ,
8564 "--with-gvc=no" ,
8665 "--with-modules" ,
87- "--with-openjp2" ,
88- "--with-openexr" ,
8966 "--with-webp=yes" ,
9067 "--with-heic=yes" ,
91- "--with-raw=yes" ,
92- "--with-uhdr=yes" ,
93- "--with-zip=yes" ,
68+ "--with-raw=no" ,
9469 "--without-gslib" ,
95- "--with-gs-font-dir=#{ HOMEBREW_PREFIX } /share/ghostscript/fonts" ,
9670 "--with-lqr" ,
9771 "--without-djvu" ,
9872 "--without-fftw" ,
9973 "--without-pango" ,
10074 "--without-wmf" ,
101- "--enable-openmp" ,
75+ "--without-jxl" ,
76+ "--without-openexr" ,
10277 ]
10378 if OS . mac?
10479 args += [
10580 "--without-x" ,
106- # Work around "checking for clang option to support OpenMP... unsupported"
107- "ac_cv_prog_c_openmp=-Xpreprocessor -fopenmp" ,
108- "ac_cv_prog_cxx_openmp=-Xpreprocessor -fopenmp" ,
109- "LDFLAGS=-lomp -lz" ,
11081 ]
11182 end
11283
@@ -116,8 +87,7 @@ def install
11687
11788 def caveats
11889 <<~EOS
119- Ghostscript is not installed by default as a dependency.
120- If you need PS or PDF support, ImageMagick will still use the ghostscript formula if installed directly.
90+ imagemagick-full includes additional tools and libraries that are not included in the regular imagemagick formula.
12191 EOS
12292 end
12393
@@ -126,14 +96,8 @@ def caveats
12696
12797 # Check support for recommended features and delegates.
12898 features = shell_output ( "#{ bin } /magick -version" )
129- %w[ Modules freetype heic jpeg png raw rsvg tiff ] . each do |feature |
99+ %w[ Modules heic jpeg png tiff ] . each do |feature |
130100 assert_match feature , features
131101 end
132-
133- # Check support for a few specific image formats, mostly to ensure LibRaw linked correctly.
134- formats = shell_output ( "#{ bin } /magick -list format" )
135- [ "AVIF HEIC rw+" , "ARW DNG r--" , "DNG DNG r--" ] . each do |format |
136- assert_match format , formats
137- end
138102 end
139103end
0 commit comments