dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / net-p2p / rtorrent / rtorrent-0.9.7.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools linux-info systemd
7
8 DESCRIPTION="BitTorrent Client using libtorrent"
9 HOMEPAGE="https://rakshasa.github.io/rtorrent/"
10 SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
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 )"
17
18 COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
19         >=dev-libs/libsigc++-2.2.2:2
20         >=net-misc/curl-7.19.1
21         sys-libs/ncurses:0=
22         xmlrpc? ( dev-libs/xmlrpc-c )"
23 RDEPEND="${COMMON_DEPEND}
24         daemon? ( app-misc/screen )
25         selinux? ( sec-policy/selinux-rtorrent )
26 "
27 DEPEND="${COMMON_DEPEND}
28         dev-util/cppunit
29         virtual/pkgconfig"
30
31 DOCS=( doc/rtorrent.rc )
32
33 PATCHES=(
34         "${FILESDIR}/${PN}-0.9.7-tinfo.patch"
35 )
36
37 pkg_setup() {
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"
43         fi
44 }
45
46 src_prepare() {
47         default
48
49         # https://github.com/rakshasa/rtorrent/issues/332
50         cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
51
52         eautoreconf
53 }
54
55 src_configure() {
56         default
57
58         # configure needs bash or script bombs out on some null shift, bug #291229
59         CONFIG_SHELL=${BASH} econf \
60                 $(use_enable debug) \
61                 $(use_with xmlrpc xmlrpc-c)
62 }
63
64 src_install() {
65         default
66         doman doc/rtorrent.1
67
68         if use daemon; then
69                 newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
70                 newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
71                 systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"
72         fi
73 }