libcouchbase: new formula for libcouchbase3

Closes #55351.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
master
Brett Lawson 2020-05-27 10:35:05 -07:00 committed by Sean Molenaar
parent 1cf3f00233
commit 6c138aaee8
3 changed files with 35 additions and 10 deletions

1
Aliases/libcouchbase@3 Symbolic link
View File

@ -0,0 +1 @@
../Formula/libcouchbase.rb

View File

@ -1,16 +1,10 @@
class Libcouchbase < Formula class Libcouchbase < Formula
desc "C library for Couchbase" desc "C library for Couchbase"
homepage "https://docs.couchbase.com/c-sdk/2.10/start-using-sdk.html" homepage "https://docs.couchbase.com/c-sdk/3.0/hello-world/start-using-sdk.html"
url "https://packages.couchbase.com/clients/c/libcouchbase-2.10.6.tar.gz" url "https://packages.couchbase.com/clients/c/libcouchbase-3.0.1.tar.gz"
sha256 "341d7af60d637c81a4de623168746b699f49a75358aa33d9b1b99dd0a63a7cf3" sha256 "488cd906450c797b014910f5b9239cf1e14c7e0f94d3b7dc5f9cfb76ce1085b1"
head "https://github.com/couchbase/libcouchbase.git" head "https://github.com/couchbase/libcouchbase.git"
bottle do
sha256 "5c6c76de5524a1c134742d55139d3b33b64e010bd075ad3ff712cde4ac1a1427" => :catalina
sha256 "df795c015e0df35ccb86a87140495fc22d20c3195ee5cc572e4e25190c312905" => :mojave
sha256 "7e8649078c32b18513cd08d47358c44e0719d0545024267c42582885f7d225b2" => :high_sierra
end
depends_on "cmake" => :build depends_on "cmake" => :build
depends_on "libev" depends_on "libev"
depends_on "libevent" depends_on "libevent"
@ -29,6 +23,7 @@ class Libcouchbase < Formula
end end
test do test do
system "#{bin}/cbc", "version" assert_match /LCB_ERR_CONNECTION_REFUSED/,
shell_output("#{bin}/cbc cat document_id -U couchbase://localhost:1 2>&1", 1).strip
end end
end end

29
Formula/libcouchbase@2.rb Normal file
View File

@ -0,0 +1,29 @@
class LibcouchbaseAT2 < Formula
desc "C library for Couchbase"
homepage "https://docs.couchbase.com/c-sdk/2.10/start-using-sdk.html"
url "https://packages.couchbase.com/clients/c/libcouchbase-2.10.6.tar.gz"
sha256 "341d7af60d637c81a4de623168746b699f49a75358aa33d9b1b99dd0a63a7cf3"
keg_only :versioned_formula
depends_on "cmake" => :build
depends_on "libev"
depends_on "libevent"
depends_on "libuv"
depends_on "openssl@1.1"
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args,
"-DLCB_NO_TESTS=1",
"-DLCB_BUILD_LIBEVENT=ON",
"-DLCB_BUILD_LIBEV=ON",
"-DLCB_BUILD_LIBUV=ON"
system "make", "install"
end
end
test do
assert_match /LCB_ECONNREFUSED/,
shell_output("#{bin}/cbc cat document_id -U couchbase://localhost:1 2>&1", 1).strip
end
end