Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/exim/
Date: Sat, 29 May 2021 11:52:20
Message-Id: 1622289133.24c18ee750d5716d8c293ef9677c9876457ef7cd.grobian@gentoo
1 commit: 24c18ee750d5716d8c293ef9677c9876457ef7cd
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 29 11:51:22 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sat May 29 11:52:13 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24c18ee7
7
8 mail-mta/exim-4.94.2-r2: allow moving away from sys-libs/db
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.2
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 mail-mta/exim/exim-4.94.2-r2.ebuild | 59 +++++++++++++++++++++++++++++--------
14 mail-mta/exim/metadata.xml | 2 ++
15 2 files changed, 48 insertions(+), 13 deletions(-)
16
17 diff --git a/mail-mta/exim/exim-4.94.2-r2.ebuild b/mail-mta/exim/exim-4.94.2-r2.ebuild
18 index c825df4517e..1174eca77da 100644
19 --- a/mail-mta/exim/exim-4.94.2-r2.ebuild
20 +++ b/mail-mta/exim/exim-4.94.2-r2.ebuild
21 @@ -5,7 +5,10 @@ EAPI="7"
22
23 inherit db-use toolchain-funcs multilib pam systemd
24
25 -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"
26 +IUSE="arc +dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl
27 +dsn elibc_glibc exiscan-acl gdbm gnutls idn ipv6 ldap lmtp maildir mbx
28 +mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl selinux
29 +socks5 spf sqlite srs +srs-alt srs-native +ssl syslog tdb tcpd +tpda X"
30 REQUIRED_USE="
31 arc? ( dkim spf )
32 dane? ( ssl !gnutls )
33 @@ -26,6 +29,8 @@ REQUIRED_USE="
34 # have left is to a) ignore the dependency (but that results in bug
35 # #661164) or b) mask the usage of USE=dane with USE=gnutls. Both are
36 # incorrect, but b) is the only "correct" view from repoman.
37 +# We cannot express a required use for berkdb/gdbm/tdb because berkdb
38 +# and gdbm are both enabled in base profile
39
40 SDIR=$([[ ${PV} == *_rc* ]] && echo /test
41 [[ ${PV} == *.*.*.* ]] && echo /fixes)
42 @@ -42,8 +47,10 @@ LICENSE="GPL-2"
43 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-solaris"
44
45 COMMON_DEPEND=">=sys-apps/sed-4.0.5
46 - ( >=sys-libs/db-3.2:= <sys-libs/db-6:= )
47 - dev-libs/libpcre
48 + dev-libs/libpcre:=
49 + tdb? ( sys-libs/tdb:= )
50 + !tdb? ( gdbm? ( sys-libs/gdbm:= ) )
51 + !tdb? ( !gdbm? ( >=sys-libs/db-3.2:= <sys-libs/db-6:= ) )
52 idn? ( net-dns/libidn:= net-dns/libidn2:= )
53 perl? ( dev-lang/perl:= )
54 pam? ( sys-libs/pam )
55 @@ -58,8 +65,9 @@ COMMON_DEPEND=">=sys-apps/sed-4.0.5
56 )
57 )
58 ldap? ( >=net-nds/openldap-2.0.7 )
59 - nis? (
60 - elibc_glibc? (
61 + elibc_glibc? (
62 + net-libs/libnsl
63 + nis? (
64 net-libs/libtirpc
65 >=net-libs/libnsl-1:=
66 )
67 @@ -80,7 +88,6 @@ COMMON_DEPEND=">=sys-apps/sed-4.0.5
68 sqlite? ( dev-db/sqlite )
69 radius? ( net-dialup/freeradius-client )
70 virtual/libiconv
71 - elibc_glibc? ( net-libs/libnsl )
72 "
73 # added X check for #57206
74 BDEPEND="virtual/pkgconfig"
75 @@ -173,6 +180,37 @@ src_configure() {
76 HAVE_ICONV=yes
77 EOC
78
79 + # configure db implementation, Exim always needs one for its hints
80 + # database, we prefer tdb and gdbm, since bdb is kind of getting
81 + # less and less support
82 + if use tdb ; then
83 + cat >> Makefile <<- EOC
84 + USE_TDB=yes
85 + DBMLIB = -ltdb
86 + EOC
87 + sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die
88 + sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die
89 + elif use gdbm ; then
90 + cat >> Makefile <<- EOC
91 + USE_GDBM=yes
92 + DBMLIB = -lgdbm
93 + EOC
94 + sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die
95 + sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die
96 + else
97 + # use the "native" interfaces to the DBM and CDB libraries, support
98 + # passwd and directory lookups by default
99 + local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2"
100 + cat >> Makefile <<- EOC
101 + USE_DB=yes
102 + # keep include in CFLAGS because exim.h -> dbstuff.h -> db.h
103 + CFLAGS += -I$(db_includedir ${DB_VERS})
104 + DBMLIB = -l$(db_libname ${DB_VERS})
105 + EOC
106 + sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die
107 + sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die
108 + fi
109 +
110 # if we use libiconv, now is the time to tell so
111 if use !elibc_glibc && use !elibc_musl ; then
112 cat >> Makefile <<- EOC
113 @@ -221,18 +259,13 @@ src_configure() {
114
115 #
116 # lookup methods
117 + #
118
119 - # use the "native" interfaces to the DBM and CDB libraries, support
120 - # passwd and directory lookups by default
121 - local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2"
122 + # support passwd and directory lookups by default
123 cat >> Makefile <<- EOC
124 - USE_DB=yes
125 LOOKUP_CDB=yes
126 LOOKUP_PASSWD=yes
127 LOOKUP_DSEARCH=yes
128 - # keep include in CFLAGS because exim.h -> dbstuff.h -> db.h
129 - CFLAGS += -I$(db_includedir ${DB_VERS})
130 - DBMLIB = -l$(db_libname ${DB_VERS})
131 EOC
132
133 if ! use dnsdb; then
134
135 diff --git a/mail-mta/exim/metadata.xml b/mail-mta/exim/metadata.xml
136 index 3c76bb641e6..de42f5fe5af 100644
137 --- a/mail-mta/exim/metadata.xml
138 +++ b/mail-mta/exim/metadata.xml
139 @@ -45,6 +45,8 @@
140 <flag name="pkcs11">Require pkcs11 support in <pkg>net-libs/gnutls</pkg> with USE=gnutls</flag>
141 <flag name="redis">Adds support for querying <pkg>dev-db/redis</pkg></flag>
142 <flag name="prdr">Adds support for Per-Recipient Data Response</flag>
143 + <flag name="tdb">Use <pkg>sys-libs/tdb</pkg> for internal database
144 + storage (such as hints database)</flag>
145 <flag name="tpda">Adds support for Transport Post-Delivery Actions</flag>
146 </use>
147 <upstream>