summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2012-10-26 09:04:41 +0000
committerFabian Groffen <grobian@gentoo.org>2012-10-26 09:04:41 +0000
commit03943aeedbeec79056e0672b92d1368c1503aa0f (patch)
tree17e902c74ee56f927c19989b8b3e3e0a93a9f3dc /mail-mta
parentAdd upstream patch to properly compile with augeas 0.10.0. (diff)
downloadhistorical-03943aeedbeec79056e0672b92d1368c1503aa0f.tar.gz
historical-03943aeedbeec79056e0672b92d1368c1503aa0f.tar.bz2
historical-03943aeedbeec79056e0672b92d1368c1503aa0f.zip
Bump to 4.80.1 for DKIM security CVE-2012-5671. Fixed use of AR and RANLIB, bug #438326
Package-Manager: portage-2.2.01.21313-prefix/cvs/SunOS i386 Manifest-Sign-Key: 0x5F75F607C5C74E89
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/exim/ChangeLog8
-rw-r--r--mail-mta/exim/Manifest13
-rw-r--r--mail-mta/exim/exim-4.80.1.ebuild353
3 files changed, 368 insertions, 6 deletions
diff --git a/mail-mta/exim/ChangeLog b/mail-mta/exim/ChangeLog
index 318e499842bb..7a601047dc41 100644
--- a/mail-mta/exim/ChangeLog
+++ b/mail-mta/exim/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for mail-mta/exim
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/ChangeLog,v 1.230 2012/10/20 16:29:31 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/ChangeLog,v 1.231 2012/10/26 09:04:34 grobian Exp $
+
+*exim-4.80.1 (26 Oct 2012)
+
+ 26 Oct 2012; Fabian Groffen <grobian@gentoo.org> +exim-4.80.1.ebuild:
+ Bump to 4.80.1 for DKIM security CVE-2012-5671. Fixed use of AR and RANLIB,
+ bug #438326
20 Oct 2012; Raúl Porcel <armin76@gentoo.org> exim-4.80.ebuild:
alpha/ia64/sparc/x86 stable wrt #437746
diff --git a/mail-mta/exim/Manifest b/mail-mta/exim/Manifest
index 7cc347060299..cc0a6b5adf14 100644
--- a/mail-mta/exim/Manifest
+++ b/mail-mta/exim/Manifest
@@ -19,21 +19,24 @@ AUX exim.rc6 719 SHA256 7b721c30652b09587e133357dfb3bf2173b71607ce6aa203b510868c
AUX exim.rc7 765 SHA256 9f98b698bc74e69f1b1595a108c49500dfc58d15b193bd59f3ec36bbbe648cf6 SHA512 2ed0c6d67fef47b83b552b4850bc74553ab552700523a81e0d28597c3569c24f53b43da8bcfebee32565975528d8b7e169372dd574f577c2eaacc2bf80890306 WHIRLPOOL 86a61f6d45fe3e445e10efcab449e397cb0ef15d945d6d8344003fd34f36dcb2fc5a9aef0eaa6b329c510391067ee1f20c2daf76aa5038c1f6234f323c462e4b
DIST exim-4.76.tar.bz2 1605832 SHA256 4625b0fb916835ae60a73311a8956267fa1248e888f584c337a5b7df20174e95 SHA512 1b87e29a4791360c2ae8e3be031ee3c37ad82b37b14e4d89e96263516cb3b3a118d1a29d33bbf495e8f84ce4c4bfe60dc934a0dd8b98fa0aa6e28c6a36ae7d9e WHIRLPOOL 62bff247c16eb81ed9c65f5b23993a02e8e6c79401c5d17f76b3e4081444cf2381070968ce42d5bf4d64d562049131e2c58bd15a90d935c684f092e1d383bd51
DIST exim-4.77.tar.bz2 1576148 SHA256 0ccc13cf2f052b1163fcdf71c55a3578765050848ba413a6473d3ab5d20b1475 SHA512 a0ecd042c9e775d6b8bc7edf288849ff91ad0d0a9f99ee8448386b39235e29d10f31af7241ac2f2e4e1c8a657ac709fe5da19e2c7250567788b954d21b866629 WHIRLPOOL 178c407e63d9209bdd52e59e45860f672b3efd4f701860fd718569b7139954d53aefc09c5050efc2ab6240aad35cca03c5da3ad1d5f2f32d9d1ea2e08a02a301
+DIST exim-4.80.1.tar.bz2 1650082 SHA256 9565b10f06be224fd03adafae2e07e6fdbb479f8873e3894ddb13f98eeebe78f SHA512 ed73dd34dc02ab91896c3cdcedb0618ca3be116904c8eeb1303fc3534f8ab9430083f654fa5af994b0e01049e7fdd22d268fed9a3318b64a56c3a61d7f2174f5 WHIRLPOOL d556b7515f081f39a7bb7cb16804f0e13b37a3295a5f19faf28f9fed0966411f13b521dd7e5a8f42a7a851fa46e15ef8478caff734903080f31e910fb1530eab
DIST exim-4.80.tar.bz2 1649827 SHA256 787b6defd37fa75311737bcfc42e9e2b2cc62c5d027eed35bb7d800b2d9a0984 SHA512 395e580bddbb54a48f3a5a4a50cc0cfc7b555eca3c81c866ce9bd8be15b9ada95bebc6a120c9a2a08bed3e75ecabb180cef54f9d0824489c104c243f45821eb9 WHIRLPOOL 6351e952bf3b407d1c130c09b2e3435d20c3ba0c0ccd737141c7c3b1b08fc13377b7d54fcc2679382c725819ea815f7337869b8c7791dd0456157da0079e1568
DIST exim-html-4.77.tar.bz2 416407 SHA256 05823ebe0c0554215d928bee1a856bb2011e993f170edadbad57f0fb21dd9c76 SHA512 7fa02e05634c292d93539dcd85b9e9690f77666dd7f81a931123034fd5ed24d112334186ecd81960c657db40b1a9df2aa5730d1379d2d004d8e6012bdf0c0fa2 WHIRLPOOL ec1201da4617f9fcb78e627af4878909c5e104077d55ca37aa97c53ac4e4e6c04e16a9bf50e7d2291f66c372bcc8a4392733def119f4a57b1f01b13fb36542a0
+DIST exim-html-4.80.1.tar.bz2 404894 SHA256 206ef4acc2641f10f3f23f8ee97cd1f7125486938ea1fc231ac2a1d5d6c9be09 SHA512 c3f7eef6c7d1981185c5d7bae6a1bf4645468d105e85990accf56f66daf809ad8fb0f3e50925339a72c510e2cc0eced864bc06d526e5b735744f4478dd32d373 WHIRLPOOL 7d67d196e0613fba36d7e1e1370b0b1a6f60739befaa7d2f9661bcef9f57df9586aa63a99faa6a5d25619c2cd7186d2bdf27059f1d229be5d8199d6ec3f6b49c
DIST exim-html-4.80.tar.bz2 425933 SHA256 4d33239e787d4a509bdbf0bdb74a9da7c9ea2df8a953fe6dc5dd139b92301d7e SHA512 9adc61447fd1a6d897ec3e9543bcd543233ea894947e038d2ddb02976af258bd2a028722f7560206cc1085989af51536624a200961501c887a68fd2347cf99aa WHIRLPOOL 6147e61d9632a76a8fedf1ddead456f91bce8d64a14f831d4ce2c20b64a42a12f75b73dd26ffdeab61249b7cbffcbe797ffa5b2068d2e0f7e4d681d76a21e25a
DIST exim_469_dsn_1_3.patch 40222 SHA256 605c520ea79507fd387772796c62303c5a49d1dc47b744b4267301096eedd49a SHA512 99cfb5c0c28849452b2b7a6f2b47abf78a77f970465ab5a3a5d68089dd5964610d8c64d1a380051da06f8e85ee7a073ee651b53dbac7451d9be55c78093178e5 WHIRLPOOL 7789e301a9aebe81fc0f3c68875f91e61413b5e8ca41b32562aff6146e1353b5a2a9a158455a18b16cf82a4fdcbb1a8a66fb85842387bc0afbd270ee91e27692
DIST system_filter.exim.gz 3075 SHA256 3a3471b486a09e0a0153f7b520e1eaf26d21b97d73ea8348bdc593c00eb1e437 SHA512 cb358d3ce2499a0bb5920d962a06f2af8486e55ec90c8c928bd8e3aefb279aa57f5f960d5adfcef68bd94110b405eaa144e9629cfe6014a529c79c544600bbf3 WHIRLPOOL ce68d9c18b24eca3ef97ea810964cc1ada5f85b795a7c432ad39b5788188a16419101c92fb52b418738d760e1d658f7a41485e5561079a667d84d276c71be5a4
EBUILD exim-4.76-r1.ebuild 10443 SHA256 146343370a30a6a2c5d5a6a2a6821e047dafcce7ee849dc296f8f129344488ca SHA512 cb6f1a40e49e8f0d573f6b7915ef87714bcb67087b4b23298f4ebb5a1a8fbadae594e9180c2ad83b7daf8519d4d358759dad0a2166a028588e13b46be5393185 WHIRLPOOL d7b7d8dac3cfbc6c733ba5980451a98648b57f1d7a1d28eef684e843caeb7d909bf2ba5182c192627db058f0e71154dca77caea88eb7540c70c75adb349bd987
EBUILD exim-4.76.ebuild 10340 SHA256 4ff6b14244c970063480b8c8d4588f523650e70ee3613582286ee1e03f192afe SHA512 5d272bd7285f2d0cef9bae4cbc9e9dadb0987d205c07442a6e507924a5ffa3283cc5d20cdcce9a60988b22ca8f1a40ad455ddd007e89d192e596a8555535d162 WHIRLPOOL b3989dba6044a64073e31ba50982a36a5c15e99d5a65f2a3a6fc5acb6c7fdfae20210f37a0bd256d39604e070c585d4cdef070e32e31411f25507ac4bc7ccb10
EBUILD exim-4.77.ebuild 11018 SHA256 99e4c90e1aa82a2d48e78b2508571973a7f24150edb48d5191d796c298bf60b1 SHA512 8311d7e9513c0a9f3dea30336fdbbf9c2359ec64fcc56333f46885a795d9199173d647cc91d18462100391bb2c429987c1c744f91460e11ec1562d0993f74fbc WHIRLPOOL 99c8690e5e0a183eef37c73036609c78da7b10eb9678ab2a1dde30b1158e526a2aaff8b7f5fe245e7904a9672218a70d97214491803a05808604f6f23eb53dd5
+EBUILD exim-4.80.1.ebuild 11211 SHA256 f52396a9270efc0c320d3b91ddbc18fdfa65d6090cb156d5ee28adcfb7942832 SHA512 54392e8dd3c1ec3c211915a936c9b4ada01801820c406e7775035f91ff7fc533fac76d67f9e728e9ab5c8a3ec6a2aafb0311595590c3c68907e2c090795ac5aa WHIRLPOOL 1291950983fd516ef93f11b8edfff105267d3055b0ba7b9d0e7e19d3b142e6536504c3b93fe56be867e31435599b9b58940012a1bf54fc8e1d5175e05118bbf9
EBUILD exim-4.80.ebuild 11152 SHA256 290f888358a6a88c18a8f3f8dc0d432ca16b1409d49d5c318d934d9b4fe4124a SHA512 74cd1a1cc78c3f9c39c66015a5982c7db2dc84a25f37c64c54296a9e97eb70ed9616fdcb80b4708e798c9fcfcbe69d978c00e60b20af66476eb403ddbc6f9f6c WHIRLPOOL 5b956519b841834486a320b2285455837fbf90336dce082bc22d049b3997396458cab5b583027c399ddd56d323007409efedda120435489f0e9b436d9e6f68ca
-MISC ChangeLog 45523 SHA256 9a01f31b8a33dbeae2fbcdc700694426e6984b37eabeb54aa4f4d3c4fc55c0f9 SHA512 ac5c8fd8d17e08ff39ecb777727b4b7ff98643ea4ab93b5b0e3606341da74eed88249886c9747ed94d4581e7d5b677bc5e2b74eeace2ac6389e693f626dced88 WHIRLPOOL 45ae1992d43074a95ab0835ae92ae16446724984d6a3834747c5e834800cfbc46bbf570c5592741534353b4fe65a509d36761057b011da86fe3942a28d18f514
+MISC ChangeLog 45717 SHA256 09058a09bb2fd21d580c24e17e717ee4257268529f72c6b9ecf24fcf56a984a3 SHA512 d9a923946576d02fc64bad033cadf6c88ff6520ad25fa91e5d0698fbdf8f8521fbb7bc3f44c1fac83d59f12a07c8d13cf6946e0a4b66336876149b23f2fc951c WHIRLPOOL 4d4ac9abbd9ca428af49f5b435f137fdbf7756b2fc4062971379b83808ff3ef0d72c59e68d4b6793595c965f89284ce7e20a4420be5ee0395b6ceba33a6a8ddf
MISC metadata.xml 1745 SHA256 6c25800686eeb918e03fbe6caa54c38512c843e8eca3a2db8783289a9b12bea5 SHA512 5528534fb15dc9b032a19b4bbb5f5a71936c7f068a9496a13cc279d3e0c3c6c2837c9503fb28141c894bb8c5079b5aaf33667ca67d45a4cd4b7d6c5d52e9a7bd WHIRLPOOL 951ec71dcffdb4c82c000f07f2c417c30c11a063d1f20995e55bd45e10b8addcb531c0a2c0e984a7d40b0a03753f5ba1dd42c9209563cc53941afaf42d8d372c
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
+Version: GnuPG v2.0.19 (SunOS)
-iEYEAREIAAYFAlCC0WwACgkQuQc30/atMkCppgCeJP85tVLguBzZy7klrLey6ZhL
-FesAn34MllT8mM86WJVppd5V7g8UURK6
-=eyU+
+iEYEAREIAAYFAlCKUiYACgkQX3X2B8XHTom3vgCeJrMHK1GlmhS+wuMzWzfImAk1
+erQAoIw6utmI1SAeTo6bJR3S37i2Ac28
+=XsOv
-----END PGP SIGNATURE-----
diff --git a/mail-mta/exim/exim-4.80.1.ebuild b/mail-mta/exim/exim-4.80.1.ebuild
new file mode 100644
index 000000000000..e008a309196b
--- /dev/null
+++ b/mail-mta/exim/exim-4.80.1.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/exim-4.80.1.ebuild,v 1.1 2012/10/26 09:04:34 grobian Exp $
+
+EAPI="3"
+
+inherit eutils toolchain-funcs multilib pam
+
+IUSE="tcpd ssl postgres mysql ldap pam exiscan-acl lmtp ipv6 sasl dnsdb perl mbx X nis syslog spf srs gnutls sqlite doc dovecot-sasl radius maildir +dkim dcc dsn"
+
+DSN_EXIM_V=469
+DSN_V=1_3
+COMM_URI="ftp://ftp.exim.org/pub/exim/exim4$([[ ${PV} == *_rc* ]] && echo /test)"
+
+DESCRIPTION="A highly configurable, drop-in replacement for sendmail"
+SRC_URI="${COMM_URI}/${P//rc/RC}.tar.bz2
+ mirror://gentoo/system_filter.exim.gz
+ dsn? ( mirror://sourceforge/eximdsn/eximdsn-patch-1.3/exim_${DSN_EXIM_V}_dsn_${DSN_V}.patch )
+ doc? ( ${COMM_URI}/${PN}-html-${PV//rc/RC}.tar.bz2 )"
+HOMEPAGE="http://www.exim.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-solaris"
+
+COMMON_DEPEND=">=sys-apps/sed-4.0.5
+ >=sys-libs/db-3.2
+ dev-libs/libpcre
+ perl? ( sys-devel/libperl )
+ pam? ( virtual/pam )
+ tcpd? ( sys-apps/tcp-wrappers )
+ ssl? ( dev-libs/openssl )
+ gnutls? ( net-libs/gnutls
+ dev-libs/libtasn1 )
+ ldap? ( >=net-nds/openldap-2.0.7 )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql-base )
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.14 )
+ spf? ( >=mail-filter/libspf2-1.2.5-r1 )
+ srs? ( mail-filter/libsrs_alt )
+ X? ( x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/libXaw
+ )
+ sqlite? ( dev-db/sqlite )
+ radius? ( net-dialup/radiusclient )
+ virtual/libiconv
+ "
+ # added X check for #57206
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/mini-qmail
+ !<mail-mta/msmtp-1.4.19-r1
+ !>=mail-mta/msmtp-1.4.19-r1[mta]
+ !mail-mta/nbsmtp
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/postfix
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !<mail-mta/ssmtp-2.64-r2
+ !>=mail-mta/ssmtp-2.64-r2[mta]
+ !net-mail/mailwrapper
+ >=net-mail/mailbase-0.00-r5
+ virtual/logger
+ dcc? ( mail-filter/dcc )
+ "
+
+S=${WORKDIR}/${P//rc/RC}
+
+src_prepare() {
+ epatch "${FILESDIR}"/exim-4.14-tail.patch
+ epatch "${FILESDIR}"/exim-4.74-localscan_dlopen.patch
+ epatch "${FILESDIR}"/exim-4.69-r1.27021.patch
+ epatch "${FILESDIR}"/exim-4.74-radius-db-ENV-clash.patch # 287426
+ epatch "${FILESDIR}"/exim-4.77-makefile-freebsd.patch # 235785
+ epatch "${FILESDIR}"/exim-4.77-as-needed-ldflags.patch # 352265, 391279
+ epatch "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591
+
+ use maildir && epatch "${FILESDIR}"/exim-4.20-maildir.patch
+
+ if use dsn ; then
+ cp "${DISTDIR}"/exim_${DSN_EXIM_V}_dsn_${DSN_V}.patch . || die
+ epatch "${FILESDIR}"/${PN}-4.76-dsn.patch
+ epatch exim_${DSN_EXIM_V}_dsn_${DSN_V}.patch
+ fi
+
+ # user Exim believes it should be
+ MAILUSER=mail
+ MAILGROUP=mail
+ if use prefix && [[ ${EUID} != 0 ]] ; then
+ MAILUSER=$(id -un)
+ MAILGROUP=$(id -gn)
+ fi
+}
+
+src_configure() {
+ local myconf
+
+ sed -i "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${EPREFIX}/etc/mail/aliases'" "${S}"/src/configure.default
+ cp "${S}"/src/configure.default "${S}"/src/configure.default.orig
+
+ sed -i -e 's/^buildname=.*/buildname=exim-gentoo/g' Makefile
+
+ sed -e "48i\CFLAGS=${CFLAGS}" \
+ -e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \
+ -e "s:CONFIGURE_FILE=/usr/exim/configure:CONFIGURE_FILE=${EPREFIX}/etc/exim/exim.conf:" \
+ -e "s:# INFO_DIRECTORY=/usr/local/info:INFO_DIRECTORY=${EPREFIX}/usr/share/info:" \
+ -e "s:# LOG_FILE_PATH=/var/log/exim_%slog:LOG_FILE_PATH=${EPREFIX}/var/log/exim/exim_%s.log:" \
+ -e "s:# PID_FILE_PATH=/var/lock/exim.pid:PID_FILE_PATH=${EPREFIX}/var/run/exim.pid:" \
+ -e "s:# SPOOL_DIRECTORY=/var/spool/exim:SPOOL_DIRECTORY=${EPREFIX}/var/spool/exim:" \
+ -e "s:# SUPPORT_MAILDIR=yes:SUPPORT_MAILDIR=yes:" \
+ -e "s:# SUPPORT_MAILSTORE=yes:SUPPORT_MAILSTORE=yes:" \
+ -e "s:EXIM_USER=:EXIM_USER=${MAILUSER}:" \
+ -e "s:# AUTH_SPA=yes:AUTH_SPA=yes:" \
+ -e "s:# AUTH_CRAM_MD5=yes:AUTH_CRAM_MD5=yes:" \
+ -e "s:# AUTH_PLAINTEXT=yes:AUTH_PLAINTEXT=yes:" \
+ -e "s:# LOOKUP_PASSWD=yes:LOOKUP_PASSWD=yes:" \
+ -e "s:EXIM_MONITOR=eximon.bin:# EXIM_MONITOR=eximon.bin:" \
+ -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \
+ -e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \
+ src/EDITME > Local/Makefile
+
+ cd Local
+
+ # exiscan-acl is now integrated - enable it when use-flag set
+ if use exiscan-acl; then
+ sed -i "s:# WITH_CONTENT_SCAN=yes:WITH_CONTENT_SCAN=yes:" Makefile
+ sed -i "s:# WITH_OLD_DEMIME=yes:WITH_OLD_DEMIME=yes:" Makefile
+ elif (use spf || use srs ) then
+ eerror SPF and SRS support require exiscan-acl to be enabled, please add
+ eerror to your USE settings.
+ exit 1
+ fi
+
+ if use spf; then
+ myconf="${myconf} -lspf2"
+ sed -i "s:# EXPERIMENTAL_SPF=yes:EXPERIMENTAL_SPF=yes:" Makefile
+ mycflags="${mycflags} -DEXPERIMENTAL_SPF"
+ fi
+ if use srs; then
+ myconf="${myconf} -lsrs_alt"
+ sed -i "s:# EXPERIMENTAL_SRS=yes:EXPERIMENTAL_SRS=yes:" Makefile
+ fi
+
+ # enable optional exim_monitor support via X use flag bug #46778
+ if use X; then
+ einfo "Configuring eximon"
+ cp ../exim_monitor/EDITME eximon.conf
+ sed -i "s:# EXIM_MONITOR=eximon.bin:EXIM_MONITOR=eximon.bin:" Makefile
+ fi
+ if use perl; then
+ sed -i "s:# EXIM_PERL=perl.o:EXIM_PERL=perl.o:" Makefile
+ fi
+ # mbox useflag renamed, see bug #110741
+ if use mbx; then
+ sed -i "s:# SUPPORT_MBX=yes:SUPPORT_MBX=yes:" Makefile
+ fi
+ if use pam; then
+ sed -i "s:# \(SUPPORT_PAM=yes\):\1:" Makefile
+ myconf="${myconf} -lpam"
+ fi
+ if use sasl; then
+ sed -i "s:# CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/var/state/saslauthd/mux:CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/var/lib/sasl2/mux:" Makefile
+ sed -i "s:# AUTH_CYRUS_SASL=yes:AUTH_CYRUS_SASL=yes:" Makefile
+ myconf="${myconf} -lsasl2"
+ fi
+ if use tcpd; then
+ sed -i "s:# \(USE_TCP_WRAPPERS=yes\):\1:" Makefile
+ myconf="${myconf} -lwrap"
+ fi
+ if use lmtp; then
+ sed -i "s:# TRANSPORT_LMTP=yes:TRANSPORT_LMTP=yes:" Makefile
+ fi
+ if use ipv6; then
+ echo "HAVE_IPV6=YES" >> Makefile
+ # to fix bug #41196
+ echo "IPV6_USE_INET_PTON=yes" >> Makefile
+ fi
+ if use dovecot-sasl; then
+ sed -i "s:# AUTH_DOVECOT=yes:AUTH_DOVECOT=yes:" Makefile
+ fi
+ if use radius; then
+ myconf="${myconf} -lradiusclient"
+ sed -i "s:# RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf:RADIUS_CONFIG_FILE=${EPREFIX}/etc/radiusclient/radiusclient.conf:" Makefile
+ sed -i "s:# RADIUS_LIB_TYPE=RADIUSCLIENT$:RADIUS_LIB_TYPE=RADIUSCLIENT:" Makefile
+ fi
+ echo "EXTRALIBS=${myconf}" >> Makefile
+
+ # make iconv usage explicit
+ echo "HAVE_ICONV=yes" >> Makefile
+ # if we use libiconv, now is the time to tell so
+ use !elibc_glibc && echo "EXTRALIBS_EXIM=-liconv" >> Makefile
+
+ if use ssl; then
+ echo "SUPPORT_TLS=yes" >> Makefile
+ if use gnutls; then
+ echo "USE_GNUTLS=yes" >> Makefile
+ echo "USE_GNUTLS_PC=gnutls" >> Makefile
+ else
+ echo "USE_OPENSSL_PC=openssl" >> Makefile
+ fi
+ fi
+
+ LOOKUP_INCLUDE=
+ LOOKUP_LIBS=
+
+ if use ldap; then
+ sed -i \
+ -e "s:# \(LOOKUP_LDAP=yes\):\1:" \
+ -e "s:# \(LDAP_LIB_TYPE=OPENLDAP2\):\1:" Makefile
+ LOOKUP_INCLUDE="-I${EROOT}usr/include/ldap"
+ LOOKUP_LIBS="-lldap -llber"
+ fi
+
+ if use mysql; then
+ sed -i "s:# LOOKUP_MYSQL=yes:LOOKUP_MYSQL=yes:" Makefile
+ LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I${EROOT}usr/include/mysql"
+ LOOKUP_LIBS="$LOOKUP_LIBS -lmysqlclient"
+ fi
+
+ if use postgres; then
+ sed -i "s:# LOOKUP_PGSQL=yes:LOOKUP_PGSQL=yes:" Makefile
+ LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I${EROOT}usr/include/postgresql"
+ LOOKUP_LIBS="$LOOKUP_LIBS -lpq"
+ fi
+
+ if use sqlite; then
+ echo "LOOKUP_SQLITE=yes" >> Makefile
+ echo "LOOKUP_SQLITE_PC=sqlite3" >> Makefile
+ fi
+
+ if [[ -n ${LOOKUP_INCLUDE} ]]; then
+ sed -i "s:# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include:LOOKUP_INCLUDE=$LOOKUP_INCLUDE:" \
+ Makefile
+ fi
+
+ if [[ -n ${LOOKUP_LIBS} ]]; then
+ sed -i "s:# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3:LOOKUP_LIBS=$LOOKUP_LIBS:" \
+ Makefile
+ fi
+
+ sed -i "s:# LOOKUP_DSEARCH=yes:LOOKUP_DSEARCH=yes:" Makefile
+
+ if use dnsdb; then
+ sed -i "s:# LOOKUP_DNSDB=yes:LOOKUP_DNSDB=yes:" Makefile
+ fi
+ sed -i "s:# LOOKUP_CDB=yes:LOOKUP_CDB=yes:" Makefile
+
+ if use nis; then
+ sed -i -e "s:# LOOKUP_NIS=yes:LOOKUP_NIS=yes:" \
+ -e "s:# LOOKUP_NISPLUS=yes:LOOKUP_NISPLUS=yes:" Makefile
+ fi
+ if use syslog; then
+ sed -i "s:LOG_FILE_PATH=/var/log/exim/exim_%s.log:LOG_FILE_PATH=syslog:" Makefile
+ fi
+ if ! use dkim; then
+ # DKIM is enabled by default. We have to explicitly disable it.
+ echo "DISABLE_DKIM=yes">> Makefile
+ fi
+ if use dcc; then
+ echo "EXPERIMENTAL_DCC=yes">> Makefile
+ fi
+ if use dsn; then
+ sed -i -e "s:#define SUPPORT_DSN:define SUPPORT_DSN:" Makefile
+ fi
+
+ # use the "native" interface to the DBM library
+ echo "USE_DB=yes" >> Makefile
+ echo "DBMLIB=-ldb" >> Makefile
+}
+
+src_compile() {
+ emake -j1 CC="$(tc-getCC)" HOSTCC="$(tc-getCC $CBUILD)" \
+ AR="$(tc-getAR) cq" RANLIB="$(tc-getRANLIB)" FULLECHO='' \
+ || die "make failed"
+}
+
+src_install () {
+ cd "${S}"/build-exim-gentoo
+ exeinto /usr/sbin
+ doexe exim
+ if use X; then
+ doexe eximon.bin
+ doexe eximon
+ fi
+ fperms 4755 /usr/sbin/exim
+
+ dodir /usr/bin /usr/sbin /usr/lib
+
+ dosym exim /usr/sbin/sendmail
+ dosym exim /usr/sbin/rsmtp
+ dosym exim /usr/sbin/rmail
+ dosym /usr/sbin/exim /usr/bin/mailq
+ dosym /usr/sbin/exim /usr/bin/newaliases
+ dosym /usr/sbin/sendmail /usr/lib/sendmail
+
+ exeinto /usr/sbin
+ for i in exicyclog exim_dbmbuild exim_dumpdb exim_fixdb exim_lock \
+ exim_tidydb exinext exiwhat exigrep eximstats exiqsumm exiqgrep \
+ convert4r3 convert4r4 exipick
+ do
+ doexe $i
+ done
+
+ dodoc "${S}"/doc/*
+ doman "${S}"/doc/exim.8
+ use dsn && dodoc "${S}"/README.DSN
+ use doc && dohtml -r "${WORKDIR}"/${PN}-html-${PV//rc/RC}/doc/html/spec_html/*
+
+ # conf files
+ insinto /etc/exim
+ newins "${S}"/src/configure.default.orig exim.conf.dist
+ if use exiscan-acl; then
+ newins "${S}"/src/configure.default exim.conf.exiscan-acl
+ fi
+ doins "${WORKDIR}"/system_filter.exim
+ doins "${FILESDIR}"/auth_conf.sub
+
+ pamd_mimic system-auth exim auth account
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/exim.logrotate" exim
+
+ newinitd "${FILESDIR}"/exim.rc7 exim
+
+ newconfd "${FILESDIR}"/exim.confd exim
+
+ DIROPTIONS="--mode=0750 --owner=${MAILUSER} --group=${MAILGROUP}"
+ dodir /var/log/${PN}
+}
+
+pkg_postinst() {
+ if [[ ! -f ${EROOT}etc/exim/exim.conf ]] ; then
+ einfo "${EROOT}etc/exim/system_filter.exim is a sample system_filter."
+ einfo "${EROOT}etc/exim/auth_conf.sub contains the configuration sub for using smtp auth."
+ einfo "Please create ${EROOT}etc/exim/exim.conf from ${EROOT}etc/exim/exim.conf.dist."
+ fi
+ if use dcc ; then
+ einfo "DCC support is experimental, you can find some limited"
+ einfo "documentation at the bottom of this prerelease message:"
+ einfo "http://article.gmane.org/gmane.mail.exim.devel/3579"
+ fi
+ einfo "Exim maintains some db files under its spool directory that need"
+ einfo "cleaning from time to time. (${EROOT}var/spool/exim/db)"
+ einfo "Please use the exim_tidydb tool as documented in the Exim manual:"
+ einfo "http://www.exim.org/exim-html-current/doc/html/spec_html/ch50.html#SECThindatmai"
+}