diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 13:09:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 16:46:16 +0000 |
commit | 54b3bea757deafa6c7fc09bb1fa6a1ed973767bc (patch) | |
tree | 84db16e6ab5bc05a9f61d2ec33a0892227f420c7 /testing | |
parent | c887d7741921890f1e05a1b7fd6ac7c6092d1ce0 (diff) | |
download | aports-54b3bea757deafa6c7fc09bb1fa6a1ed973767bc.tar.bz2 aports-54b3bea757deafa6c7fc09bb1fa6a1ed973767bc.tar.xz |
testing/mongo-c-driver: upgrade to 1.13.0
libbson is merged into mongo-c-driver upstream so we provide libbson
from mongo-c-driver.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libbson/APKBUILD | 46 | ||||
-rw-r--r-- | testing/mongo-c-driver/APKBUILD | 61 | ||||
-rw-r--r-- | testing/mongo-c-driver/generate_uninstall.patch | 13 | ||||
-rw-r--r-- | testing/mongo-c-driver/libressl-2.7.patch | 52 |
4 files changed, 49 insertions, 123 deletions
diff --git a/testing/libbson/APKBUILD b/testing/libbson/APKBUILD deleted file mode 100644 index 2775e8354f..0000000000 --- a/testing/libbson/APKBUILD +++ /dev/null @@ -1,46 +0,0 @@ -# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> -pkgname=libbson -pkgver=1.9.5 -pkgrel=0 -pkgdesc="routines related to building, parsing, and iterating BSON documents" -url="https://github.com/mongodb/libbson" -arch="all" -license="Apache-2.0" -depends= -depends_dev= -makedepends="$depends_dev autoconf automake libtool py3-sphinx" -checkdepends="bash" -install= -subpackages="$pkgname-dev $pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/mongodb/$pkgname/archive/$pkgver.tar.gz" - -builddir="$srcdir/$pkgname-$pkgver" - -prepare() { - cd "$builddir" - NOCONFIGURE=1 ./autogen.sh -} - -build() { - cd "$builddir" - SPHINX_BUILD=/usr/bin/sphinx-build-3 ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --enable-man-pages=yes \ - --enable-tests=yes - make -} - -check() { - cd "$builddir" - make TEST_ARGS=--no-fork check -} - -package() { - cd "$builddir" - make DESTDIR="$pkgdir" install -} - -sha512sums="14bc75989baac550f42939ea161fa7872b950e5b669dc8f19e897f0783b04e0212e5e722b3fcdf946308b9a68bc066502ed8238dad92e342e5f49b8b2cc8f484 libbson-1.9.5.tar.gz" diff --git a/testing/mongo-c-driver/APKBUILD b/testing/mongo-c-driver/APKBUILD index 934320f74b..1bc9626d0c 100644 --- a/testing/mongo-c-driver/APKBUILD +++ b/testing/mongo-c-driver/APKBUILD @@ -1,17 +1,16 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=mongo-c-driver -pkgver=1.9.3 -pkgrel=1 +pkgver=1.13.0 +pkgrel=0 pkgdesc="Client library written in C for MongoDB" url="https://github.com/mongodb/mongo-c-driver" arch="all !x86 !armhf !armv7" # testsuite fails on x86 and armhf license="Apache-2.0" -depends_dev="libressl-dev snappy-dev zlib-dev" -makedepends="$depends_dev autoconf automake libbson-dev libtool py3-sphinx" -install= -subpackages="$pkgname-dev $pkgname-doc" +makedepends="openssl-dev snappy-dev zlib-dev libtool py3-sphinx cmake" +subpackages="$pkgname-dev $pkgname-doc libbson" source="https://github.com/mongodb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz - libressl-2.7.patch" + generate_uninstall.patch + " builddir="$srcdir/$pkgname-$pkgver" case "$CARCH" in @@ -20,31 +19,43 @@ case "$CARCH" in esac build() { - cd "$builddir" - autoreconf -vif - SPHINX_BUILD=/usr/bin/sphinx-build-3 ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --enable-ssl=libressl \ - --enable-man-pages=yes \ - --enable-tests=yes \ - --disable-automatic-init-and-cleanup \ - --with-libbson=system \ - --with-zlib=system + mkdir -p "$srcdir"/build + cd "$srcdir"/build + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DENABLE_BSON:STRING=ON \ + -DENABLE_MONGOC:BOOL=ON \ + -DENABLE_SSL:STRING=OPENSSL \ + -DENABLE_AUTOMATIC_INIT_AND_CLEANUP:BOOL=OFF \ + -DENABLE_MAN_PAGES:BOOL=ON \ + -DENABLE_TESTS:BOOL=ON \ + -DENABLE_EXAMPLES:BOOL=OFF \ + -DSPHINX_EXECUTABLE:STRING=/usr/bin/sphinx-build-3 \ + -DCMAKE_SKIP_RPATH=ON \ + "$builddir" make } check() { - cd "$builddir" - MONGOC_TEST_SKIP_LIVE=on make check + cd "$srcdir"/build + export MONGOC_TEST_SKIP_MOCK=on + export MONGOC_TEST_SKIP_SLOW=on + export MONGOC_TEST_SKIP_LIVE=on + make check } package() { - cd "$builddir" + cd "$srcdir"/build make DESTDIR="$pkgdir" install } -sha512sums="2c3f915c4f367f5614a904741b4b480896dd521b7039158b2f421d0d7579a45862d5099cd26b6d14cb088f9db49019538aca553c5cf72d9706ec9ab6516ff40a mongo-c-driver-1.9.3.tar.gz -5bd714ac7123fcd08853a65029f207c61961cf8d9d0acc292cc00c0e6d1ecf6da20640257408a9d85604434230d231a7725f83c2c6ad467b13c81c4731e66a45 libressl-2.7.patch" +libbson() { + pkgdesc="Building, parsing, and iterating BSON documents" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libbson-* "$subpkgdir"/usr/lib/ +} + +sha512sums="01b17857a1cb843b133975594772c094edecb6c149d8628eaa42de1855152185114186d0e8d829e99c9106c133018b1242e34e3ac511a36b2b7a38baea5f5aba mongo-c-driver-1.13.0.tar.gz +494800bb53585f2b911b672263d32e2af1ce818bbff55623fde8c06477429010e9ca31b905175a08d1554499c497af6514f74c9071f4f9d9b2d82077d6ddad4f generate_uninstall.patch" diff --git a/testing/mongo-c-driver/generate_uninstall.patch b/testing/mongo-c-driver/generate_uninstall.patch new file mode 100644 index 0000000000..1434ae4283 --- /dev/null +++ b/testing/mongo-c-driver/generate_uninstall.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f7a0dfe..d63b93e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -347,7 +347,7 @@ set (UNINSTALL_PROG_DIR "${CMAKE_INSTALL_FULL_DATADIR}/mongo-c-driver") + # + # This needs to be last (after all other add_subdirectory calls) to ensure that + # the generated uninstall program is complete and correct +-add_subdirectory (generate_uninstall) ++# add_subdirectory (generate_uninstall) + + add_custom_target (uninstall + COMMAND "${UNINSTALL_PROG_DIR}/${UNINSTALL_PROG}" diff --git a/testing/mongo-c-driver/libressl-2.7.patch b/testing/mongo-c-driver/libressl-2.7.patch deleted file mode 100644 index 0839350ae6..0000000000 --- a/testing/mongo-c-driver/libressl-2.7.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/src/mongoc/mongoc-stream-tls-openssl-bio.c b/src/mongoc/mongoc-stream-tls-openssl-bio.c -index 053439b..0379a5d 100644 ---- a/src/mongoc/mongoc-stream-tls-openssl-bio.c -+++ b/src/mongoc/mongoc-stream-tls-openssl-bio.c -@@ -39,7 +39,7 @@ - #define MONGOC_LOG_DOMAIN "stream-tls-openssl-bio" - - --#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) - - /* Magic vtable to make our BIO shim */ - static BIO_METHOD gMongocStreamTlsOpenSslRawMethods = { -diff --git a/src/mongoc/mongoc-stream-tls-openssl.c b/src/mongoc/mongoc-stream-tls-openssl.c -index fd1800b..bccae22 100644 ---- a/src/mongoc/mongoc-stream-tls-openssl.c -+++ b/src/mongoc/mongoc-stream-tls-openssl.c -@@ -45,7 +45,7 @@ - - #define MONGOC_STREAM_TLS_OPENSSL_BUFFER_SIZE 4096 - --#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) - static void - BIO_meth_free (BIO_METHOD *meth) - { -diff --git a/build/autotools/CheckSSL.m4 b/build/autotools/CheckSSL.m4 -index 95979c7..03576f5 100644 ---- a/build/autotools/CheckSSL.m4 -+++ b/build/autotools/CheckSSL.m4 -@@ -34,7 +34,7 @@ AS_IF([test "$enable_ssl" != "no"],[ - ]) - ]) - AS_IF([test "$enable_ssl" = "libressl"],[ -- PKG_CHECK_MODULES(SSL, [libtls], [enable_ssl=libressl], [ -+ PKG_CHECK_MODULES(SSL, [libtls libcrypto], [enable_ssl=libressl], [ - AC_CHECK_LIB([tls],[tls_init],[ - SSL_LIBS="-ltls -lcrypto" - enable_ssl=libressl -diff --git a/src/mongoc/mongoc-crypto-openssl.c b/src/mongoc/mongoc-crypto-openssl.c -index 1b2552c..0e248e7 100644 ---- a/src/mongoc/mongoc-crypto-openssl.c -+++ b/src/mongoc/mongoc-crypto-openssl.c -@@ -38,7 +38,7 @@ mongoc_crypto_openssl_hmac_sha1 (mongoc_crypto_t *crypto, - HMAC (EVP_sha1 (), key, key_len, d, n, md, NULL); - } - --#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) - EVP_MD_CTX * - EVP_MD_CTX_new (void) - { |