aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
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
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')
-rw-r--r--Library/Formula/erlang.rb3
-rw-r--r--Library/Formula/fish.rb4
-rw-r--r--Library/Formula/glib.rb6
-rw-r--r--Library/Formula/imagemagick.rb19
-rw-r--r--Library/Formula/liblastfm.rb6
-rw-r--r--Library/Formula/libmusicbrainz.rb5
-rw-r--r--Library/Formula/libvorbis.rb4
-rw-r--r--Library/Formula/memcached.rb4
-rw-r--r--Library/Formula/mysql-connector-c.rb4
-rw-r--r--Library/Formula/mysql.rb4
-rw-r--r--Library/Formula/nginx.rb4
-rw-r--r--Library/Formula/playdar.rb6
-rw-r--r--Library/Formula/python.rb6
-rw-r--r--Library/Formula/scummvm.rb7
-rw-r--r--Library/Formula/sshfs.rb6
-rw-r--r--Library/Formula/subversion.rb13
-rw-r--r--Library/Formula/unp.rb4
-rw-r--r--Library/Formula/vorbis-tools.rb7
-rw-r--r--Library/Formula/yajl.rb4
19 files changed, 46 insertions, 70 deletions
diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb
index eaa002ba0..41feea372 100644
--- a/Library/Formula/erlang.rb
+++ b/Library/Formula/erlang.rb
@@ -13,6 +13,9 @@ class Erlang <Formula
@url='http://erlang.org/download/otp_src_R13B01.tar.gz'
@md5='b3db581de6c13e1ec93d74e54a7b4231'
+ depends_on 'icu4c'
+ depends_on 'openssl'
+
def install
ENV.deparallelize
system "./configure", "--disable-debug",
diff --git a/Library/Formula/fish.rb b/Library/Formula/fish.rb
index 09246747e..0324f0259 100644
--- a/Library/Formula/fish.rb
+++ b/Library/Formula/fish.rb
@@ -5,9 +5,7 @@ class Fish <Formula
@homepage='http:://fishshell.org/'
@md5='4b2436843e63bebba467cc4add11428a'
- def deps
- 'readline'
- end
+ depends_on 'readline'
def install
system "./configure", "--prefix=#{prefix}", "--without-xsel"
diff --git a/Library/Formula/glib.rb b/Library/Formula/glib.rb
index 9befe40c1..24c55be41 100644
--- a/Library/Formula/glib.rb
+++ b/Library/Formula/glib.rb
@@ -5,10 +5,8 @@ class Glib <Formula
@md5='4c178b91d82ef80a2da3c26b772569c0'
@homepage='http://www.gtk.org'
- def deps
- BinaryDep.new 'pkg-config'
- LibraryDep.new 'gettext'
- end
+ depends_on 'pkg-config'
+ depends_on 'gettext'
def install
# indeed, amazingly, -w causes gcc to emit spurious errors for this package!
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
diff --git a/Library/Formula/liblastfm.rb b/Library/Formula/liblastfm.rb
index ea6a61706..fabdf637b 100644
--- a/Library/Formula/liblastfm.rb
+++ b/Library/Formula/liblastfm.rb
@@ -5,9 +5,9 @@ class Liblastfm <Formula
@url='http://static.last.fm/src/liblastfm-0.3.0.tar.bz2'
@md5='3f73222ebc31635941832b01e7a494b6'
- def deps
- %w[qt fftw samplerate]
- end
+ depends_on 'qt'
+ depends_on 'fftw'
+ depends_on 'samplerate'
def install
system "./configure --release --prefix '#{prefix}'"
diff --git a/Library/Formula/libmusicbrainz.rb b/Library/Formula/libmusicbrainz.rb
index b9d5c1c45..b7869abca 100644
--- a/Library/Formula/libmusicbrainz.rb
+++ b/Library/Formula/libmusicbrainz.rb
@@ -5,9 +5,8 @@ class Libmusicbrainz <Formula
@homepage='http://musicbrainz.org'
@md5='648ecd43f7b80852419aaf73702bc23f'
- def deps
- { :required => 'neon', :optional => 'libdiscid' }
- end
+ depends_on 'neon'
+ depends_on 'libdiscid' => :optional
def install
system "cmake . #{std_cmake_parameters}"
diff --git a/Library/Formula/libvorbis.rb b/Library/Formula/libvorbis.rb
index cdd795437..d4ca863e8 100644
--- a/Library/Formula/libvorbis.rb
+++ b/Library/Formula/libvorbis.rb
@@ -5,9 +5,7 @@ class Libvorbis <Formula
@md5='6a7086ee666b8c62e122d29d107f7bec'
@homepage='http://vorbis.com'
- def deps
- 'libogg'
- end
+ depends_on 'libogg'
def install
system "./configure --enable-docs --disable-debug --disable-dependency-tracking --prefix='#{prefix}'"
diff --git a/Library/Formula/memcached.rb b/Library/Formula/memcached.rb
index 0ad5681c3..3b942615f 100644
--- a/Library/Formula/memcached.rb
+++ b/Library/Formula/memcached.rb
@@ -5,9 +5,7 @@ class Memcached <Formula
@homepage='http://www.danga.com/memcached/'
@md5='d7651ecb8bf345144cb17900d9a46c85'
- def deps
- 'libevent'
- end
+ depends_on 'libevent'
def install
system "./configure --prefix='#{prefix}'"
diff --git a/Library/Formula/mysql-connector-c.rb b/Library/Formula/mysql-connector-c.rb
index f135f7dc8..580b6f5a6 100644
--- a/Library/Formula/mysql-connector-c.rb
+++ b/Library/Formula/mysql-connector-c.rb
@@ -5,9 +5,7 @@ class MysqlConnectorC <Formula
@url='http://mysql.llarian.net/Downloads/Connector-C/mysql-connector-c-6.0.1.tar.gz'
@md5='348a869fa72957062ea4e7ad3865623c'
- def deps
- 'cmake'
- end
+ depends_on 'cmake'
def install
system "cmake . #{std_cmake_parameters}"
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb
index 5cfb8be41..76fd2a7c4 100644
--- a/Library/Formula/mysql.rb
+++ b/Library/Formula/mysql.rb
@@ -5,9 +5,7 @@ class Mysql <Formula
@homepage='http://dev.mysql.com/doc/refman/5.1/en/'
@md5='7564d7759a8077b3a0e6190955422287'
- def deps
- 'readline'
- end
+ depends_on 'readline'
def options
[
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb
index 4863381e6..d0f03666b 100644
--- a/Library/Formula/nginx.rb
+++ b/Library/Formula/nginx.rb
@@ -5,9 +5,7 @@ class Nginx <Formula
@homepage='http://nginx.net/'
@md5='6ebf89b9b00a3b82734e93c32da7df07'
- def deps
- 'pcre'
- end
+ depends_on 'pcre'
def install
system "./configure", "--prefix=#{prefix}", "--with-http_ssl_module"
diff --git a/Library/Formula/playdar.rb b/Library/Formula/playdar.rb
index 44b1f815d..5ec5c0639 100644
--- a/Library/Formula/playdar.rb
+++ b/Library/Formula/playdar.rb
@@ -4,9 +4,9 @@ class Playdar <Formula
@homepage='http://www.playdar.org'
@head='git://github.com/mxcl/playdar.git'
- def deps
- %w[taglib boost cmake]
- end
+ depends_on 'taglib'
+ depends_on 'boost'
+ depends_on 'cmake'
def skip_clean? path
# for some reason stripping breaks it
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index 6d92d147c..c1d15a887 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -26,10 +26,8 @@ class Python <Formula
@homepage='http://www.python.org/'
@md5='245db9f1e0f09ab7e0faaa0cf7301011'
- def deps
- # You can build Python without readline, but you really don't want to.
- Readline.new
- end
+ # You can build Python without readline, but you really don't want to.
+ depends_on Readline.new
def skip_clean? path
path == bin+'python' or path == bin+'python2.6' or # if you strip these, it can't load modules
diff --git a/Library/Formula/scummvm.rb b/Library/Formula/scummvm.rb
index adb1f1a48..912c4207e 100644
--- a/Library/Formula/scummvm.rb
+++ b/Library/Formula/scummvm.rb
@@ -13,9 +13,10 @@ prefer to use theirs. If so type `brew home scummvm' to visit their site.
EOS
end
- def deps
- { :required => 'sdl', :recommended => %w[flac libogg libvorbis] }
- end
+ depends_on 'sdl'
+ depends_on 'flac' => :recommended
+ depends_on 'libvorbis' => :recommended
+ depends_on 'libogg' => :recommended
def install
system "./configure --prefix='#{prefix}' --disable-debug"
diff --git a/Library/Formula/sshfs.rb b/Library/Formula/sshfs.rb
index 0ae3f40d9..59c184663 100644
--- a/Library/Formula/sshfs.rb
+++ b/Library/Formula/sshfs.rb
@@ -13,9 +13,9 @@ class Sshfs <Formula
}
end
- def deps
- %w[pkg-config glib macfuse]
- end
+ depends_on 'pkg-config'
+ depends_on 'glib'
+ depends_on 'macfuse'
def install
# Steal compile flags from macfuse_buildtool.sh
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index 63254e746..e4584062e 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -1,22 +1,13 @@
require 'brewkit'
-class SubversionDeps <Formula
- @url='http://subversion.tigris.org/downloads/subversion-deps-1.6.5.tar.bz2'
- @md5='8272316e1670d4d2bea451411e438bde'
-end
-
class Subversion <Formula
@url='http://subversion.tigris.org/downloads/subversion-1.6.5.tar.bz2'
@homepage='http://subversion.tigris.org/'
@md5='1a53a0e72bee0bf814f4da83a9b6a636'
- def install
- # Slot dependencies into place
- d=Pathname.getwd
- SubversionDeps.new.brew do
- d.install Dir['*']
- end
+ depends_on 'neon'
+ def install
# Use existing system zlib, dep-provided other libraries
# Don't mess with Apache modules (since we're not sudo)
system "./configure", "--disable-debug",
diff --git a/Library/Formula/unp.rb b/Library/Formula/unp.rb
index 83cd639c2..d01b7a36e 100644
--- a/Library/Formula/unp.rb
+++ b/Library/Formula/unp.rb
@@ -5,9 +5,7 @@ class Unp <Formula
@homepage='http://packages.debian.org/de/etch/unp'
@md5='ecea662bd7e7efe7f7e2213bf21d9646'
- def deps
- 'p7zip'
- end
+ depends_on 'p7zip'
def install
bin.install %w[unp ucat]
diff --git a/Library/Formula/vorbis-tools.rb b/Library/Formula/vorbis-tools.rb
index b057cbe18..deaa2d403 100644
--- a/Library/Formula/vorbis-tools.rb
+++ b/Library/Formula/vorbis-tools.rb
@@ -5,9 +5,10 @@ class VorbisTools <Formula
@md5='df976d24e51ef3d87cd462edf747bf9a'
@homepage='http://vorbis.com'
- def deps
- { :required => %w[ogg vorbis], :optional => %w[ao ogg123] }
- end
+ depends_on 'ogg'
+ depends_on 'vorbis'
+ depends_on 'ao' => :optional
+ depends_on 'ogg123' => :optional
def install
system "./configure --disable-debug --disable-nls --disable-dependency-tracking --prefix='#{prefix}'"
diff --git a/Library/Formula/yajl.rb b/Library/Formula/yajl.rb
index 19f47f2ff..f47a454e4 100644
--- a/Library/Formula/yajl.rb
+++ b/Library/Formula/yajl.rb
@@ -5,9 +5,7 @@ class Yajl <Formula
@url='http://github.com/lloyd/yajl/tarball/1.0.5'
@md5='f4a3cbc764c43231ed1aedc54438b69b'
- def deps
- 'cmake'
- end
+ depends_on 'cmake'
def install
ENV.deparallelize