diff options
| author | Adam Vandenberg | 2012-07-30 12:51:49 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-08 22:01:38 -0700 |
| commit | ebdd0510175f4cca7b7f3b0795010a466ec1b11e (patch) | |
| tree | 84746793a4661d6a99b4debff30d7487d204a6b5 /Library/Formula | |
| parent | dd75b180eb86880e26fba95330d51d5edb5b1e23 (diff) | |
| download | homebrew-ebdd0510175f4cca7b7f3b0795010a466ec1b11e.tar.bz2 | |
zookeeper: use options dsl
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/zookeeper.rb | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Library/Formula/zookeeper.rb b/Library/Formula/zookeeper.rb index 3d17b734c..a39deec8d 100644 --- a/Library/Formula/zookeeper.rb +++ b/Library/Formula/zookeeper.rb @@ -12,13 +12,9 @@ class Zookeeper < Formula depends_on :libtool end - def options - [ - ["--c", "Build C bindings."], - ["--perl", "Build Perl bindings."], - ["--python", "Build Python bindings."], - ] - end + option "c", "Build C bindings." + option "perl", "Build Perl bindings." + option "python", "Build Python bindings." def shim_script target <<-EOS.undent @@ -56,7 +52,7 @@ class Zookeeper < Formula end # Prep work for svn compile. - if ARGV.build_head? + if build.head? system "ant", "compile_jute" cd "src/c" do @@ -64,9 +60,9 @@ class Zookeeper < Formula end end - build_python = ARGV.include? "--python" - build_perl = ARGV.include? "--perl" - build_c = build_python or build_perl or ARGV.include? "--c" + build_python = build.include? "python" + build_perl = build.include? "perl" + build_c = build_python or build_perl or build.include? "c" # Build & install C libraries. cd "src/c" do @@ -90,7 +86,7 @@ class Zookeeper < Formula rm_f Dir["bin/*.cmd"] # Install Java stuff - if ARGV.build_head? + if build.head? system "ant" libexec.install %w(bin src/contrib src/java/lib) libexec.install Dir['build/*.jar'] |
