testing/mongo-c-driver: upgrade to 1.9.3

This commit is contained in:
Natanael Copa 2018-04-06 11:18:57 +00:00
parent 01957a06be
commit 74ac27321c
2 changed files with 60 additions and 5 deletions

View File

@ -1,17 +1,17 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=mongo-c-driver pkgname=mongo-c-driver
pkgver=1.9.2 pkgver=1.9.3
pkgrel=1 pkgrel=0
pkgdesc="Client library written in C for MongoDB" pkgdesc="Client library written in C for MongoDB"
url="https://github.com/mongodb/mongo-c-driver" url="https://github.com/mongodb/mongo-c-driver"
arch="all !x86 !armhf" # testsuite fails on x86 and armhf arch="all !x86 !armhf" # testsuite fails on x86 and armhf
license="Apache-2.0" license="Apache-2.0"
depends=
depends_dev="libressl-dev snappy-dev zlib-dev" depends_dev="libressl-dev snappy-dev zlib-dev"
makedepends="$depends_dev autoconf automake libbson-dev libtool py3-sphinx" makedepends="$depends_dev autoconf automake libbson-dev libtool py3-sphinx"
install= install=
subpackages="$pkgname-dev $pkgname-doc" 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" builddir="$srcdir/$pkgname-$pkgver"
case "$CARCH" in case "$CARCH" in
@ -21,11 +21,13 @@ esac
build() { build() {
cd "$builddir" cd "$builddir"
autoreconf -vif
SPHINX_BUILD=/usr/bin/sphinx-build-3 ./configure \ SPHINX_BUILD=/usr/bin/sphinx-build-3 ./configure \
--prefix=/usr \ --prefix=/usr \
--sysconfdir=/etc \ --sysconfdir=/etc \
--mandir=/usr/share/man \ --mandir=/usr/share/man \
--infodir=/usr/share/info \ --infodir=/usr/share/info \
--enable-ssl=libressl \
--enable-man-pages=yes \ --enable-man-pages=yes \
--enable-tests=yes \ --enable-tests=yes \
--disable-automatic-init-and-cleanup \ --disable-automatic-init-and-cleanup \
@ -44,4 +46,5 @@ package() {
make DESTDIR="$pkgdir" install 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"

View File

@ -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)
{