diff options
| author | Adam Vandenberg | 2012-08-26 19:29:46 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-26 19:29:46 -0700 |
| commit | 49e94b0d0741fae4781b4b7af5517df994207ff2 (patch) | |
| tree | 0e77e368294c2b7fcb2d947325b2990fa588d61a /Library/Formula | |
| parent | 48cc2401e2dbcb8863ce3063aeff47ff6d4d5585 (diff) | |
| download | homebrew-49e94b0d0741fae4781b4b7af5517df994207ff2.tar.bz2 | |
sigar: use new dsl
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/sigar.rb | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Library/Formula/sigar.rb b/Library/Formula/sigar.rb index c27d017ae..300ef6d7e 100644 --- a/Library/Formula/sigar.rb +++ b/Library/Formula/sigar.rb @@ -5,18 +5,13 @@ class Sigar < Formula head 'https://github.com/hyperic/sigar.git' homepage 'http://sigar.hyperic.com/' - def options - [ - ["--perl", "Build Perl bindings."], - ["--python", "Build Python bindings."], - ["--ruby", "Build Ruby bindings."], - ] - end + option "perl", "Build Perl bindings" + option "python", "Build Python bindings" + option "ruby", "Build Ruby bindings" def java_script; <<-EOS.undent #!/bin/sh # Runs SIGAR's REPL. - java -jar #{prefix}/sigar.jar EOS end @@ -33,13 +28,13 @@ class Sigar < Formula include.install Dir['sigar-bin/include/*'] - (bin+'sigar').write java_script + (bin/'sigar').write java_script end # Install Python bindings cd "bindings/python" do system "python", "setup.py", "install", "--prefix=#{prefix}" - end if ARGV.include? "--python" + end if build.include? "python" # Install Perl bindings cd "bindings/perl" do @@ -62,12 +57,12 @@ class Sigar < Formula end system "make install" - end if ARGV.include? "--perl" + end if build.include? "perl" # Install Ruby bindings cd "bindings/ruby" do system "ruby", "extconf.rb", "--prefix=#{prefix}" system "make install" - end if ARGV.include? "--ruby" + end if build.include? "ruby" end end |
