public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-mta/esmtp/, mail-mta/esmtp/files/
@ 2021-04-13 20:28 Brian Evans
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Evans @ 2021-04-13 20:28 UTC (permalink / raw
  To: gentoo-commits

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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-mta/esmtp/, mail-mta/esmtp/files/
@ 2021-04-13 22:37 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-04-13 22:37 UTC (permalink / raw
  To: gentoo-commits

commit:     7ea6b09e8cc77001844be7e1feb639954c500361
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 13 20:35:15 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 13 22:37:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ea6b09e

mail-mta/esmtp: use PKG_CHECK_MODULES for libesmtp

This ensures we respect e.g. ${PKG_CONFIG} from the environment.

Bug: https://bugs.gentoo.org/782709
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-mta/esmtp/esmtp-1.2-r2.ebuild             | 23 ++++++----
 mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch | 58 +++++++++++---------------
 2 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/mail-mta/esmtp/esmtp-1.2-r2.ebuild b/mail-mta/esmtp/esmtp-1.2-r2.ebuild
index 0f256854360..af0fec0f53e 100644
--- a/mail-mta/esmtp/esmtp-1.2-r2.ebuild
+++ b/mail-mta/esmtp/esmtp-1.2-r2.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=7
 
+inherit autotools
+
 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"
@@ -10,13 +12,10 @@ 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
+RDEPEND="
 	dev-libs/openssl:0=
-"
-RDEPEND="${CDEPEND}
+	>=net-libs/libesmtp-1.0.6_p20200824:=
 	!mail-mta/courier
 	!mail-mta/exim
 	!mail-mta/mini-qmail
@@ -29,13 +28,21 @@ RDEPEND="${CDEPEND}
 	!mail-mta/ssmtp
 	!mail-mta/opensmtpd
 "
-DEPEND="${CDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
 	sys-devel/flex
+	virtual/pkgconfig
 "
 
-PATCHES=( "${FILESDIR}/esmtp-1.2-pkgconfig.patch" )
+PATCHES=( "${FILESDIR}/${PN}-1.2-pkgconfig.patch" )
+
 DOCS=( AUTHORS ChangeLog NEWS README TODO sample.esmtprc )
 
+src_prepare() {
+	default
+	eautoreconf
+}
+
 pkg_postinst() {
-	elog "A sample esmtprc file has been installed in /usr/share/doc/${P}"
+	elog "A sample esmtprc file has been installed in /usr/share/doc/${PF}"
 }

diff --git a/mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch b/mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch
index 065c8bfc797..a96566a6f52 100644
--- a/mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch
+++ b/mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch
@@ -1,37 +1,29 @@
-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 @@
+https://bugs.gentoo.org/782709
+--- a/configure.ac
++++ b/configure.ac
+@@ -28,21 +28,14 @@ then
+ 	CPPFLAGS="$CPPFLAGS -I$with_libesmtp/include"
+ 	LDFLAGS="$LDFLAGS -L$with_libesmtp/lib"
  	AC_CHECK_HEADER(libesmtp.h, ,[AC_MSG_ERROR([libesmtp.h not found in $with_libesmtp])])
- fi    
- AC_MSG_CHECKING(for 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)
+-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)
+-else
+-	AC_MSG_RESULT(no)
+-	AC_MSG_ERROR(libESMTP library not found)
+ fi
+ 
++PKG_CHECK_MODULES([libesmtp], [libesmtp-1.0])
++CFLAGS="$CFLAGS ${libesmtp_CFLAGS}"
++LIBS="$LIBS ${libesmtp_LIBS}"
++
+ jrf_FUNC_GETOPT
+ 
+ AC_CHECK_FUNCS([getuid geteuid])
+-		
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-13 22:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-13 20:28 [gentoo-commits] repo/gentoo:master commit in: mail-mta/esmtp/, mail-mta/esmtp/files/ Brian Evans
  -- strict thread matches above, loose matches on Subject: below --
2021-04-13 22:37 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox