aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mongo-c-driver
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-04-06 11:18:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-04-06 11:19:11 +0000
commit74ac27321ca7841b7f70f3bba57a7cfcda9610e3 (patch)
treea4d1a3cd1041a0d279cb59bc94a732026f7d7fe9 /testing/mongo-c-driver
parent01957a06be87913408b44130c65b2284b8ed5de5 (diff)
downloadaports-74ac27321ca7841b7f70f3bba57a7cfcda9610e3.tar.bz2
aports-74ac27321ca7841b7f70f3bba57a7cfcda9610e3.tar.xz
testing/mongo-c-driver: upgrade to 1.9.3
Diffstat (limited to 'testing/mongo-c-driver')
-rw-r--r--testing/mongo-c-driver/APKBUILD13
-rw-r--r--testing/mongo-c-driver/libressl-2.7.patch52
2 files changed, 60 insertions, 5 deletions
diff --git a/testing/mongo-c-driver/APKBUILD b/testing/mongo-c-driver/APKBUILD
index 65c0d0165a..5663509c08 100644
--- a/testing/mongo-c-driver/APKBUILD
+++ b/testing/mongo-c-driver/APKBUILD
@@ -1,17 +1,17 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=mongo-c-driver
-pkgver=1.9.2
-pkgrel=1
+pkgver=1.9.3
+pkgrel=0
pkgdesc="Client library written in C for MongoDB"
url="https://github.com/mongodb/mongo-c-driver"
arch="all !x86 !armhf" # testsuite fails on x86 and armhf
license="Apache-2.0"
-depends=
depends_dev="libressl-dev snappy-dev zlib-dev"
makedepends="$depends_dev autoconf automake libbson-dev libtool py3-sphinx"
install=
subpackages="$pkgname-dev $pkgname-doc"
-source="https://github.com/mongodb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
+source="https://github.com/mongodb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
+ libressl-2.7.patch"
builddir="$srcdir/$pkgname-$pkgver"
case "$CARCH" in
@@ -21,11 +21,13 @@ 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 \
@@ -44,4 +46,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="25fd78e23300c56dd72becd64bd47573e0c2ed9c5d2af1a917c2dbbfeea69054cc9c6eed6965be20aa325fa68a5c37791495cad44a164134868fa2ae823ea2ef mongo-c-driver-1.9.2.tar.gz"
+sha512sums="2c3f915c4f367f5614a904741b4b480896dd521b7039158b2f421d0d7579a45862d5099cd26b6d14cb088f9db49019538aca553c5cf72d9706ec9ab6516ff40a mongo-c-driver-1.9.3.tar.gz
+5bd714ac7123fcd08853a65029f207c61961cf8d9d0acc292cc00c0e6d1ecf6da20640257408a9d85604434230d231a7725f83c2c6ad467b13c81c4731e66a45 libressl-2.7.patch"
diff --git a/testing/mongo-c-driver/libressl-2.7.patch b/testing/mongo-c-driver/libressl-2.7.patch
new file mode 100644
index 0000000000..0839350ae6
--- /dev/null
+++ b/testing/mongo-c-driver/libressl-2.7.patch
@@ -0,0 +1,52 @@
+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)
+ {