commit:     c3de07e5236962952d47815e6ab96c46cd38dfd0
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 20 16:24:17 2018 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Fri Apr 20 16:24:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3de07e5

net-libs/gsoap: compatibility patch for LibreSSL

This patch fixes building with dev-libs/libressl-2.6.4.  This patch will
not be needed once dev-libs/libressl-2.7.x goes stable.  Additionally,
fix slot/subslot modifier to ensure rebuilds are trigged for API
changes.

Closes: https://bugs.gentoo.org/617264
Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../gsoap-2.8.51-libressl-2.6-compatibility.patch  | 38 ++++++++++++++++++++++
 net-libs/gsoap/gsoap-2.8.51.ebuild                 |  7 ++--
 2 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/net-libs/gsoap/files/gsoap-2.8.51-libressl-2.6-compatibility.patch 
b/net-libs/gsoap/files/gsoap-2.8.51-libressl-2.6-compatibility.patch
new file mode 100644
index 00000000000..8f13a39d32c
--- /dev/null
+++ b/net-libs/gsoap/files/gsoap-2.8.51-libressl-2.6-compatibility.patch
@@ -0,0 +1,38 @@
+--- a/gsoap/plugin/smdevp.c    2018-04-20 15:45:25.112658174 +0000
++++ b/gsoap/plugin/smdevp.c    2018-04-20 15:47:58.826360980 +0000
+@@ -479,7 +479,7 @@
+   /* allocate and init the OpenSSL HMAC or EVP_MD context */
+   if ((alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC)
+   {
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+     data->ctx = (void*)SOAP_MALLOC(soap, sizeof(HMAC_CTX));
+     if (data->ctx)
+       HMAC_CTX_init((HMAC_CTX*)data->ctx);
+@@ -489,7 +489,7 @@
+   }
+   else
+   {
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+     data->ctx = (void*)SOAP_MALLOC(soap, sizeof(EVP_MD_CTX));
+     if (data->ctx)
+       EVP_MD_CTX_init((EVP_MD_CTX*)data->ctx);
+@@ -642,7 +642,7 @@
+       *len = (int)n;
+   }
+   /* cleanup */
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+   if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC)
+     HMAC_CTX_cleanup((HMAC_CTX*)data->ctx);
+   else
+@@ -687,7 +687,7 @@
+     }
+     if (data->ctx)
+     {
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+       if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC)
+         HMAC_CTX_cleanup((HMAC_CTX*)data->ctx);
+       else

diff --git a/net-libs/gsoap/gsoap-2.8.51.ebuild 
b/net-libs/gsoap/gsoap-2.8.51.ebuild
index 345507edae7..5dd67d3686f 100644
--- a/net-libs/gsoap/gsoap-2.8.51.ebuild
+++ b/net-libs/gsoap/gsoap-2.8.51.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -21,7 +21,7 @@ RDEPEND="
        gnutls? ( net-libs/gnutls )
        ssl? (
                !libressl? ( dev-libs/openssl:0= )
-               libressl? ( dev-libs/libressl )
+               libressl? ( dev-libs/libressl:0= )
        )
 "
 DEPEND="${RDEPEND}
@@ -41,6 +41,9 @@ src_prepare() {
        # enable shared libs https://bugs.gentoo.org/583398
        eapply "${FILESDIR}/${PN}-2.7.40-shared_libs.patch"
 
+       # fix building with libressl-2.6.x.  This will not be needed when 2.7.x 
goes stable
+       eapply "${FILESDIR}/${PN}-2.8.51-libressl-2.6-compatibility.patch"
+
        eautoreconf
 }
 

Reply via email to