From 24c18ee750d5716d8c293ef9677c9876457ef7cd Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 29 May 2021 13:51:22 +0200 Subject: mail-mta/exim-4.94.2-r2: allow moving away from sys-libs/db Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Fabian Groffen --- mail-mta/exim/exim-4.94.2-r2.ebuild | 59 +++++++++++++++++++++++++++++-------- mail-mta/exim/metadata.xml | 2 ++ 2 files changed, 48 insertions(+), 13 deletions(-) (limited to 'mail-mta') diff --git a/mail-mta/exim/exim-4.94.2-r2.ebuild b/mail-mta/exim/exim-4.94.2-r2.ebuild index c825df4517e4..1174eca77daa 100644 --- a/mail-mta/exim/exim-4.94.2-r2.ebuild +++ b/mail-mta/exim/exim-4.94.2-r2.ebuild @@ -5,7 +5,10 @@ EAPI="7" inherit db-use toolchain-funcs multilib pam systemd -IUSE="arc +dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl dsn elibc_glibc exiscan-acl gnutls idn ipv6 ldap lmtp maildir mbx mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl selinux socks5 spf sqlite srs +srs-alt srs-native +ssl syslog tcpd +tpda X" +IUSE="arc +dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl +dsn elibc_glibc exiscan-acl gdbm gnutls idn ipv6 ldap lmtp maildir mbx +mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl selinux +socks5 spf sqlite srs +srs-alt srs-native +ssl syslog tdb tcpd +tpda X" REQUIRED_USE=" arc? ( dkim spf ) dane? ( ssl !gnutls ) @@ -26,6 +29,8 @@ REQUIRED_USE=" # have left is to a) ignore the dependency (but that results in bug # #661164) or b) mask the usage of USE=dane with USE=gnutls. Both are # incorrect, but b) is the only "correct" view from repoman. +# We cannot express a required use for berkdb/gdbm/tdb because berkdb +# and gdbm are both enabled in base profile SDIR=$([[ ${PV} == *_rc* ]] && echo /test [[ ${PV} == *.*.*.* ]] && echo /fixes) @@ -42,8 +47,10 @@ LICENSE="GPL-2" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-solaris" COMMON_DEPEND=">=sys-apps/sed-4.0.5 - ( >=sys-libs/db-3.2:= =sys-libs/db-3.2:= =sys-apps/sed-4.0.5 sqlite? ( dev-db/sqlite ) radius? ( net-dialup/freeradius-client ) virtual/libiconv - elibc_glibc? ( net-libs/libnsl ) " # added X check for #57206 BDEPEND="virtual/pkgconfig" @@ -173,6 +180,37 @@ src_configure() { HAVE_ICONV=yes EOC + # configure db implementation, Exim always needs one for its hints + # database, we prefer tdb and gdbm, since bdb is kind of getting + # less and less support + if use tdb ; then + cat >> Makefile <<- EOC + USE_TDB=yes + DBMLIB = -ltdb + EOC + sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die + sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die + elif use gdbm ; then + cat >> Makefile <<- EOC + USE_GDBM=yes + DBMLIB = -lgdbm + EOC + sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die + sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die + else + # use the "native" interfaces to the DBM and CDB libraries, support + # passwd and directory lookups by default + local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2" + cat >> Makefile <<- EOC + USE_DB=yes + # keep include in CFLAGS because exim.h -> dbstuff.h -> db.h + CFLAGS += -I$(db_includedir ${DB_VERS}) + DBMLIB = -l$(db_libname ${DB_VERS}) + EOC + sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die + sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die + fi + # if we use libiconv, now is the time to tell so if use !elibc_glibc && use !elibc_musl ; then cat >> Makefile <<- EOC @@ -221,18 +259,13 @@ src_configure() { # # lookup methods + # - # use the "native" interfaces to the DBM and CDB libraries, support - # passwd and directory lookups by default - local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2" + # support passwd and directory lookups by default cat >> Makefile <<- EOC - USE_DB=yes LOOKUP_CDB=yes LOOKUP_PASSWD=yes LOOKUP_DSEARCH=yes - # keep include in CFLAGS because exim.h -> dbstuff.h -> db.h - CFLAGS += -I$(db_includedir ${DB_VERS}) - DBMLIB = -l$(db_libname ${DB_VERS}) EOC if ! use dnsdb; then diff --git a/mail-mta/exim/metadata.xml b/mail-mta/exim/metadata.xml index 3c76bb641e6b..de42f5fe5af2 100644 --- a/mail-mta/exim/metadata.xml +++ b/mail-mta/exim/metadata.xml @@ -45,6 +45,8 @@ Require pkcs11 support in net-libs/gnutls with USE=gnutls Adds support for querying dev-db/redis Adds support for Per-Recipient Data Response + Use sys-libs/tdb for internal database + storage (such as hints database) Adds support for Transport Post-Delivery Actions -- cgit v1.2.3-65-gdbad