diff options
| author | Caleb Land | 2009-09-29 11:57:12 -0400 |
|---|---|---|
| committer | Max Howell | 2009-09-29 23:34:16 +0100 |
| commit | 0c4ddeddfda01cafff9aa36745bd6ad1c69b1c9b (patch) | |
| tree | ce3ff9856f09cc09e8b489d121a9fa07d051ab71 /Library/Formula/ghostscript.rb | |
| parent | ed371ea06a8482554b8ea1f7f3562f1ce48c2867 (diff) | |
| download | homebrew-0c4ddeddfda01cafff9aa36745bd6ad1c69b1c9b.tar.bz2 | |
Fix ghostscript if jpeg7 is already installed
Closes #56
If jpeg7 is already installed when you try to install ghostscript there is a
compilation error.
The answer is to move the included jpeg6 source directory out of the way,
download jpeg7, and create a link to the jpeg7 source inside of the
ghostscript source... ghostscript is none the wiser.
Diffstat (limited to 'Library/Formula/ghostscript.rb')
| -rw-r--r-- | Library/Formula/ghostscript.rb | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/Library/Formula/ghostscript.rb b/Library/Formula/ghostscript.rb index 0b0515695..fac5520b1 100644 --- a/Library/Formula/ghostscript.rb +++ b/Library/Formula/ghostscript.rb @@ -1,29 +1,39 @@ require 'brewkit' class GhostscriptFonts <Formula - @url='http://downloads.sourceforge.net/project/gs-fonts/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz' - @homepage='http://sourceforge.net/projects/gs-fonts/' - @md5='6865682b095f8c4500c54b285ff05ef6' + url 'http://downloads.sourceforge.net/project/gs-fonts/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz' + homepage 'http://sourceforge.net/projects/gs-fonts/' + md5 '6865682b095f8c4500c54b285ff05ef6' end class Ghostscript <Formula - @url='http://downloads.sourceforge.net/project/ghostscript/GPL%20Ghostscript/8.70/ghostscript-8.70.tar.bz2' - @homepage='http://www.ghostscript.com/' - @md5='526366f8cb4fda0d3d293597cc5b984b' - + url 'http://downloads.sourceforge.net/project/ghostscript/GPL%20Ghostscript/8.70/ghostscript-8.70.tar.bz2' + homepage 'http://www.ghostscript.com/' + md5 '526366f8cb4fda0d3d293597cc5b984b' + + depends_on 'jpeg' + def install - # O3 with ghostscript takes an ungodly amount of time + # O4 takes an ungodly amount of time ENV.O3 # ghostscript configure ignores LDFLAGs apparently ENV['LIBS']="-L/usr/X11/lib" - system "./configure", "--prefix=#{prefix}", "--disable-debug", + # move the included jpeg6 out of the way so we don't use it + FileUtils.rm_rf 'jpeg' + + build_dir = Dir.pwd + # 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" # versioned stuff in main tree is pointless for us inreplace 'Makefile', '/$(GS_DOT_VERSION)', '' system "make install" - (prefix+'share'+'ghostscript'+'doc').rmtree GhostscriptFonts.new.brew do Dir.chdir '..' |
