1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7,8} )
9 inherit python-single-r1 systemd toolchain-funcs autotools
11 DESCRIPTION="the legendary remote-mail retrieval and forwarding utility"
12 HOMEPAGE="http://www.fetchmail.info/"
13 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
15 LICENSE="GPL-2 public-domain"
17 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"
18 IUSE="ssl nls kerberos tk socks libressl"
19 REQUIRED_USE="tk? ( ${PYTHON_REQUIRED_USE} )"
21 RDEPEND="acct-user/fetchmail
23 !libressl? ( >=dev-libs/openssl-1.1.1:= )
24 libressl? ( dev-libs/libressl:= )
28 !libressl? ( >=dev-libs/openssl-1.0.2:= )
29 libressl? ( dev-libs/libressl:= )
31 nls? ( virtual/libintl )
32 !elibc_glibc? ( sys-libs/e2fsprogs-libs )
33 socks? ( net-proxy/dante )
36 $(python_gen_cond_dep '
37 dev-python/future[${PYTHON_MULTI_USEDEP}]
43 nls? ( sys-devel/gettext )"
45 DOCS="FAQ FEATURES NEWS NOTES README README.NTLM README.SSL* TODO"
48 "${FILESDIR}"/${PN}-6.3.26-python-optional.patch
53 use tk && python-single-r1_pkg_setup
58 # don't compile during src_install
59 use tk && : > "${S}"/py-compile
64 use tk || export PYTHON=:
71 $(use_with ssl ssl "${EPREFIX}/usr") \
72 $(use kerberos && echo "--with-ssl=${EPREFIX}/usr") \
73 $(use_with kerberos gssapi) \
74 $(use_with kerberos kerberos5) \
80 emake AR="$(tc-getAR)"
86 newinitd "${FILESDIR}"/fetchmail.initd fetchmail
87 newconfd "${FILESDIR}"/fetchmail.confd fetchmail
89 systemd_dounit "${FILESDIR}"/${PN}.service
90 systemd_newunit "${FILESDIR}"/${PN}_at.service "${PN}@.service"
91 systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
95 for f in contrib/* ; do
96 [ -f "${f}" ] && dodoc "${f}"
99 use tk && python_optimize
103 if [[ -z ${REPLACING_VERSIONS} ]]; then
104 elog "Please see /etc/conf.d/fetchmail if you want to adjust"
105 elog "the polling delay used by the fetchmail init script."