Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

imagemagick-ruby186: Need old libpng. X11 optional

Simplify formula by removing now unused support methods.
Using `build.with?`.

Fixes #63 by adding optional `depends_on :x11`.
Fixes #10 by depending on old libpng12
  • Loading branch information...
commit 464f7d18df8e35e4b96406975fb08d847d83a1b3 1 parent 2398db8
@samueljohn samueljohn authored
Showing with 22 additions and 32 deletions.
  1. +22 −32 imagemagick-ruby186.rb
View
54 imagemagick-ruby186.rb
@@ -5,54 +5,44 @@
require 'formula'
# some credit to http://github.com/maddox/magick-installer
-# NOTE please be aware that the GraphicsMagick formula derives this formula
class ImagemagickRuby186 < Formula
homepage 'http://www.imagemagick.org'
url 'http://image_magick.veidrodis.com/image_magick/ImageMagick-6.5.9-8.tar.bz2'
sha1 'bb292ff860cebf76bfed9df68289abb76d408e34'
- option 'with-ghostcript', 'Enable-ghostscript support'
-
depends_on 'jpeg'
depends_on 'libwmf' => :optional
depends_on 'libtiff' => :optional
depends_on 'little-cms' => :optional
depends_on 'jasper' => :optional
- depends_on 'ghostscript' => :recommended
- depends_on :libpng
-
- skip_clean :la
-
- def fix_configure
- # versioned stuff in main tree is pointless for us
- inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}'
- end
-
- def configure_args
- args = ["--prefix=#{prefix}",
- "--disable-dependency-tracking",
- "--enable-shared",
- "--disable-static",
- "--with-modules",
- "--without-magick-plus-plus"]
-
- args << "--disable-openmp" if MacOS.version < 10.6 # libgomp unavailable
- args << '--without-ghostscript' \
- << "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts" \
- unless build.with? "ghostscript"
- return args
- end
+ depends_on 'ghostscript' => :optional
+ depends_on 'libpng12' # needs this old libpng. Not tested with 1.3 but 1.4 fails.
+ depends_on :x11 => :optional
def install
ENV.deparallelize
- fix_configure
+ # versioned stuff in main tree is pointless for us
+ inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}'
- system "./configure", "--without-maximum-compile-warnings",
- "--disable-osx-universal-binary",
- "--without-perl", # I couldn't make this compile
- *configure_args
+ args = [ "--prefix=#{prefix}",
+ "--disable-dependency-tracking",
+ "--enable-shared",
+ "--without-maximum-compile-warnings",
+ "--disable-osx-universal-binary",
+ "--disable-static",
+ "--with-modules",
+ "--without-perl", # I couldn't make this compile
+ "--disable-openmp",
+ "--without-magick-plus-plus" ]
+
+ args << "--without-x" if build.without? 'x11'
+ if build.with? 'ghostscript'
+ args << '--without-ghostscript'
+ args << "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts"
+ end
+ system "./configure", *args
system "make install"
# We already copy these into the keg root
Please sign in to comment.
Something went wrong with that request. Please try again.