Derive GraphicsMagick from ImageMagick
Ruby is cool init?
This commit is contained in:
parent
fa2a4c818c
commit
c76fcf59f4
2 changed files with 28 additions and 24 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue