commit:     cece880242032ed7c78252169c99ba28fd1dbcb9
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  6 13:26:21 2023 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Dec  6 13:35:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cece8802

mail-filter/opendkim: fix build with lld

Add https://github.com/trusteddomainproject/OpenDKIM/pull/192 to the
ebuild. Thanks to Chris Pritchard for both the report and the solution.

Closes: https://bugs.gentoo.org/918512
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../files/opendkim-2.10.3-fix-ldap-sasl-pc.patch   | 69 ++++++++++++++++++++++
 mail-filter/opendkim/opendkim-2.10.3-r30.ebuild    |  1 +
 2 files changed, 70 insertions(+)

diff --git a/mail-filter/opendkim/files/opendkim-2.10.3-fix-ldap-sasl-pc.patch 
b/mail-filter/opendkim/files/opendkim-2.10.3-fix-ldap-sasl-pc.patch
new file mode 100644
index 000000000000..9375d3c8bab9
--- /dev/null
+++ b/mail-filter/opendkim/files/opendkim-2.10.3-fix-ldap-sasl-pc.patch
@@ -0,0 +1,69 @@
+From f203e0a001468cd30a0a3b780c90f0f90cdc35b8 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <[email protected]>
+Date: Sat, 2 Dec 2023 18:44:20 -0500
+Subject: [PATCH 1/2] configure.ac: update OpenLDAP's pkgconfig name
+
+OpenLDAP provides the file ldap.pc for its libldap library. This can
+be verified via libraries/libldap/ldap.pc.in in the repository,
+
+  https://git.openldap.org/openldap/openldap/-/blob/master/
+
+Our ./configure script checks instead for the name "openldap", which
+at some point may have been correct, but no longer works. We switch to
+"ldap" so that we can locate the upstream file.
+
+On some platforms (https://bugs.gentoo.org/918512) this will fix a
+linking error. Thanks to Chris Pritchard for the report and the
+diagnosis.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1eaa95d8..b8353077 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1800,7 +1800,7 @@ OPENLDAP_LIBS=""
+ if test \( x"$ldappath" = x"auto" -o x"$ldappath" = x"yes" \) -a \
+       x"$PKG_CONFIG" != x""
+ then
+-        PKG_CHECK_MODULES([OPENLDAP], [openldap >= 2.0.0],
++        PKG_CHECK_MODULES([OPENLDAP], [ldap >= 2.0.0],
+       [
+               ldap_found="yes"
+               OPENLDAP_CPPFLAGS="$OPENLDAP_CFLAGS"
+
+From 12b1403eea40f3df59ef130a28164f16d08053fc Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <[email protected]>
+Date: Sat, 2 Dec 2023 18:52:09 -0500
+Subject: [PATCH 2/2] configure.ac: update Cyrus SASL's pkgconfig name
+
+Cyrus SASL provides the file libsasl2.pc for its libsasl2
+library. This can be verified in its git repository:
+
+  https://github.com/cyrusimap/cyrus-sasl/blob/master/libsasl2.pc.in
+
+Our ./configure script checks instead for the name "cyrussasl", which
+at some point may have been correct, but no longer works. We switch to
+"libsasl2" so that we can locate the upstream file.
+
+On some platforms (https://bugs.gentoo.org/918512) this will fix a
+linking error. Thanks to Chris Pritchard for the report and the
+diagnosis.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b8353077..071e8511 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1890,7 +1890,7 @@ sasl_found="no"
+ if test \( x"$saslpath" = x"auto" -o x"$saslpath" = x"yes" \) -a \
+       x"$PKG_CONFIG" != x""
+ then
+-        PKG_CHECK_MODULES([SASL], [cyrussasl >= 2.1.0],
++        PKG_CHECK_MODULES([SASL], [libsasl2 >= 2.1.0],
+       [
+               sasl_found="yes"
+               SASL_CPPFLAGS="$SASL_CFLAGS"

diff --git a/mail-filter/opendkim/opendkim-2.10.3-r30.ebuild 
b/mail-filter/opendkim/opendkim-2.10.3-r30.ebuild
index 996ffbef1220..b689770a7ba0 100644
--- a/mail-filter/opendkim/opendkim-2.10.3-r30.ebuild
+++ b/mail-filter/opendkim/opendkim-2.10.3-r30.ebuild
@@ -58,6 +58,7 @@ PATCHES=(
        "${FILESDIR}/${P}-fix-libmilter-search.patch"
        "${FILESDIR}/${P}-snprintf-include.patch"
        "${FILESDIR}/${P}-c-std.patch"
+       "${FILESDIR}/${P}-fix-ldap-sasl-pc.patch"
 )
 
 pkg_setup() {

Reply via email to