From 5f531b41f25694a64b90938f378d592b150dcd37 Mon Sep 17 00:00:00 2001 From: Valery Kartel Date: Wed, 22 Mar 2017 01:35:57 +0200 Subject: community/libcouchbase: moved from testing - would be need to build community/php7-couchbase --- community/libcouchbase/APKBUILD | 81 ++++++++++++++++++++++ .../libcouchbase/disable_git_version_check.patch | 37 ++++++++++ community/libcouchbase/fix_snappy.patch | 12 ++++ community/libcouchbase/fix_socktest.patch | 11 +++ 4 files changed, 141 insertions(+) create mode 100644 community/libcouchbase/APKBUILD create mode 100644 community/libcouchbase/disable_git_version_check.patch create mode 100644 community/libcouchbase/fix_snappy.patch create mode 100644 community/libcouchbase/fix_socktest.patch (limited to 'community') diff --git a/community/libcouchbase/APKBUILD b/community/libcouchbase/APKBUILD new file mode 100644 index 0000000000..aa3b310e52 --- /dev/null +++ b/community/libcouchbase/APKBUILD @@ -0,0 +1,81 @@ +# Contributor: Nathan Johnson +# Maintainer: Nathan Johnson +pkgname=libcouchbase +pkgver=2.7.3 +pkgrel=0 +pkgdesc="C client library for Couchbase" +url="https://developer.couchbase.com/community" +arch="all" +license="ASL 2.0" +depends= +depends_dev="musl-dev libressl-dev snappy-dev" +makedepends="$depends_dev cmake perl libtool libev-dev libevent-dev libuv-dev" +subpackages="$pkgname-dev $pkgname-bin $pkgname-doc $pkgname-libevent $pkgname-libev $pkgname-libuv" +source="$pkgname-$pkgver.tar.gz::https://github.com/couchbase/libcouchbase/archive/$pkgver.tar.gz + disable_git_version_check.patch + fix_snappy.patch + fix_socktest.patch" +builddir="$srcdir/$pkgname-$pkgver" + +build() { + mkdir "$builddir"/build + cd "$builddir"/build + ../cmake/configure \ + --prefix=/usr \ + --disable-couchbasemock \ + || return 1 + make +} + +check() { + cd "$builddir"/build + ctest +} + +package() { + make -C "$builddir"/build install DESTDIR="$pkgdir" || return 1 +} + +dev() { + default_dev || return 1 + mv "$subpkgdir"/usr/bin/cbc-write-config \ + "$pkgdir"/usr/bin || return 1 + rmdir "$subpkgdir"/usr/bin +} + +libevent() { + pkgdesc="$pkgdesc (libevent backend)" + depends="$pkgname libevent" + + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libcouchbase_libevent.so "$subpkgdir"/usr/lib +} + +libev() { + pkgdesc="$pkgdesc (libev backend)" + depends="$pkgname libev" + + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libcouchbase_libev.so "$subpkgdir"/usr/lib +} + +libuv() { + pkgdesc="$pkgdesc (libuv backend)" + depends="$pkgname libuv" + + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libcouchbase_libuv.so "$subpkgdir"/usr/lib +} + +bin() { + pkgdesc="$pkgdesc (command line utilities)" + depends="$pkgname" + + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ +} + +sha512sums="606969bfd49a285ae0c0b60b2f6823f0dad85c94a3597bf8f0205f10b25ca9f205a335f5bde20ccf11d010a42bd9c0bbe6599ae58851ac7a402c065168f04c01 libcouchbase-2.7.3.tar.gz +987b76b9c8a38a1f144bcada3c24192b30b352c993c433f4a2a1e381b765ae6bb845ebc6393c794da1b4efbb68fd1d34b027104fecf5c9bcc29b0f58c7f6a474 disable_git_version_check.patch +9023fe6c0d88577f40598f201be121012199167e9eef7e99da29664d23fd5e0c488fad2eda88ed3b30ea089b60e760c1b472bb46bb0804b5f7bb7091f0d8a2ed fix_snappy.patch +72319b86fdd91728723ccb091e72199788a84e2ec9ea12c0fcd1ed686eb155ec11e0addbff96735f83e7f31764a85650f0483b6e76d3a8bee16f71b2751fe4a9 fix_socktest.patch" diff --git a/community/libcouchbase/disable_git_version_check.patch b/community/libcouchbase/disable_git_version_check.patch new file mode 100644 index 0000000000..438e37b8c4 --- /dev/null +++ b/community/libcouchbase/disable_git_version_check.patch @@ -0,0 +1,37 @@ +--- a/cmake/Modules/GetVersionInfo.cmake ++++ b/cmake/Modules/GetVersionInfo.cmake +@@ -7,34 +7,6 @@ + # LCB_VERSION_MINOR + # LCB_VERSION_PATCH + +-## Try git first ## +-FIND_PROGRAM(GIT_EXECUTABLE NAMES git git.exe) +-MACRO(RUNGIT outvar) +- EXECUTE_PROCESS(COMMAND git ${ARGN} +- OUTPUT_VARIABLE ${outvar} +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +- OUTPUT_STRIP_TRAILING_WHITESPACE) +-ENDMACRO() +- +-if (GIT_EXECUTABLE) +- RUNGIT(LCB_REVDESCRIBE describe --long) +- RUNGIT(LCB_VERSION describe) +- STRING(REPLACE "-" "_" LCB_VERSION "${LCB_VERSION}") +- MESSAGE(STATUS "Sanitized VERSION=${LCB_VERSION}") +- RUNGIT(LCB_VERSION_CHANGESET rev-parse HEAD) +- +- EXECUTE_PROCESS( +- COMMAND echo ${LCB_VERSION} +- COMMAND awk -F. "{printf \"0x%0.2d%0.2d%0.2d\", $1, $2, $3}" +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +- OUTPUT_VARIABLE LCB_VERSION_HEX) +-ENDIF() +- +-IF(LCB_VERSION) +- # Have the version information +- CONFIGURE_FILE(${LCB_GENINFODIR}/distinfo.cmake.in ${LCB_GENINFODIR}/distinfo.cmake) +-ENDIF() +- + # library version + IF(NOT LCB_VERSION AND EXISTS ${LCB_GENINFODIR}/distinfo.cmake) + INCLUDE(${LCB_GENINFODIR}/distinfo.cmake) diff --git a/community/libcouchbase/fix_snappy.patch b/community/libcouchbase/fix_snappy.patch new file mode 100644 index 0000000000..5e4281b186 --- /dev/null +++ b/community/libcouchbase/fix_snappy.patch @@ -0,0 +1,12 @@ +--- a/cmake/configure ++++ b/cmake/configure +@@ -287,6 +287,9 @@ + } + if ($NO_SNAPPY) { + push @CM_OPTIONS, "-DLCB_NO_SNAPPY=1"; ++} else { ++ # the cmake options default NO_SNAPPY to ON, so this is necessary ++ push @CM_OPTIONS, "-DLCB_NO_SNAPPY=0"; + } + if ($ENABLE_SNAPPY) { + push @CM_OPTIONS, "-DLCB_NO_SNAPPY=0"; diff --git a/community/libcouchbase/fix_socktest.patch b/community/libcouchbase/fix_socktest.patch new file mode 100644 index 0000000000..2ee7cc68b0 --- /dev/null +++ b/community/libcouchbase/fix_socktest.patch @@ -0,0 +1,11 @@ +--- libcouchbase-2.5.6/tests/socktests/t_basic.cc ++++ libcouchbase-2.5.6-2/tests/socktests/t_basic.cc +@@ -48,7 +49,7 @@ + + static bool isRefused(lcbio_OSERR err) + { +- if (err == ECONNREFUSED || err == ECONNABORTED) { ++ if (err == ECONNREFUSED || err == ECONNABORTED || err == EAFNOSUPPORT) { + return true; + } + #ifdef _WIN32 -- cgit v1.2.3