homebrew-core/Formula/libcouchbase.rb
2014-07-03 22:33:23 +01:00

45 lines
1.3 KiB
Ruby

require 'formula'
class Libcouchbase < Formula
homepage 'http://couchbase.com/communities/c'
url 'http://packages.couchbase.com/clients/c/libcouchbase-2.3.1.tar.gz'
sha1 '0718239fc53f13315adfe80baffe439abe600296'
bottle do
sha1 "a77b5907f6b69ab96464a99b6249db7eafdf8c22" => :mavericks
sha1 "062ade4302939f40c2060775a739be1203f49226" => :mountain_lion
sha1 "45bd1a2709a57ec640b4f595ca54984027119ff2" => :lion
end
option :universal
option 'with-libev-plugin', 'Build libev IO plugin (will pull libev dependency)'
option 'without-libevent-plugin', 'Do not build libevent plugin (will remove libevent dependency)'
depends_on 'libev' if build.with?('libev-plugin')
depends_on 'libevent' if build.with?('libevent-plugin')
def install
args = [
"--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-examples",
"--disable-tests", # don't download google-test framework
"--disable-couchbasemock"
]
if build.universal?
args << "--enable-fat-binary"
ENV.universal_binary
end
if build.without?('libev-plugin') && build.without?("libevent-plugin")
# do not do plugin autodiscovery
args << "--disable-plugins"
end
system "./configure", *args
system "make install"
end
test do
system "#{bin}/cbc", "version"
end
end