diff options
| author | Kieran Pilkington | 2009-11-15 16:18:12 +1300 |
|---|---|---|
| committer | Max Howell | 2009-12-01 12:07:34 +0000 |
| commit | fc7abba830228038ca6033f89a9307f59e87b89d (patch) | |
| tree | e246f86a888e741e8f8afd575595181515fd973c /Library/Formula/ghostscript.rb | |
| parent | 7b2bef79f0d87ea04d63552a6d7d983414661383 (diff) | |
| download | homebrew-fc7abba830228038ca6033f89a9307f59e87b89d.tar.bz2 | |
Fixes Ghostscript formula when Jasper is installed
Fixes #113.
Diffstat (limited to 'Library/Formula/ghostscript.rb')
| -rw-r--r-- | Library/Formula/ghostscript.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Library/Formula/ghostscript.rb b/Library/Formula/ghostscript.rb index 4821b2b01..e68527831 100644 --- a/Library/Formula/ghostscript.rb +++ b/Library/Formula/ghostscript.rb @@ -11,26 +11,35 @@ class Ghostscript <Formula homepage 'http://www.ghostscript.com/' md5 '526366f8cb4fda0d3d293597cc5b984b' + depends_on 'jasper' depends_on 'jpeg' + def move_included_source_copies + # If the install version of any of these doesn't match + # the version included in ghostscript, we get errors + # Taken from the MacPorts portfile - http://bit.ly/ghostscript-portfile + %w{ jpeg libpng zlib }.each do |lib| + FileUtils.mv lib, "#{lib}_local" + end + end + def install + ENV.libpng + ENV.deparallelize # O4 takes an ungodly amount of time ENV.O3 # ghostscript configure ignores LDFLAGs apparently ENV['LIBS']="-L/usr/X11/lib" - # move the included jpeg6 out of the way so we don't use it - FileUtils.rm_rf 'jpeg' + move_included_source_copies - build_dir = Pathname.getwd - # download jpeg7, extract it, and fool ghostscript into using it - Formula.factory('jpeg').brew do - FileUtils.ln Dir.pwd, build_dir+'jpeg' - end system "./configure", "--prefix=#{prefix}", "--disable-debug", # the cups component adamantly installs to /usr so fuck it - "--disable-cups" + "--disable-cups", + "--disable-compile-inits", + "--disable-gtk" + # versioned stuff in main tree is pointless for us inreplace 'Makefile', '/$(GS_DOT_VERSION)', '' system "make install" |
