From f6dbda6d21a3c65a7895b41b4c1ed97adef1ca28 Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 6 Feb 2018 16:48:09 -0500 Subject: community/cassandra-cpp-driver: Upgrade to 2.8.0 --- community/cassandra-cpp-driver/APKBUILD | 12 +-- .../b0830f3168b73be821e564b66d7550d24bec823f.patch | 95 ++++++++++++++++++++++ 2 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 community/cassandra-cpp-driver/b0830f3168b73be821e564b66d7550d24bec823f.patch diff --git a/community/cassandra-cpp-driver/APKBUILD b/community/cassandra-cpp-driver/APKBUILD index 4e62366148..4bd98a2987 100644 --- a/community/cassandra-cpp-driver/APKBUILD +++ b/community/cassandra-cpp-driver/APKBUILD @@ -2,16 +2,17 @@ # Maintainer: Gennady Feldman pkgname=cassandra-cpp-driver _pkgreal=cpp-driver -pkgver=2.7.0 -pkgrel=1 +pkgver=2.8.0 +pkgrel=0 pkgdesc="Cassandra CPP Driver" url="http://datastax.github.io/cpp-driver/" arch="x86_64 x86 ppc64le" license="Apache-2.0" -depends= +depends="" makedepends="cmake make libressl-dev libuv-dev" subpackages="$pkgname-dev" -source="$_pkgreal-$pkgver.tar.gz::https://github.com/datastax/cpp-driver/archive/$pkgver.tar.gz" +source="$_pkgreal-$pkgver.tar.gz::https://github.com/datastax/cpp-driver/archive/$pkgver.tar.gz + b0830f3168b73be821e564b66d7550d24bec823f.patch" builddir="$srcdir/$_pkgreal-$pkgver" build() { @@ -30,4 +31,5 @@ package() { make -C "$builddir"/build DESTDIR="$pkgdir" install || return 1 } -sha512sums="0b674c804ccc56369fc984055b88b2768a80b15925e65ffd7262ca2aa45bcd966215cecf3281d1429b8efb8e5a35be580cbb21e4abb3367190329d0f41f5c50b cpp-driver-2.7.0.tar.gz" +sha512sums="373f5e462053768c9d092f4621f8d78d94a7736770740d8b1366a4fc233c83de4dee952a58e1c6a29a599810bd3701ebbd16b8c02ebdc54a80fb5885494a7e0e cpp-driver-2.8.0.tar.gz +46290a29141606028f9260c0d2f8ece465391fe5e6c047865330c4622ce8a70ae920a5664214df6a179dbafeefe08af1145945f3a2a1f04100f04b6f65cbfb2d b0830f3168b73be821e564b66d7550d24bec823f.patch" diff --git a/community/cassandra-cpp-driver/b0830f3168b73be821e564b66d7550d24bec823f.patch b/community/cassandra-cpp-driver/b0830f3168b73be821e564b66d7550d24bec823f.patch new file mode 100644 index 0000000000..4140a756e4 --- /dev/null +++ b/community/cassandra-cpp-driver/b0830f3168b73be821e564b66d7550d24bec823f.patch @@ -0,0 +1,95 @@ +From b0830f3168b73be821e564b66d7550d24bec823f Mon Sep 17 00:00:00 2001 +From: David Carlier +Date: Thu, 9 Nov 2017 20:53:20 +0000 +Subject: [PATCH] Fixing build with LibreSSL + +--- + src/ssl/ring_buffer_bio.cpp | 6 +++--- + src/ssl/ring_buffer_bio.hpp | 4 ++-- + src/ssl/ssl_openssl_impl.cpp | 6 +++--- + 3 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/ssl/ring_buffer_bio.cpp b/src/ssl/ring_buffer_bio.cpp +index 862d1445..fa2e1a9f 100644 +--- a/src/ssl/ring_buffer_bio.cpp ++++ b/src/ssl/ring_buffer_bio.cpp +@@ -43,7 +43,7 @@ + + #include + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #define BIO_set_data(b, p) ((b)->ptr = p) + #define BIO_get_shutdown(b) ((b)->shutdown) + #define BIO_set_shutdown(b, s) ((b)->shutdown = s) +@@ -53,7 +53,7 @@ + namespace cass { + namespace rb { + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + const BIO_METHOD RingBufferBio::method_ = { + BIO_TYPE_MEM, + "ring buffer", +@@ -86,7 +86,7 @@ void RingBufferBio::initialize() { + BIO* RingBufferBio::create(RingBufferState* state) { + // The const_cast doesn't violate const correctness. OpenSSL's usage of + // BIO_METHOD is effectively const but BIO_new() takes a non-const argument. +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + BIO* bio = BIO_new(const_cast(&method_)); + #else + BIO* bio = BIO_new(method_); +diff --git a/src/ssl/ring_buffer_bio.hpp b/src/ssl/ring_buffer_bio.hpp +index dffb6b9e..766320d3 100644 +--- a/src/ssl/ring_buffer_bio.hpp ++++ b/src/ssl/ring_buffer_bio.hpp +@@ -47,7 +47,7 @@ + #include + #include + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #define BIO_get_data(b) ((b)->ptr) + #endif + +@@ -89,7 +89,7 @@ class RingBufferBio { + static int gets(BIO* bio, char* out, int size); + static long ctrl(BIO* bio, int cmd, long num, void* ptr); + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + static const BIO_METHOD method_; + #else + static BIO_METHOD *method_; +diff --git a/src/ssl/ssl_openssl_impl.cpp b/src/ssl/ssl_openssl_impl.cpp +index 7ead6755..1ec0b60b 100644 +--- a/src/ssl/ssl_openssl_impl.cpp ++++ b/src/ssl/ssl_openssl_impl.cpp +@@ -28,7 +28,7 @@ + + #define DEBUG_SSL 0 + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #define ASN1_STRING_get0_data ASN1_STRING_data + #else + #define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE SSL_F_USE_CERTIFICATE_CHAIN_FILE +@@ -171,7 +171,7 @@ static int SSL_CTX_use_certificate_chain_bio(SSL_CTX* ctx, BIO* in) { + int r; + unsigned long err; + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + if (ctx->extra_certs != NULL) { + sk_X509_pop_free(ctx->extra_certs, X509_free); + ctx->extra_certs = NULL; +@@ -181,7 +181,7 @@ static int SSL_CTX_use_certificate_chain_bio(SSL_CTX* ctx, BIO* in) { + #endif + + while ((ca = PEM_read_bio_X509(in, NULL, pem_password_callback, NULL)) != NULL) { +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + r = SSL_CTX_add_extra_chain_cert(ctx, ca); + #else + r = SSL_CTX_add0_chain_cert(ctx, ca); -- cgit v1.2.3