Skip to content

Commit

Permalink
libcouchbase 2.8.1
Browse files Browse the repository at this point in the history
make libevent required instead of recommended

Closes #18331.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information
avsej authored and ilovezfs committed Sep 20, 2017
1 parent 31abbd5 commit fd2f6c7
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Formula/libcouchbase.rb
@@ -1,8 +1,8 @@
class Libcouchbase < Formula
desc "C library for Couchbase"
homepage "https://developer.couchbase.com/documentation/server/4.5/sdk/c/start-using-sdk.html"
url "https://s3.amazonaws.com/packages.couchbase.com/clients/c/libcouchbase-2.8.0.tar.gz"
sha256 "862ed3fd01938d872782f1a96b318d517c3015ef1b1183cdcf5b2098a1d4705b"
url "https://s3.amazonaws.com/packages.couchbase.com/clients/c/libcouchbase-2.8.1.tar.gz"
sha256 "b48c72b5c407ae0f31ec0634b2d31c3e034f1fcec58c60dd14b711ddca55d214"
head "https://github.com/couchbase/libcouchbase.git"

bottle do
Expand All @@ -13,27 +13,21 @@ class Libcouchbase < Formula
end

option "with-libev", "Build libev plugin"
option "without-libevent", "Do not build libevent plugin"

deprecated_option "with-libev-plugin" => "with-libev"
deprecated_option "without-libevent-plugin" => "without-libevent"

depends_on "libev" => :optional
depends_on "libuv" => :optional
depends_on "libevent" => :recommended
depends_on "libevent"
depends_on "openssl"
depends_on "cmake" => :build

def install
args = std_cmake_args
args << "-DLCB_NO_TESTS=1"
args = std_cmake_args << "-DLCB_NO_TESTS=1" << "-DLCB_BUILD_LIBEVENT=ON"

["libev", "libevent", "libuv"].each do |dep|
["libev", "libuv"].each do |dep|
args << "-DLCB_BUILD_#{dep.upcase}=" + (build.with?(dep) ? "ON" : "OFF")
end
if build.without?("libev") && build.without?("libuv") && build.without?("libevent")
args << "-DLCB_NO_PLUGINS=1"
end

mkdir "LCB-BUILD" do
system "cmake", "..", *args
Expand Down

0 comments on commit fd2f6c7

Please sign in to comment.