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'
|
2014-07-30 01:51:52 +00:00
|
|
|
url 'http://packages.couchbase.com/clients/c/libcouchbase-2.4.0.tar.gz'
|
|
|
|
sha1 '3ce25fa98255967775b4aa4e5b13b7c4ff0a866e'
|
2012-01-11 10:43:18 +00:00
|
|
|
|
2014-07-03 17:36:38 +00:00
|
|
|
bottle do
|
2014-07-30 02:10:19 +00:00
|
|
|
sha1 "deea0e789aa2739016a2d9cfb2d7bf9342782775" => :mavericks
|
|
|
|
sha1 "912bb53584946c23e80cdcfb8730b8739a70af59" => :mountain_lion
|
|
|
|
sha1 "32c9ea13816908b943be75b6a677754dd26c8270" => :lion
|
2014-07-03 17:36:38 +00:00
|
|
|
end
|
|
|
|
|
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')
|
2014-07-30 01:51:52 +00:00
|
|
|
depends_on 'openssl'
|
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
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2013-07-10 03:47:11 +00:00
|
|
|
system "#{bin}/cbc", "version"
|
2012-01-11 10:43:18 +00:00
|
|
|
end
|
|
|
|
end
|