aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornibbles 2bits2012-05-07 02:47:42 -0700
committerAdam Vandenberg2012-05-07 06:37:30 -0700
commit38d3c75ea966594da8137862c312ee86735273d1 (patch)
tree9a3c74cec664c38ca1e9d7f4a5037d57c1b0b54c
parent88a641ad89c57fbe11ba6b7ac1152ed904b0dc5c (diff)
downloadhomebrew-38d3c75ea966594da8137862c312ee86735273d1.tar.bz2
ghostscript fix compile error with libtiff-4.0.1
The gs formula stopped working after libtiff was upgraded to 4.0.1. It gives an error `no rule to make target obj/libtiff_.dev`. Add the `--with-system-libtiff` flag so it compiles against 4.0.1. Remove the `--disable-debug` flag, which is not a valid option. Add deps on little-cms2 and jbig2dec and Add `lcms2` and `jbig2dec` to the `renames` variable so that gs will properly link against those two libraries that many people already have installed who deal with images frequently. Without those additions on systems with `lcms2` and `jbig2dec` installed, `configure` will find them but not link correctly against them. `autogen.sh` automatically calls configure and warns the user that it is running configure with no args, explaining how to put the args after `autogen.sh` if args are desired. Do that for head builds. It is proper and saves configure from being run twice when brewing head. Fixes #12098 Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/ghostscript.rb23
1 files changed, 15 insertions, 8 deletions
diff --git a/Library/Formula/ghostscript.rb b/Library/Formula/ghostscript.rb
index c27187057..87e3f82b4 100644
--- a/Library/Formula/ghostscript.rb
+++ b/Library/Formula/ghostscript.rb
@@ -16,6 +16,8 @@ class Ghostscript < Formula
depends_on 'pkg-config' => :build
depends_on 'jpeg'
depends_on 'libtiff'
+ depends_on 'jbig2dec'
+ depends_on 'little-cms2'
if ARGV.build_head? and MacOS.xcode_version >= "4.3"
depends_on "automake" => :build
@@ -26,7 +28,7 @@ class Ghostscript < Formula
# 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
- renames = ["jpeg", "libpng", "tiff", "zlib"]
+ renames = %w(jpeg libpng tiff zlib lcms2 jbig2dec)
renames << "freetype" if 10.7 <= MACOS_VERSION
renames.each do |lib|
mv lib, "#{lib}_local"
@@ -43,14 +45,19 @@ class Ghostscript < Formula
cd src_dir do
move_included_source_copies
+ args = %W[
+ --prefix=#{prefix}
+ --disable-cups
+ --disable-compile-inits
+ --disable-gtk
+ --with-system-libtiff
+ ]
- system "./autogen.sh" if ARGV.build_head?
- system "./configure", "--prefix=#{prefix}", "--disable-debug",
- # the cups component adamantly installs to /usr so fuck it
- "--disable-cups",
- "--disable-compile-inits",
- "--disable-gtk"
-
+ if ARGV.build_head?
+ system './autogen.sh', *args
+ else
+ system './configure', *args
+ end
# versioned stuff in main tree is pointless for us
inreplace 'Makefile', '/$(GS_DOT_VERSION)', ''
system "make install"