1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools linux-info systemd
8 DESCRIPTION="BitTorrent Client using libtorrent"
9 HOMEPAGE="https://rakshasa.github.io/rtorrent/"
10 SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
14 KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
15 IUSE="daemon debug selinux test xmlrpc"
16 RESTRICT="!test? ( test )"
18 COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
19 >=dev-libs/libsigc++-2.2.2:2
20 >=net-misc/curl-7.19.1
22 xmlrpc? ( dev-libs/xmlrpc-c )"
23 RDEPEND="${COMMON_DEPEND}
24 daemon? ( app-misc/screen )
25 selinux? ( sec-policy/selinux-rtorrent )
27 DEPEND="${COMMON_DEPEND}
31 DOCS=( doc/rtorrent.rc )
34 "${FILESDIR}/${PN}-0.9.7-tinfo.patch"
38 if ! linux_config_exists || ! linux_chkconfig_present IPV6; then
39 ewarn "rtorrent will not start without IPv6 support in your kernel"
40 ewarn "without further configuration. Please set bind=0.0.0.0 or"
41 ewarn "similar in your rtorrent.rc"
42 ewarn "Upstream bug: https://github.com/rakshasa/rtorrent/issues/732"
49 # https://github.com/rakshasa/rtorrent/issues/332
50 cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
58 # configure needs bash or script bombs out on some null shift, bug #291229
59 CONFIG_SHELL=${BASH} econf \
61 $(use_with xmlrpc xmlrpc-c)
69 newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
70 newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
71 systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"