commit:     fce8a7c378cd71e7145133dd2dc09e0c0ea5e67a
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 13 20:27:44 2021 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Apr 13 20:27:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce8a7c3

mail-mta/esmtp: Fix build with libesmtp snapshot

Use pkg-config to get the required info

Bug: https://bugs.gentoo.org/782709
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 mail-mta/esmtp/esmtp-1.2-r2.ebuild             | 41 ++++++++++++++++++++++++++
 mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch | 37 +++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/mail-mta/esmtp/esmtp-1.2-r2.ebuild 
b/mail-mta/esmtp/esmtp-1.2-r2.ebuild
new file mode 100644
index 00000000000..0f256854360
--- /dev/null
+++ b/mail-mta/esmtp/esmtp-1.2-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="User configurable relay-only Mail Transfer Agent with a 
sendmail-like syntax"
+HOMEPAGE="http://esmtp.sourceforge.net/";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+CDEPEND="
+       >=net-libs/libesmtp-1.0.6_p20200824
+       dev-libs/openssl:0=
+"
+RDEPEND="${CDEPEND}
+       !mail-mta/courier
+       !mail-mta/exim
+       !mail-mta/mini-qmail
+       !mail-mta/msmtp
+       !mail-mta/netqmail
+       !mail-mta/nullmailer
+       !mail-mta/postfix
+       !mail-mta/qmail-ldap
+       !mail-mta/sendmail
+       !mail-mta/ssmtp
+       !mail-mta/opensmtpd
+"
+DEPEND="${CDEPEND}
+       sys-devel/flex
+"
+
+PATCHES=( "${FILESDIR}/esmtp-1.2-pkgconfig.patch" )
+DOCS=( AUTHORS ChangeLog NEWS README TODO sample.esmtprc )
+
+pkg_postinst() {
+       elog "A sample esmtprc file has been installed in /usr/share/doc/${P}"
+}

diff --git a/mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch 
b/mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch
new file mode 100644
index 00000000000..065c8bfc797
--- /dev/null
+++ b/mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch
@@ -0,0 +1,37 @@
+diff -aurN a/configure b/configure
+--- a/configure        2009-12-24 03:19:09.000000000 -0500
++++ b/configure        2021-04-13 16:10:48.219870604 -0400
+@@ -4343,12 +4343,12 @@
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libESMTP" >&5
+ $as_echo_n "checking for libESMTP... " >&6; }
+-if libesmtp-config --version > /dev/null 2>&1
++if pkg-config libesmtp-1.0 --exists > /dev/null 2>&1
+ then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+-      CFLAGS="$CFLAGS `libesmtp-config --cflags`"
+-      LIBS="$LIBS `libesmtp-config --libs`"
++      CFLAGS="$CFLAGS `pkg-config libesmtp-1.0 --cflags`"
++      LIBS="$LIBS `pkg-config libesmtp-1.0 --libs`"
+ else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+diff -aurN a/configure.ac b/configure.ac
+--- a/configure.ac     2009-12-24 03:18:55.000000000 -0500
++++ b/configure.ac     2021-04-13 16:11:51.419750462 -0400
+@@ -30,11 +30,11 @@
+       AC_CHECK_HEADER(libesmtp.h, ,[AC_MSG_ERROR([libesmtp.h not found in 
$with_libesmtp])])
+ fi    
+ AC_MSG_CHECKING(for libESMTP)
+-if libesmtp-config --version > /dev/null 2>&1
++if pkg-config libesmtp-1.0 --exists > /dev/null 2>&1
+ then
+       AC_MSG_RESULT(yes)
+-      CFLAGS="$CFLAGS `libesmtp-config --cflags`"
+-      LIBS="$LIBS `libesmtp-config --libs`"
++      CFLAGS="$CFLAGS `pkg-config libesmtp-1.0 --cflags`"
++      LIBS="$LIBS `pkg-config libesmtp-1.0 --libs`"
+ else
+       AC_MSG_RESULT(no)
+       AC_MSG_ERROR(libESMTP library not found)

Reply via email to