class Thrift < Formula desc "Framework for scalable cross-language services development" homepage "https://thrift.apache.org/" url "https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz" sha256 "c4ad38b6cb4a3498310d405a91fef37b9a8e79a50cd0968148ee2524d2fa60c2" bottle do cellar :any sha256 "d1c648d84f21b567f1468625523b78d496d49954a3f5f28ce127f3eca7c0e2e4" => :high_sierra sha256 "710f79cf150713e4e24ce03b605fcd3ea56651b58bb7afe64d8b4a948842616f" => :sierra sha256 "e6f40c95f93331dda62d7cbfe0ce4f467c17e73e4a4a05f859e29a58533b52d8" => :el_capitan end head do url "https://git-wip-us.apache.org/repos/asf/thrift.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build end 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" option "with-libevent", "Install nonblocking server libraries" depends_on "bison" => :build depends_on "boost" depends_on "openssl" depends_on "libevent" => :optional depends_on :python => :optional def install system "./bootstrap.sh" unless build.stable? exclusions = ["--without-ruby", "--disable-tests", "--without-php_extension"] exclusions << "--without-python" if build.without? "python" exclusions << "--without-haskell" if build.without? "haskell" exclusions << "--without-java" if build.without? "java" exclusions << "--without-perl" if build.without? "perl" exclusions << "--without-php" if build.without? "php" exclusions << "--without-erlang" if build.without? "erlang" ENV.cxx11 if MacOS.version >= :mavericks && ENV.compiler == :clang # Don't install extensions to /usr: ENV["PY_PREFIX"] = prefix ENV["PHP_PREFIX"] = prefix system "./configure", "--disable-debug", "--prefix=#{prefix}", "--libdir=#{lib}", "--with-openssl=#{Formula["openssl"].opt_prefix}", *exclusions ENV.deparallelize system "make" system "make", "install" end def caveats; <<~EOS To install Ruby binding: gem install thrift To install PHP extension for e.g. PHP 5.5: brew install homebrew/php/php55-thrift EOS end end