diff options
| author | Max Howell | 2009-11-06 00:15:11 +0000 |
|---|---|---|
| committer | Max Howell | 2009-11-07 18:22:36 +0000 |
| commit | 9f389f52476fea77abc926ea7ef1b18c9c945e75 (patch) | |
| tree | b2b13cf0fef3e2c8c21cd82edf12dc918cc781b2 /Library | |
| parent | 8a41828a619e93a7799ccc39d255b9258cd95e5b (diff) | |
| download | homebrew-9f389f52476fea77abc926ea7ef1b18c9c945e75.tar.bz2 | |
Derive GraphicsMagick from ImageMagick
Ruby is cool init?
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/graphicsmagick.rb | 24 | ||||
| -rw-r--r-- | Library/Formula/imagemagick.rb | 28 |
2 files changed, 28 insertions, 24 deletions
diff --git a/Library/Formula/graphicsmagick.rb b/Library/Formula/graphicsmagick.rb index 25740ca9c..7c8f1d60c 100644 --- a/Library/Formula/graphicsmagick.rb +++ b/Library/Formula/graphicsmagick.rb @@ -1,30 +1,24 @@ require 'formula' +require "#{File.dirname __FILE__}/imagemagick.rb" -class Graphicsmagick <Formula +class Graphicsmagick <Imagemagick url 'http://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.7/GraphicsMagick-1.3.7.tar.bz2' homepage 'http://www.graphicsmagick.org/' md5 '42bfd382ddcda399880721170bcbf61b' - depends_on 'jpeg' - depends_on 'ghostscript' => :recommended - depends_on 'libwmf' => :optional - depends_on 'libtiff' => :optional - depends_on 'little-cms' => :optional - depends_on 'jasper' => :optional + def deps + # well this was an unexpected consequence of the DSL syntax, the dependencies + # aren't inherited + @deps ||= Formula.factory('imagemagick').deps + end def install ENV.libpng ENV.gcc_4_2 - # we do not need to version the stuff in the main tree - inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}' + fix_configure - system "./configure", "--prefix=#{prefix}", - "--disable-dependency-tracking", - "--enable-shared", - "--disable-static", - "--with-modules", - "--without-magick-plus-plus" + system "./configure", *configure_args system "make install" end diff --git a/Library/Formula/imagemagick.rb b/Library/Formula/imagemagick.rb index b9ef376d9..23fdbdcef 100644 --- a/Library/Formula/imagemagick.rb +++ b/Library/Formula/imagemagick.rb @@ -1,6 +1,7 @@ require 'formula' # some credit to http://github.com/maddox/magick-installer +# NOTE please be aware that the GraphicsMagick formula derives this formula class Imagemagick <Formula @url='http://image_magick.veidrodis.com/image_magick/ImageMagick-6.5.6-5.tar.gz' @@ -17,24 +18,33 @@ class Imagemagick <Formula def skip_clean? path path.extname == '.la' end + + def fix_configure + # versioned stuff in main tree is pointless for us + inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}' + end + + def configure_args + ["--prefix=#{prefix}", + "--disable-dependency-tracking", + "--enable-shared", + "--disable-static", + "--with-modules", + "--without-magick-plus-plus"] + end def install ENV.libpng ENV.deparallelize ENV.O3 # takes forever otherwise - # versioned stuff in main tree is pointless for us - inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}' + fix_configure - system "./configure", "--disable-static", - "--with-modules", - "--without-magick-plus-plus", - "--disable-dependency-tracking", - "--without-maximum-compile-warnings", - "--prefix=#{prefix}", + system "./configure", "--without-maximum-compile-warnings", "--disable-osx-universal-binary", "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts", - "--without-perl" # I couldn't make this compile + "--without-perl", # I couldn't make this compile + *configure_args system "make install" # We already copy these into the keg root |
