aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/zookeeper.rb
diff options
context:
space:
mode:
authorDusty Leary2012-02-28 17:30:16 -0800
committerAdam Vandenberg2012-03-15 20:21:31 -0700
commit84371b3b22592390edf5588442afa00d06c738dc (patch)
tree86a1f908e2af18f4dc06a33b4a86637cd886090b /Library/Formula/zookeeper.rb
parent2919b373ba5535cdadd2e4399a8a19d144d5fe72 (diff)
downloadhomebrew-84371b3b22592390edf5588442afa00d06c738dc.tar.bz2
zookeeper: make C binding optional
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/zookeeper.rb')
-rw-r--r--Library/Formula/zookeeper.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/Library/Formula/zookeeper.rb b/Library/Formula/zookeeper.rb
index 4d2606723..e0899bc70 100644
--- a/Library/Formula/zookeeper.rb
+++ b/Library/Formula/zookeeper.rb
@@ -9,6 +9,7 @@ class Zookeeper < Formula
def options
[
+ ["--c", "Build C bindings."],
["--perl", "Build Perl bindings."],
["--python", "Build Python bindings."],
]
@@ -63,23 +64,27 @@ 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 & install C libraries.
cd "src/c" do
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", "--without-cppunit"
system "make install"
- end
+ end if build_c
# Install Python bindings
cd "src/contrib/zkpython" do
system "python", "src/python/setup.py", "build"
system "python", "src/python/setup.py", "install", "--prefix=#{prefix}"
- end if ARGV.include? "--python"
+ end if build_python
# Install Perl bindings
cd "src/contrib/zkperl" do
system "perl", "Makefile.PL", "PREFIX=#{prefix}", "--zookeeper-include=#{include}/c-client-src", "--zookeeper-lib=#{lib}"
system "make install"
- end if ARGV.include? "--perl"
+ end if build_perl
# Remove windows executables
rm_f Dir["bin/*.cmd"]