diff options
| author | Max Howell | 2009-06-02 13:39:39 +0100 |
|---|---|---|
| committer | Max Howell | 2009-06-03 15:57:19 +0100 |
| commit | d6141137f22fed0f3721b93ac09a719236850d83 (patch) | |
| tree | 4e7fc654f44732ae0e956eb2e71f46b2ae44dd78 /Formula/yajl.rb | |
| parent | d2c7fcac29b1a2725f52e66a8147ccbc66e9666e (diff) | |
| download | brew-d6141137f22fed0f3721b93ac09a719236850d83.tar.bz2 | |
Refactor Formulae
Basically Formulae are now classes that get dynamically loaded by the
brew script. This gives me more flexability.
Diffstat (limited to 'Formula/yajl.rb')
| -rw-r--r-- | Formula/yajl.rb | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/Formula/yajl.rb b/Formula/yajl.rb index a4784d715..f72432dda 100644 --- a/Formula/yajl.rb +++ b/Formula/yajl.rb @@ -1,16 +1,21 @@ -$:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew" #rubysucks require 'brewkit' -homepage='http://lloyd.github.com/yajl/' -url='http://github.com/lloyd/yajl/tarball/1.0.5' -md5='f4a3cbc764c43231ed1aedc54438b69b' +class Yajl <Formula + @homepage='http://lloyd.github.com/yajl/' + @url='http://github.com/lloyd/yajl/tarball/1.0.5' + @md5='f4a3cbc764c43231ed1aedc54438b69b' -deps=['cmake'] + def deps + dep_test_bin 'cmake' + end -Formula.new(url, md5).brew do |prefix| - - inreplace 'configure', 'cmake \.\.', "cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' \.\." - - system "./configure --prefix '#{prefix}'" - system "make install" + def install + ENV['MAKEFLAGS']='' # can't do parallel builds + + # I have pushed this fix upstream + inreplace 'configure', 'cmake \.\.', "cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' \.\." if @version == "1.0.5" + + system "./configure --prefix '#{prefix}'" + system "make install" + end end
\ No newline at end of file |
