aboutsummaryrefslogtreecommitdiffstats
path: root/Formula/yajl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Formula/yajl.rb')
-rw-r--r--Formula/yajl.rb27
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