1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
8 inherit python-single-r1 systemd toolchain-funcs autotools
10 DESCRIPTION="the legendary remote-mail retrieval and forwarding utility"
11 HOMEPAGE="http://www.fetchmail.info/"
12 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
14 LICENSE="GPL-2 public-domain"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
17 IUSE="ssl nls kerberos tk socks libressl"
18 REQUIRED_USE="tk? ( ${PYTHON_REQUIRED_USE} )"
20 RDEPEND="acct-user/fetchmail
22 !libressl? ( >=dev-libs/openssl-1.0.2:= )
23 libressl? ( dev-libs/libressl:= )
27 !libressl? ( >=dev-libs/openssl-1.0.2:= )
28 libressl? ( dev-libs/libressl:= )
30 nls? ( virtual/libintl )
31 !elibc_glibc? ( sys-libs/e2fsprogs-libs )
32 socks? ( net-proxy/dante )
33 tk? ( ${PYTHON_DEPS} )"
37 nls? ( sys-devel/gettext )"
39 DOCS="FAQ FEATURES NEWS NOTES README README.NTLM README.SSL* TODO"
42 "${FILESDIR}"/${PN}-6.3.26-python-optional.patch
47 use tk && python-single-r1_pkg_setup
52 # don't compile during src_install
53 use tk && : > "${S}"/py-compile
58 use tk || export PYTHON=:
65 $(use_with ssl ssl "${EPREFIX}/usr") \
66 $(use kerberos && echo "--with-ssl=${EPREFIX}/usr") \
67 $(use_with kerberos gssapi) \
68 $(use_with kerberos kerberos5) \
74 emake AR="$(tc-getAR)"
80 newinitd "${FILESDIR}"/fetchmail.initd fetchmail
81 newconfd "${FILESDIR}"/fetchmail.confd fetchmail
83 systemd_dounit "${FILESDIR}"/${PN}.service
84 systemd_newunit "${FILESDIR}"/${PN}_at.service "${PN}@.service"
85 systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
89 for f in contrib/* ; do
90 [ -f "${f}" ] && dodoc "${f}"
93 use tk && python_optimize
97 if [[ -z ${REPLACING_VERSIONS} ]]; then
98 elog "Please see /etc/conf.d/fetchmail if you want to adjust"
99 elog "the polling delay used by the fetchmail init script."