net-libs/gsoap: compatibility patch for LibreSSL
authorAaron Bauman <bman@gentoo.org>
Fri, 20 Apr 2018 16:24:17 +0000 (12:24 -0400)
committerAaron Bauman <bman@gentoo.org>
Fri, 20 Apr 2018 16:24:28 +0000 (12:24 -0400)
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

net-libs/gsoap/files/gsoap-2.8.51-libressl-2.6-compatibility.patch [new file with mode: 0644]
net-libs/gsoap/gsoap-2.8.51.ebuild

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 (file)
index 0000000..8f13a39
--- /dev/null
@@ -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
index 345507edae7735e8b0fa6be6440a4557e5490326..5dd67d3686ff15ca540a2717c43b8bb23dc5d3e0 100644 (file)
@@ -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
 }