From 1fe28f863ae1fd16c45fe1ff4983d07e0633556b Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 15 Jun 2014 16:20:33 -0700 Subject: imagemagick: optional openjpeg support Closes #28153 --- Library/Formula/imagemagick.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/imagemagick.rb b/Library/Formula/imagemagick.rb index b94cf8bbf..f091c1eff 100644 --- a/Library/Formula/imagemagick.rb +++ b/Library/Formula/imagemagick.rb @@ -22,6 +22,7 @@ class Imagemagick < Formula option 'with-quantum-depth-32', 'Compile with a quantum depth of 32 bit' option 'with-perl', 'enable build/install of PerlMagick' option 'without-magick-plus-plus', 'disable build/install of Magick++' + option 'with-jp2', 'Compile with Jpeg2000 support' depends_on "libtool" => :run @@ -42,6 +43,7 @@ class Imagemagick < Formula depends_on 'openexr' => :optional depends_on 'ghostscript' => :optional depends_on 'webp' => :optional + depends_on 'homebrew/versions/openjpeg21' if build.with? 'jp2' opoo '--with-ghostscript is not recommended' if build.with? 'ghostscript' @@ -78,6 +80,12 @@ class Imagemagick < Formula quantum_depth = 8 end + if build.with? "jp2" + args << "--with-openjp2" + else + args << "--without-openjp2" + end + args << "--with-quantum-depth=#{quantum_depth}" if quantum_depth args << "--with-rsvg" if build.with? 'librsvg' args << "--without-x" if build.without? 'x11' -- cgit v1.2.3