2012-01-11 10:43:18 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libcouchbase < Formula
|
2013-08-18 10:37:46 +00:00
|
|
|
homepage 'http://couchbase.com/communities/c'
|
2013-11-06 17:57:45 +00:00
|
|
|
url 'http://packages.couchbase.com/clients/c/libcouchbase-2.2.0.tar.gz'
|
|
|
|
sha1 '0d267b90b1f772c5431d3408c4c61a4b8e9de383'
|
2012-01-11 10:43:18 +00:00
|
|
|
|
2013-09-12 15:39:24 +00:00
|
|
|
option :universal
|
2012-11-27 20:44:46 +00:00
|
|
|
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)'
|
|
|
|
|
2013-09-12 15:39:24 +00:00
|
|
|
depends_on 'libev' if build.with?('libev-plugin')
|
|
|
|
depends_on 'libevent' if build.with?('libevent-plugin')
|
2012-01-11 10:43:18 +00:00
|
|
|
|
|
|
|
def install
|
2013-09-12 15:39:24 +00:00
|
|
|
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
|
2012-01-11 10:43:18 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2013-07-10 03:47:11 +00:00
|
|
|
system "#{bin}/cbc", "version"
|
2012-01-11 10:43:18 +00:00
|
|
|
end
|
|
|
|
end
|