summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2015-09-22 05:44:06 +0000
committerEray Aslan <eras@gentoo.org>2015-09-22 05:44:06 +0000
commit3c9a4aadc606b9c5a55baa847c3cfd6bf353594b (patch)
tree78f735a61778889ac918f464f8ed1560fd2065d2 /mail-filter
parentdev-lang/erlang: Stable for PPC64 (bug #552444). (diff)
downloadgentoo-3c9a4aadc606b9c5a55baa847c3cfd6bf353594b.tar.gz
gentoo-3c9a4aadc606b9c5a55baa847c3cfd6bf353594b.tar.bz2
gentoo-3c9a4aadc606b9c5a55baa847c3cfd6bf353594b.zip
mail-filter/maildrop: version bump. do not setuid unnecessarily
Gentoo-Bug: 560678
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/maildrop/Manifest1
-rw-r--r--mail-filter/maildrop/files/maildrop-testsuite-r2.patch65
-rw-r--r--mail-filter/maildrop/maildrop-2.8.3.ebuild145
-rw-r--r--mail-filter/maildrop/metadata.xml1
4 files changed, 212 insertions, 0 deletions
diff --git a/mail-filter/maildrop/Manifest b/mail-filter/maildrop/Manifest
index 35a779783dd8..ddefc2641a61 100644
--- a/mail-filter/maildrop/Manifest
+++ b/mail-filter/maildrop/Manifest
@@ -1 +1,2 @@
DIST maildrop-2.6.0.tar.bz2 2174922 SHA256 afc115119b2d3197c565002e158c2cb69d525288bf72c71919c3c74096b824a9 SHA512 210841add8aff389589802f15ea74776815ecfd0dd9d5fb4f244d101e3d3f5dbb833a38f1d539b869c49685cfe34b0e6e014a5888c2537c9d89c68d754248db4 WHIRLPOOL c6d8f2be69a02fa757ac4dd653c22c79c8da6c2c1c112d48e0d4c491238d20e4c093d01f728ea337b1ba12bc75d88c5a252ff036114fe2339666776f2be44e80
+DIST maildrop-2.8.3.tar.bz2 1992695 SHA256 58245ccd759382761c4cdbeaefbd37622e01f1c48e71251b06ea085a890ce6c9 SHA512 25168945764eda5c74641e205e3c784ca2ae27c15a5a6ddfe7a1c7b238cd6c3d5b0a3f7ce8b405b578d067f6f2aae5d7d6110da8bc89f91ac1c7fdc224ffd054 WHIRLPOOL 9d8ea100ad125e814663c76539b41f208448b3259193008fade1291de7ec98efe8cf5b9f8b7f267acc9be78ccba1b28a8165d99d59d7d6ada4b99aa10cd163ea
diff --git a/mail-filter/maildrop/files/maildrop-testsuite-r2.patch b/mail-filter/maildrop/files/maildrop-testsuite-r2.patch
new file mode 100644
index 000000000000..479a8f5fceaf
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-testsuite-r2.patch
@@ -0,0 +1,65 @@
+--- libs/maildrop/configure.ac 2015-06-27 17:55:08.000000000 +0000
++++ libs/maildrop/configure.ac 2015-09-22 05:23:33.000000000 +0000
+@@ -195,6 +195,15 @@
+ AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE,
+ [ Maximum character size of a long ])
+
++dnl check for en_US locale
++check_en_US() {
++locale -a | grep en_US.utf8 > /dev/null
++return $?
++}
++AC_MSG_CHECKING([for en_US.utf8])
++AM_CONDITIONAL([HAS_EN_US], [check_en_US])
++AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])])
++
+ dnl Checks for library functions.
+
+ AC_FUNC_CLOSEDIR_VOID
+--- libs/maildrop/Makefile.am 2015-06-27 17:55:08.000000000 +0000
++++ libs/maildrop/Makefile.am 2015-09-22 05:24:29.000000000 +0000
+@@ -75,9 +75,13 @@
+ maildrop.lsm testsuite.txt.idn testsuite.txt.noidn testsuite2
+
+ check-am:
++if HAS_EN_US
+ @chmod +x testsuite
+ ./testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
+ @SHELL@ $(srcdir)/testsuite2
++else
++ echo ' Need en_US.utf8 to run tests'
++endif
+
+ noinst_DATA=maildrop.html maildrop.1 maildropfilter.html maildropfilter.7 \
+ maildropgdbm.html maildropgdbm.7
+--- libs/rfc2045/configure.ac 2014-02-16 09:00:13.000000000 +0000
++++ libs/rfc2045/configure.ac 2015-09-22 05:28:18.000000000 +0000
+@@ -60,6 +60,15 @@
+ AC_CHECK_FUNC(strncasecmp,,CFLAGS="$CFLAGS -Dstrncasecmp=strnicmp")
+ AC_CHECK_FUNC(strcasecmp,,CFLAGS="$CFLAGS -Dstrcasecmp=stricmp")
+
++dnl check for en_US locale
++check_en_US() {
++locale -a | grep en_US.utf8 > /dev/null
++return $?
++}
++AC_MSG_CHECKING([for en_US.utf8])
++AM_CONDITIONAL([HAS_EN_US], [check_en_US])
++AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])])
++
+ AC_ARG_WITH(package, [], package="$withval",
+ [
+ package="$PACKAGE"
+--- libs/rfc2045/Makefile.am 2015-02-28 17:59:41.000000000 +0000
++++ libs/rfc2045/Makefile.am 2015-09-22 05:29:08.000000000 +0000
+@@ -76,6 +76,10 @@
+ endif
+
+ check-am:
++if HAS_EN_US
+ @SHELL@ $(srcdir)/testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
+ @SHELL@ $(srcdir)/testsuitemm | cmp -s - $(srcdir)/testsuitemm.txt
+ @SHELL@ $(srcdir)/testrfc3676parsersuite | diff -U 3 $(srcdir)/testrfc3676parsersuite.txt -
++else
++ echo ' Need en_US.utf8 to run tests'
++endif
diff --git a/mail-filter/maildrop/maildrop-2.8.3.ebuild b/mail-filter/maildrop/maildrop-2.8.3.ebuild
new file mode 100644
index 000000000000..afc63acc956a
--- /dev/null
+++ b/mail-filter/maildrop/maildrop-2.8.3.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="Mail delivery agent/filter"
+[[ -z ${PV/?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+[[ -z ${PV/?.?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+[[ -z ${SRC_URI} ]] && SRC_URI="http://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
+HOMEPAGE="http://www.courier-mta.org/maildrop/"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="berkdb debug dovecot fam gdbm ldap mysql postgres static-libs authlib +tools trashquota"
+
+CDEPEND="!mail-mta/courier
+ net-mail/mailbase
+ dev-libs/libpcre
+ net-dns/libidn
+ net-libs/courier-unicode
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ mysql? ( net-libs/courier-authlib )
+ postgres? ( net-libs/courier-authlib )
+ ldap? ( net-libs/courier-authlib )
+ authlib? ( net-libs/courier-authlib )
+ fam? ( virtual/fam )
+ !gdbm? (
+ berkdb? ( >=sys-libs/db-3:* )
+ )
+ tools? (
+ !mail-mta/netqmail
+ !net-mail/courier-imap
+ !mail-mta/mini-qmail
+ )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ dev-lang/perl
+ dovecot? ( net-mail/dovecot )"
+REQUIRED_USE="mysql? ( authlib )
+ postgres? ( authlib )
+ ldap? ( authlib )"
+
+S=${WORKDIR}/${P%%_pre}
+
+src_prepare() {
+ # Prefer gdbm over berkdb
+ if use gdbm ; then
+ use berkdb && elog "Both gdbm and berkdb selected. Using gdbm."
+ elif use berkdb ; then
+ epatch "${FILESDIR}"/${PN}-2.5.1-db.patch
+ fi
+
+ if ! use fam ; then
+ epatch "${FILESDIR}"/${PN}-1.8.1-disable-fam.patch
+ fi
+
+ # no need to error out if no default - it will be given to econf anyway
+ sed -i -e \
+ 's~AC_MSG_ERROR(Cannot determine default mailbox)~SPOOLDIR="./.maildir"~' \
+ "${S}"/libs/maildrop/configure.ac || die "sed failed"
+ epatch "${FILESDIR}"/${PN}-testsuite-r2.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ local mytrustedusers="apache dspam root mail fetchmail"
+ mytrustedusers+=" daemon postmaster qmaild mmdf vmail alias"
+
+ # These flags make maildrop cry
+ replace-flags -Os -O2
+ filter-flags -fomit-frame-pointer
+
+ if use gdbm ; then
+ myconf="${myconf} --with-db=gdbm"
+ elif use berkdb ; then
+ myconf="${myconf} --with-db=db"
+ else
+ myconf="${myconf} --without-db"
+ fi
+
+ if ! use mysql && ! use postgres && ! use ldap && ! use authlib ; then
+ myconf="${myconf} --disable-authlib"
+ fi
+
+ # Default mailbox is $HOME/.maildir for Gentoo
+ maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf \
+ $(use_enable fam) \
+ --disable-dependency-tracker \
+ --with-devel \
+ --disable-tempdir \
+ --enable-syslog=1 \
+ --enable-use-flock=1 \
+ --enable-use-dotlock=1 \
+ --enable-restrict-trusted=1 \
+ --enable-trusted-users="${mytrustedusers}" \
+ --enable-maildrop-uid=root \
+ --enable-maildrop-gid=mail \
+ --enable-sendmail=/usr/sbin/sendmail \
+ --cache-file="${S}"/configuring.cache \
+ $(use_enable static-libs static) \
+ $(use_enable dovecot dovecotauth) \
+ $(use_with trashquota) \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use authlib ; then
+ fperms 4755 /usr/bin/maildrop
+ fi
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README \
+ README.postfix README.dovecotauth UPGRADE \
+ maildroptips.txt
+ docinto maildir
+ dodoc libs/maildir/AUTHORS libs/maildir/INSTALL \
+ libs/maildir/README*.txt
+
+ # bugs #61116 #374009
+ if ! use tools ; then
+ for tool in "maildirmake" "deliverquota"; do
+ rm "${D}/usr/bin/${tool}"
+ rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9]
+ rm "${D}/usr/share/maildrop/html/${tool}.html"
+ done
+ rm "${D}/usr/share/man/man5/maildir.5"
+ fi
+
+ dodir "/usr/share/doc/${PF}"
+ mv "${D}/usr/share/doc/maildrop/html" "${D}/usr/share/doc/${PF}/" || die
+ rm -rf "${D}"/usr/share/doc/maildrop
+
+ dohtml *.html libs/maildir/*.html
+
+ insinto /etc
+ doins "${FILESDIR}"/maildroprc
+
+ use static-libs || find "${D}"/usr/lib* -name '*.la' -delete
+}
diff --git a/mail-filter/maildrop/metadata.xml b/mail-filter/maildrop/metadata.xml
index 75e94b28412c..58142c1536a3 100644
--- a/mail-filter/maildrop/metadata.xml
+++ b/mail-filter/maildrop/metadata.xml
@@ -4,6 +4,7 @@
<herd>net-mail</herd>
<use>
<flag name="authlib">Add courier-authlib support</flag>
+ <flag name="dovecot">Add dovecot authentication support</flag>
<flag name="tools">Install maildirmake and deliverquota tools</flag>
<flag name="trashquota">Count deleted messages as part of the maildir quota</flag>
</use>