diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/graphicsmagick.rb | 23 |
1 files changed, 22 insertions, 1 deletions
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 |
