Diff maildrop-2.9.0 with a maildrop-3.0.0

/usr/portage/mail-filter/maildrop/maildrop-3.0.0.ebuild 2019-06-05 10:39:00.000000000 +0300
1
# Copyright 1999-2017 Gentoo Foundation
1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=7
5 5
inherit flag-o-matic autotools
6 6

  
7 7
DESCRIPTION="Mail delivery agent/filter"
8 8
[[ -z ${PV/?.?/}   ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
9 9
[[ -z ${PV/?.?.?/} ]] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
10
[[ -z ${SRC_URI}   ]] && SRC_URI="http://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
11
HOMEPAGE="http://www.courier-mta.org/maildrop/"
10
[[ -z ${SRC_URI}   ]] && SRC_URI="https://www.courier-mta.org/beta/${PN}/${P%%_pre}.tar.bz2"
11
HOMEPAGE="https://www.courier-mta.org/maildrop/"
12 12

  
13 13
LICENSE="GPL-3"
14 14
SLOT="0"
15
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
15
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 ~sh sparc x86"
16 16
IUSE="berkdb debug dovecot fam gdbm ldap mysql postgres static-libs authlib +tools trashquota"
17 17

  
18 18
CDEPEND="!mail-mta/courier
19 19
	net-mail/mailbase
20 20
	dev-libs/libpcre
21
	net-dns/libidn
21
	net-dns/libidn:0=
22 22
	>=net-libs/courier-unicode-2.0
23 23
	gdbm?     ( >=sys-libs/gdbm-1.8.0 )
24 24
	mysql?    ( net-libs/courier-authlib )
......
27 27
	authlib?  ( net-libs/courier-authlib )
28 28
	fam?      ( virtual/fam )
29 29
	!gdbm? (
30
		berkdb? ( >=sys-libs/db-3:* )
30
		berkdb? ( >=sys-libs/db-3:= )
31 31
	)
32 32
	tools? (
33 33
		!mail-mta/netqmail
34 34
		!net-mail/courier-imap
35 35
		!mail-mta/mini-qmail
36
		!mail-mta/qmail-ldap
36 37
	)"
37 38
DEPEND="${CDEPEND}
38 39
	virtual/pkgconfig"
39 40
RDEPEND="${CDEPEND}
40 41
	dev-lang/perl
41 42
	dovecot? ( net-mail/dovecot )"
42
REQUIRED_USE="mysql? ( authlib )
43
			postgres? ( authlib )
44
			ldap? ( authlib )"
43
REQUIRED_USE="
44
	mysql? ( authlib )
45
	postgres? ( authlib )
46
	ldap? ( authlib )"
45 47

  
46 48
S=${WORKDIR}/${P%%_pre}
47 49

  
......
52 54
	fi
53 55

  
54 56
	if ! use fam ; then
55
		epatch "${FILESDIR}"/${PN}-disable-fam.patch
57
		eapply -p0 "${FILESDIR}"/${PN}-disable-fam.patch
56 58
	fi
57 59

  
58 60
	# no need to error out if no default - it will be given to econf anyway
......
60 62
		's~AC_MSG_ERROR(Cannot determine default mailbox)~SPOOLDIR="./.maildir"~' \
61 63
		"${S}"/libs/maildrop/configure.ac || die "sed failed"
62 64

  
63
	epatch "${FILESDIR}"/${PN}-testsuite-r3.patch
65
	eapply "${FILESDIR}"/${P}-testsuite.patch
64 66
	eapply_user
65 67
	eautoreconf
66 68
}
67 69

  
68 70
src_configure() {
69
	local myconf
71
	local myeconfargs=(
72
		$(use_enable fam)
73
		--with-devel
74
		--disable-tempdir
75
		--enable-syslog=1
76
		--enable-use-flock=1
77
		--enable-use-dotlock=1
78
		--enable-restrict-trusted=1
79
		--enable-maildrop-uid=root
80
		--enable-maildrop-gid=mail
81
		--enable-sendmail=/usr/sbin/sendmail
82
		--cache-file="${S}"/configuring.cache
83
		$(use_enable static-libs static)
84
		$(use_enable dovecot dovecotauth)
85
		$(use_with trashquota)
86
	)
87

  
70 88
	local mytrustedusers="apache dspam root mail fetchmail"
71 89
	mytrustedusers+=" daemon postmaster qmaild mmdf vmail alias"
90
	myeconfargs+=( --enable-trusted-users="${mytrustedusers}" )
72 91

  
73 92
	# These flags make maildrop cry
74 93
	replace-flags -Os -O2
75 94
	filter-flags -fomit-frame-pointer
76 95

  
77 96
	if use gdbm ; then
78
		myconf="${myconf} --with-db=gdbm"
97
		myeconfargs+=( --with-db=gdbm )
79 98
	elif use berkdb ; then
80
		myconf="${myconf} --with-db=db"
99
		myeconfargs+=( --with-db=db )
81 100
	else
82
		myconf="${myconf} --without-db"
101
		myeconfargs+=( --without-db )
83 102
	fi
84 103

  
85 104
	if ! use mysql && ! use postgres && ! use ldap && ! use authlib ; then
86
		myconf="${myconf} --disable-authlib"
105
		myeconfargs+=( --disable-authlib )
87 106
	fi
88 107

  
89
	# Default mailbox is $HOME/.maildir for Gentoo
90
	maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf \
91
		$(use_enable fam) \
92
		--disable-dependency-tracker \
93
		--with-devel \
94
		--disable-tempdir \
95
		--enable-syslog=1 \
96
		--enable-use-flock=1 \
97
		--enable-use-dotlock=1 \
98
		--enable-restrict-trusted=1 \
99
		--enable-trusted-users="${mytrustedusers}" \
100
		--enable-maildrop-uid=root \
101
		--enable-maildrop-gid=mail \
102
		--enable-sendmail=/usr/sbin/sendmail \
103
		--cache-file="${S}"/configuring.cache \
104
		$(use_enable static-libs static) \
105
		$(use_enable dovecot dovecotauth) \
106
		$(use_with trashquota) \
107
		${myconf}
108
	# default mailbox is $HOME/.maildir for Gentoo
109
	maildrop_cv_SYS_INSTALL_MBOXDIR="./.maildir" econf "${myeconfargs[@]}"
108 110
}
109 111

  
110 112
src_install() {
111
	emake DESTDIR="${D}" install
113
	default
112 114

  
113 115
	if use authlib ; then
114 116
		fperms 4755 /usr/bin/maildrop
......
121 123
	dodoc libs/maildir/AUTHORS libs/maildir/INSTALL \
122 124
		libs/maildir/README*.txt libs/maildir/*.html
123 125

  
124
	# bugs #61116 #374009
126
	# bugs 61116, 374009, and 639124
125 127
	if ! use tools ; then
126 128
		for tool in "maildirmake" "deliverquota"; do
127
			rm "${D}/usr/bin/${tool}"
128
			rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9]
129
			rm "${D}/usr/share/maildrop/html/${tool}.html"
129
			rm "${D}/usr/bin/${tool}" || die
130
			rm "${D}/usr/share/man/man"[0-9]"/${tool}."[0-9] || die
130 131
		done
131
		rm "${D}/usr/share/man/man5/maildir.5"
132
		rm "${D}/usr/share/man/man5/maildir.5" || die
132 133
	fi
133 134

  
134 135
	insinto /etc
Thank you!