From e5475d93e6ecbfd5371e424973473ca703b009fc Mon Sep 17 00:00:00 2001 From: Alin Popa Date: Wed, 5 Sep 2012 18:47:06 +0300 Subject: thrift: add language bindings Closes #14746. Signed-off-by: Adam Vandenberg --- Library/Formula/thrift.rb | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/thrift.rb b/Library/Formula/thrift.rb index a7da52697..ec8374e89 100644 --- a/Library/Formula/thrift.rb +++ b/Library/Formula/thrift.rb @@ -7,6 +7,12 @@ class Thrift < Formula head 'http://svn.apache.org/repos/asf/thrift/trunk' + option "with-haskell", "Install Haskell binding" + option "with-erlang", "Install Erlang binding" + option "with-java", "Install Java binding" + option "with-perl", "Install Perl binding" + option "with-php", "Install Php binding" + depends_on 'boost' def install @@ -17,19 +23,21 @@ class Thrift < Formula system "./bootstrap.sh" if build.head? + exclusions = ["--without-python", "--without-ruby"] + + exclusions << "--without-haskell" unless build.include? "with-haskell" + exclusions << "--without-java" unless build.include? "with-java" + exclusions << "--without-perl" unless build.include? "with-perl" + exclusions << "--without-php" unless build.include? "with-php" + exclusions << "--without-erlang" unless build.include? "with-erlang" + # Language bindings try to install outside of Homebrew's prefix, so # omit them here. For ruby you can install the gem, and for Python # you can use pip or easy_install. system "./configure", "--disable-debug", "--prefix=#{prefix}", "--libdir=#{lib}", - "--without-haskell", - "--without-java", - "--without-python", - "--without-ruby", - "--without-perl", - "--without-php", - "--without-erlang" + *exclusions ENV.j1 system "make" system "make install" -- cgit v1.2.3