aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/imagemagick.rb
diff options
context:
space:
mode:
authorMax Howell2009-09-18 19:16:39 +0100
committerMax Howell2009-09-21 18:27:48 +0100
commit68108e109839a901313b9933cbb1e3202aed90cf (patch)
tree124d204c43534f4e8171c5d278d4cb09d46f06a2 /Library/Formula/imagemagick.rb
parent0d1ec9641403ea2de9588ffdb22b68a23e6c2547 (diff)
downloadhomebrew-68108e109839a901313b9933cbb1e3202aed90cf.tar.bz2
Dependency resolution with fancy syntax
Is it a DSL? No. But people call it that apparently. To add a dependency: class Doe <Formula depends_on 'ray' depends_on 'mee' => :optional depends_on 'far' => :recommended depends_on Sew.new end Sew would be a formula you have defined in this Formula file. This is useful, eg. see Python's formula. Formula specified in this fashion cannot be linked into the HOMEBREW_PREFIX, they are considered private libraries. This allows you to create custom installations that are very specific to your formula. More features to come, like specifying versions
Diffstat (limited to 'Library/Formula/imagemagick.rb')
-rw-r--r--Library/Formula/imagemagick.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/Library/Formula/imagemagick.rb b/Library/Formula/imagemagick.rb
index ee06a50ac..0a7469b8a 100644
--- a/Library/Formula/imagemagick.rb
+++ b/Library/Formula/imagemagick.rb
@@ -7,9 +7,11 @@ class Imagemagick <Formula
@md5='8cb7471a50428e4892ee46aa404e54c2'
@homepage='http://www.imagemagick.org'
- def deps
- { :required => 'jpeg', :optional => %w[libwmf libtiff little-cms ghostscript] }
- end
+ depends_on 'jpeg'
+ depends_on 'libwmf' => :optional
+ depends_on 'libtiff' => :optional
+ depends_on 'little-cms' => :optional
+ depends_on 'ghostscript' => :recommended
def install
ENV.libpng
@@ -25,15 +27,14 @@ class Imagemagick <Formula
"--without-maximum-compile-warnings",
"--prefix=#{prefix}",
"--disable-osx-universal-binary",
- "--with-gs-font-dir=#{prefix}/share/ghostscript/fonts",
+ "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts",
"--without-perl" # I couldn't make this compile
system "make install"
- # We already copy these in
- d=prefix+'share'
- (d+'NEWS.txt').unlink
- (d+'LICENSE').unlink
- (d+'ChangeLog').unlink
+ # We already copy these into the keg root
+ (share+'NEWS.txt').unlink
+ (share+'LICENSE').unlink
+ (share+'ChangeLog').unlink
end
def caveats