From 5ff23e70a322aae108be83f8a450a2310ea8249c Mon Sep 17 00:00:00 2001 From: Jeffrey Carpenter Date: Wed, 30 Oct 2013 20:26:30 -0500 Subject: graphicsmagick 1.3.18 Add --with-perl option Closes #24945. Signed-off-by: Adam Vandenberg --- Library/Formula/graphicsmagick.rb | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Formula/graphicsmagick.rb b/Library/Formula/graphicsmagick.rb index 09058c87b..44a5846b9 100644 --- a/Library/Formula/graphicsmagick.rb +++ b/Library/Formula/graphicsmagick.rb @@ -11,6 +11,7 @@ class Graphicsmagick < Formula option 'with-quantum-depth-32', 'Compile with a quantum depth of 32 bit' option 'without-magick-plus-plus', 'disable build/install of Magick++' option 'without-svg', 'Compile without svg support' + option 'with-perl', 'Build PerlMagick; provides the Graphics::Magick module' depends_on :libtool => :run @@ -54,6 +55,7 @@ class Graphicsmagick < Formula args << "--without-gslib" unless build.with? 'ghostscript' args << "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts" unless build.with? 'ghostscript' args << "--without-magick-plus-plus" if build.without? 'magick-plus-plus' + args << "--with-perl" if build.include? 'with-perl' if build.with? 'quantum-depth-32' quantum_depth = 32 @@ -73,10 +75,29 @@ class Graphicsmagick < Formula # versioned stuff in main tree is pointless for us inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}' system "./configure", *args - system "make install" + system "make", "install" + if build.include? 'with-perl' + cd 'PerlMagick' do + # Install the module under the GraphicsMagick prefix + system "perl", "Makefile.PL", "PREFIX=#{prefix}" + system "make" + system "make", "install" + end + end end test do system "#{bin}/gm", "identify", "/usr/share/doc/cups/images/cups.png" end + + def caveats + if build.include? 'with-perl' + <<-EOS.undent + The Graphics::Magick perl module has been installed under: + + #{lib} + + EOS + end + end end -- cgit v1.2.3