aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-07-30 12:51:49 -0700
committerAdam Vandenberg2012-08-08 22:01:38 -0700
commitebdd0510175f4cca7b7f3b0795010a466ec1b11e (patch)
tree84746793a4661d6a99b4debff30d7487d204a6b5 /Library
parentdd75b180eb86880e26fba95330d51d5edb5b1e23 (diff)
downloadhomebrew-ebdd0510175f4cca7b7f3b0795010a466ec1b11e.tar.bz2
zookeeper: use options dsl
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/zookeeper.rb20
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']