summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2017-06-29 13:50:02 -0700
committerPatrick McLean <chutzpah@gentoo.org>2017-06-29 13:50:27 -0700
commitd8579d0f043e8eefe774b8aec6a21316e0a6c527 (patch)
treefccef8a3e57b4d92bd16e1b9bfba1c6a0b03dd8d /net-nds/openldap
parentdev-ml/ocaml-extunix: bump to 0.1.5 (diff)
downloadgentoo-d8579d0f043e8eefe774b8aec6a21316e0a6c527.tar.gz
gentoo-d8579d0f043e8eefe774b8aec6a21316e0a6c527.tar.bz2
gentoo-d8579d0f043e8eefe774b8aec6a21316e0a6c527.zip
net-nds/openldap: Add patch to build with libressl-2.5.4 and call to epatch_user
Patch pulled from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219781 Gentoo-Bug: 622464 Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'net-nds/openldap')
-rw-r--r--net-nds/openldap/files/openldap-2.4.45-libressl.patch65
-rw-r--r--net-nds/openldap/openldap-2.4.45.ebuild5
2 files changed, 70 insertions, 0 deletions
diff --git a/net-nds/openldap/files/openldap-2.4.45-libressl.patch b/net-nds/openldap/files/openldap-2.4.45-libressl.patch
new file mode 100644
index 000000000000..20a65a4e0fd1
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.45-libressl.patch
@@ -0,0 +1,65 @@
+--- libraries/libldap/tls_o.c.orig 2017-06-04 16:31:28 UTC
++++ libraries/libldap/tls_o.c
+@@ -47,7 +47,7 @@
+ #include <ssl.h>
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000
++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+ #define ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
+ #endif
+
+@@ -157,7 +157,7 @@ tlso_init( void )
+ (void) tlso_seed_PRNG( lo->ldo_tls_randfile );
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ SSL_load_error_strings();
+ SSL_library_init();
+ OpenSSL_add_all_digests();
+@@ -205,7 +205,7 @@ static void
+ tlso_ctx_ref( tls_ctx *ctx )
+ {
+ tlso_ctx *c = (tlso_ctx *)ctx;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ #define SSL_CTX_up_ref(ctx) CRYPTO_add( &(ctx->references), 1, CRYPTO_LOCK_SSL_CTX )
+ #endif
+ SSL_CTX_up_ref( c );
+@@ -464,7 +464,7 @@ tlso_session_my_dn( tls_session *sess, struct berval *
+ if (!x) return LDAP_INVALID_CREDENTIALS;
+
+ xn = X509_get_subject_name(x);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ der_dn->bv_len = i2d_X509_NAME( xn, NULL );
+ der_dn->bv_val = xn->bytes->data;
+ #else
+@@ -500,7 +500,7 @@ tlso_session_peer_dn( tls_session *sess, struct berval
+ return LDAP_INVALID_CREDENTIALS;
+
+ xn = X509_get_subject_name(x);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ der_dn->bv_len = i2d_X509_NAME( xn, NULL );
+ der_dn->bv_val = xn->bytes->data;
+ #else
+@@ -721,7 +721,7 @@ struct tls_data {
+ Sockbuf_IO_Desc *sbiod;
+ };
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ #define BIO_set_init(b, x) b->init = x
+ #define BIO_set_data(b, x) b->ptr = x
+ #define BIO_clear_flags(b, x) b->flags &= ~(x)
+@@ -822,7 +822,7 @@ tlso_bio_puts( BIO *b, const char *str )
+ return tlso_bio_write( b, str, strlen( str ) );
+ }
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000
++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+ struct bio_method_st {
+ int type;
+ const char *name;
diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.45.ebuild
index e81d3543054c..0ead191e5409 100644
--- a/net-nds/openldap/openldap-2.4.45.ebuild
+++ b/net-nds/openldap/openldap-2.4.45.ebuild
@@ -344,10 +344,15 @@ src_prepare() {
# bug #420959
epatch "${FILESDIR}"/${PN}-2.4.31-gcc47.patch
+ # bug #622464
+ epatch "${FILESDIR}"/${PN}-2.4.45-libressl.patch
+
# unbundle lmdb
epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch
rm -rf "${S}"/libraries/liblmdb
+ epatch_user
+
cd "${S}"/build || die
einfo "Making sure upstream build strip does not do stripping too early"
sed -i.orig \