summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-13 20:35:15 +0000
committerSam James <sam@gentoo.org>2021-04-13 22:37:38 +0000
commit7ea6b09e8cc77001844be7e1feb639954c500361 (patch)
tree1a08fee3c76da145828a1dfa32c528281185f8c8
parentnet-libs/libesmtp: add subslot (diff)
downloadgentoo-7ea6b09e8cc77001844be7e1feb639954c500361.tar.gz
gentoo-7ea6b09e8cc77001844be7e1feb639954c500361.tar.bz2
gentoo-7ea6b09e8cc77001844be7e1feb639954c500361.zip
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@gentoo.org>
-rw-r--r--mail-mta/esmtp/esmtp-1.2-r2.ebuild23
-rw-r--r--mail-mta/esmtp/files/esmtp-1.2-pkgconfig.patch58
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 0f2568543607..af0fec0f53e2 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 065c8bfc797d..a96566a6f520 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