From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1063631-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 1B364138334
	for <garchives@archives.gentoo.org>; Tue, 25 Dec 2018 19:29:59 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C82ECE08AB;
	Tue, 25 Dec 2018 19:29:57 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 8BB7CE08AB
	for <gentoo-commits@lists.gentoo.org>; Tue, 25 Dec 2018 19:29:57 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 9F472335C47
	for <gentoo-commits@lists.gentoo.org>; Tue, 25 Dec 2018 19:29:55 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 006254FB
	for <gentoo-commits@lists.gentoo.org>; Tue, 25 Dec 2018 19:29:54 +0000 (UTC)
From: "Tim Harder" <radhermit@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Tim Harder" <radhermit@gentoo.org>
Message-ID: <1545766137.7a9a1e95090d8c20172dbe7f51d267240cde2bd4.radhermit@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/maildrop/, mail-filter/maildrop/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: mail-filter/maildrop/Manifest mail-filter/maildrop/files/maildrop-3.0.0-testsuite.patch mail-filter/maildrop/maildrop-3.0.0.ebuild
X-VCS-Directories: mail-filter/maildrop/ mail-filter/maildrop/files/
X-VCS-Committer: radhermit
X-VCS-Committer-Name: Tim Harder
X-VCS-Revision: 7a9a1e95090d8c20172dbe7f51d267240cde2bd4
X-VCS-Branch: master
Date: Tue, 25 Dec 2018 19:29:54 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 35f01767-c788-4f5f-a721-b4390edcb3f9
X-Archives-Hash: bb130059e4dbc4b52a4076086950d5e8

commit:     7a9a1e95090d8c20172dbe7f51d267240cde2bd4
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 25 19:18:21 2018 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Tue Dec 25 19:28:57 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a9a1e95

mail-filter/maildrop: version bump to 3.0.0

Closes: https://bugs.gentoo.org/582928
Closes: https://bugs.gentoo.org/639124
Closes: https://bugs.gentoo.org/657288

Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>

 mail-filter/maildrop/Manifest                      |   1 +
 .../maildrop/files/maildrop-3.0.0-testsuite.patch  |  65 ++++++++++
 mail-filter/maildrop/maildrop-3.0.0.ebuild         | 140 +++++++++++++++++++++
 3 files changed, 206 insertions(+)

diff --git a/mail-filter/maildrop/Manifest b/mail-filter/maildrop/Manifest
index 80b622eee8d..1fdcf5a5137 100644
--- a/mail-filter/maildrop/Manifest
+++ b/mail-filter/maildrop/Manifest
@@ -1,3 +1,4 @@
 DIST maildrop-2.8.3.tar.bz2 1992695 BLAKE2B be17fa1ac38f8a54670e40f2b4207c2ee5e8976f20e29c6a528ccf50a716c8b4aedb0546a9722f1147573afd9d43f8a8caa59aec8bf9069ef833226cb2ea0562 SHA512 25168945764eda5c74641e205e3c784ca2ae27c15a5a6ddfe7a1c7b238cd6c3d5b0a3f7ce8b405b578d067f6f2aae5d7d6110da8bc89f91ac1c7fdc224ffd054
 DIST maildrop-2.8.5.tar.bz2 2072987 BLAKE2B e067e0ef77f850fd9ce97584893dd5301a7a91fcebea02351da8b22d3d7f0b74f3809cdc3874b29117a62d5c496962f72a5254470cd5f92b787b80d066f1fec1 SHA512 c04120af29ee8e72aeabd211301c5052fe4a2dc0f337074e1fa57b8adb9652512cd744e0bba3894a8b0e3b21a3511bbf4a4f045faec3536edb8be0f8bdc84cf5
 DIST maildrop-2.9.0.tar.bz2 2075698 BLAKE2B 2a918214e471a4a54aa7e0412e062ca85ac3ce4757bf4642fb0c0a9776a7c1b1bc417ef426c9bd7767d99b9d783085bf6c67f402ea43b0e7eba10c82d98b5619 SHA512 366a04d1e6e10ef1c824fbb5dfe406ff74fe17b80a46619fd8aa8cde3b4fef9a10b4ed3cc6329ed04632582d58104aaf16134c6dc82e17917b82fb6f18316dd6
+DIST maildrop-3.0.0.tar.bz2 2091018 BLAKE2B 3c8e3ae5c2c2f636b0223e2bafadcb88bf34be63c792a177febac5c41ccd50cab04755f14a26731c38a35531abea1faa70d4af5587a6e68a21735f050f2d46d8 SHA512 1f1e1682ec7c2d0c1f2e71059f186d9a9d3118194b1e558d3a6e5826721fb14a661f4d75df42ce2626430ac072b50e723b563ae00c1ebdeb4da96abfeb534eff

diff --git a/mail-filter/maildrop/files/maildrop-3.0.0-testsuite.patch b/mail-filter/maildrop/files/maildrop-3.0.0-testsuite.patch
new file mode 100644
index 00000000000..a6aa1626e1b
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-3.0.0-testsuite.patch
@@ -0,0 +1,65 @@
+Force en_US locale for certain tests.
+
+--- maildrop-3.0.0/libs/maildrop/Makefile.am
++++ maildrop-3.0.0/libs/maildrop/Makefile.am
+@@ -69,9 +69,11 @@
+ 	maildrop.lsm testsuite.txt.idn testsuite2
+ 
+ check-am:
++if HAS_EN_US
+ 	@chmod +x testsuite
+ 	./testsuite | cmp -s - $(srcdir)/testsuite.txt.idn
+ 	@SHELL@ $(srcdir)/testsuite2
++endif
+ 
+ noinst_DATA=maildrop.html maildrop.1 maildropfilter.html maildropfilter.7 \
+ 	maildropgdbm.html maildropgdbm.7
+--- maildrop-3.0.0/libs/maildrop/configure.ac
++++ maildrop-3.0.0/libs/maildrop/configure.ac
+@@ -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
+--- maildrop-3.0.0/libs/rfc2045/Makefile.am
++++ maildrop-3.0.0/libs/rfc2045/Makefile.am
+@@ -84,7 +84,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 -
+ 	./testrfc6533parser
++endif
++
+--- maildrop-3.0.0/libs/rfc2045/configure.ac
++++ maildrop-3.0.0/libs/rfc2045/configure.ac
+@@ -62,6 +62,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"

diff --git a/mail-filter/maildrop/maildrop-3.0.0.ebuild b/mail-filter/maildrop/maildrop-3.0.0.ebuild
new file mode 100644
index 00000000000..ede047b099f
--- /dev/null
+++ b/mail-filter/maildrop/maildrop-3.0.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit 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="https://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
+HOMEPAGE="https://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:0=
+	>=net-libs/courier-unicode-2.0
+	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
+		!mail-mta/qmail-ldap
+	)"
+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."
+	fi
+
+	if ! use fam ; then
+		eapply -p0 "${FILESDIR}"/${PN}-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"
+
+	eapply "${FILESDIR}"/${P}-testsuite.patch
+	eapply_user
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_enable fam)
+		--with-devel
+		--disable-tempdir
+		--enable-syslog=1
+		--enable-use-flock=1
+		--enable-use-dotlock=1
+		--enable-restrict-trusted=1
+		--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)
+	)
+
+	local mytrustedusers="apache dspam root mail fetchmail"
+	mytrustedusers+=" daemon postmaster qmaild mmdf vmail alias"
+	myeconfargs+=( --enable-trusted-users="${mytrustedusers}" )
+
+	# These flags make maildrop cry
+	replace-flags -Os -O2
+	filter-flags -fomit-frame-pointer
+
+	if use gdbm ; then
+		myeconfargs+=( --with-db=gdbm )
+	elif use berkdb ; then
+		myeconfargs+=( --with-db=db )
+	else
+		myeconfargs+=( --without-db )
+	fi
+
+	if ! use mysql && ! use postgres && ! use ldap && ! use authlib ; then
+		myeconfargs+=( --disable-authlib )
+	fi
+
+	# default mailbox is $HOME/.maildir for Gentoo
+	maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+
+	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 libs/maildir/*.html
+
+	# bugs 61116, 374009, and 639124
+	if ! use tools ; then
+		for tool in "maildirmake" "deliverquota"; do
+			rm "${D}/usr/bin/${tool}" || die
+			rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9] || die
+			rm "${D}/usr/share/maildrop/html/${tool}.html" || die
+		done
+		rm "${D}/usr/share/man/man5/maildir.5" || die
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/maildroprc
+
+	use static-libs || find "${D}"/usr/lib* -name '*.la' -delete
+}