app-backup/bacula: Add patch to work with >=dev-libs/libressl-2.7
authorThomas Beierlein <tomjbe@gentoo.org>
Sun, 5 Aug 2018 07:45:12 +0000 (09:45 +0200)
committerThomas Beierlein <tomjbe@gentoo.org>
Sun, 5 Aug 2018 07:46:29 +0000 (09:46 +0200)
Apply different patches according to dev-libs/libressl version (<2.7 and
>=2.7) installed.

Reported-by: Toralf Förster <toralf@gentoo.org>
Closes: https://bugs.gentoo.org/655520
Package-Manager: Portage-2.3.44, Repoman-2.3.10

app-backup/bacula/bacula-9.0.6-r3.ebuild
app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl26.patch [moved from app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl.patch with 100% similarity]
app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl27.patch [new file with mode: 0644]

index f30acaa0b53fb2b90e5542f9c1680fc1ec4adc44..0c4d61e2a766e078d4a39cf76068ebbe24f6361d 100644 (file)
@@ -169,7 +169,13 @@ src_prepare() {
        chmod 755 src/qt-console/.libs/bat || die
 
        # fix wrong handling of libressl version
-       eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl.patch
+       # needs separate handling for <libressl-2.7 and >=libressl2.7
+       # (see bug #655520)
+       if has_version "<dev-libs/libressl-2.7"; then
+               eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl26.patch
+       else
+               eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl27.patch
+       fi
 
        # fix bundled libtool (bug 466696)
        # But first move directory with M4 macros out of the way.
diff --git a/app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl27.patch b/app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl27.patch
new file mode 100644 (file)
index 0000000..b87f4b1
--- /dev/null
@@ -0,0 +1,11 @@
+--- src/lib/crypto.c.orig       2018-02-02 15:34:39.420489000 -0600
++++ src/lib/crypto.c    2018-02-02 15:35:44.000524000 -0600
+@@ -195,7 +195,7 @@
+ IMPLEMENT_ASN1_FUNCTIONS(SignatureData)
+ IMPLEMENT_ASN1_FUNCTIONS(CryptoData)
+
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
++#if ( (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) )
+ DEFINE_STACK_OF(SignerInfo);
+ DEFINE_STACK_OF(RecipientInfo);
+ #else