1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic autotools
8 DESCRIPTION="An extensible POP3 server with vmail-sql/MySQL support"
9 HOMEPAGE="https://savannah.nongnu.org/projects/tpop3d/"
10 SRC_URI="mirror://nongnu/tpop3d/${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="authexternal debug flatfile gdbm ldap maildir mbox mysql offensive
16 pam passwd perl postgres +sha1 shadow ssl tcpd"
18 RDEPEND="sha1? ( >=dev-libs/openssl-0.9.6:0= )
19 ssl? ( >=dev-libs/openssl-0.9.6:0= )
20 ldap? ( >=net-nds/openldap-2.0.7 )
21 mysql? ( dev-db/mysql-connector-c:0= )
22 postgres? ( dev-db/postgresql[server] )
23 perl? ( >=dev-lang/perl-5.6.1 )
25 >=net-mail/mailbase-0.00-r8 )
26 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
30 PATCHES=( "${FILESDIR}/${PN}-1.5.4-gold.patch" )
41 # Various authentication methods
42 use authexternal && myconf="${myconf} --enable-auth-other"
43 use flatfile && myconf="${myconf} --enable-auth-flatfile"
44 use gdbm && myconf="${myconf} --enable-auth-gdbm"
45 use ldap && myconf="${myconf} --enable-auth-ldap"
46 use mysql && myconf="${myconf} --enable-auth-mysql --with-mysql-lib-dir=$(mysql_config --variable=pkglibdir)"
47 use pam || myconf="${myconf} --disable-auth-pam"
48 use passwd && myconf="${myconf} --enable-auth-passwd"
49 use perl && myconf="${myconf} --enable-auth-perl"
50 use postgres && myconf="${myconf} --enable-auth-pgsql"
51 use shadow && myconf="${myconf} --enable-auth-passwd --enable-shadow-passwords"
53 use authexternal || use flatfile || use gdbm || use ldap || use mysql ||
54 use pam || use passwd || use perl || use postgres || use shadow ||
57 if [[ ${noauth} -eq 1 ]]; then
58 ewarn "None of tpop3d's authentication mechanism USE flags are set."
59 ewarn "As a result tpop3d will be built with /etc/passwd authentication only."
60 myconf="${myconf} --enable-auth-passwd"
63 # Other optional features
64 use debug && myconf="${myconf} --enable-backtrace"
65 use maildir && myconf="${myconf} --enable-mbox-maildir"
66 use mbox || myconf="${myconf} --disable-mbox-bsd"
67 use offensive || myconf="${myconf} --disable-snide-comments"
68 use sha1 || myconf="${myconf} --disable-sha1-passwords"
69 use ssl && myconf="${myconf} --enable-tls"
70 use tcpd && myconf="${myconf} --enable-tcp-wrappers"
74 # Causes crash with "stack smashing attack" on connect, because of bug in
76 filter-flags -fstack-protector
85 dosym pop3 /etc/pam.d/tpop3d
88 newinitd "${FILESDIR}/${PN}-1.5.4.init" tpop3d
92 elog "Read the tpop3d.conf manpage"
93 elog "Please create /etc/tpop3d/tpop3d.conf to fit your configuration"