mail-filter/imapfilter: add patch for LibreSSL
authorStefan Strogin <steils@gentoo.org>
Sat, 28 Mar 2020 05:06:40 +0000 (07:06 +0200)
committerStefan Strogin <steils@gentoo.org>
Sat, 28 Mar 2020 05:08:49 +0000 (07:08 +0200)
Closes: https://bugs.gentoo.org/714882
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Stefan Strogin <steils@gentoo.org>
mail-filter/imapfilter/files/imapfilter-2.6.16-libressl.patch [new file with mode: 0644]
mail-filter/imapfilter/imapfilter-2.6.16.ebuild

diff --git a/mail-filter/imapfilter/files/imapfilter-2.6.16-libressl.patch b/mail-filter/imapfilter/files/imapfilter-2.6.16-libressl.patch
new file mode 100644 (file)
index 0000000..2454fc3
--- /dev/null
@@ -0,0 +1,29 @@
+From bf69bdbf674269e84b22461c50ce1016182b56d3 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Sat, 28 Mar 2020 06:56:07 +0200
+Subject: [PATCH] Fix build with LibreSSL
+
+Bug: https://bugs.gentoo.org/714882
+Upstream-Status: Submitted
+[https://github.com/lefcha/imapfilter/pull/204]
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ src/socket.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/socket.c b/src/socket.c
+index 0a1874f..03e0d21 100644
+--- a/src/socket.c
++++ b/src/socket.c
+@@ -143,7 +143,7 @@ open_secure_connection(session *ssn)
+               goto fail;
+       if (get_option_boolean("certificates")) {
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+               SSL_set_hostflags(ssn->sslconn,
+                   X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
+               if (!SSL_set1_host(ssn->sslconn, ssn->server)) {
+-- 
+2.26.0
+
index 0afa3d7ef35975b7dedfb3644d7403509ded4a14..2717687e7e40ea236dabd8992f6ef5128e32c0b1 100644 (file)
@@ -24,6 +24,8 @@ DEPEND="${RDEPEND}"
 
 DOCS="AUTHORS NEWS README samples/*"
 
+PATCHES=( "${FILESDIR}"/${P}-libressl.patch )
+
 src_prepare() {
        default
        sed -i -e "/^PREFIX/s:/usr/local:${EPREFIX}/usr:" \