1 |
commit: 02114366f60e28c528b8f94c5a5f27ac25b5d3c9 |
2 |
Author: Stephen Shkardoon <ss23 <AT> ss23 <DOT> geek <DOT> nz> |
3 |
AuthorDate: Sat Jun 30 04:09:03 2018 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 3 05:57:02 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02114366 |
7 |
|
8 |
net-p2p/rtorrent: Patch configure to allow cross compiling |
9 |
|
10 |
Patch already merged upstream |
11 |
https://github.com/rakshasa/rtorrent/pull/753 |
12 |
|
13 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=446186 |
14 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
15 |
|
16 |
.../files/rtorrent-0.9.7-execinfo-configure.patch | 23 +++++++ |
17 |
net-p2p/rtorrent/rtorrent-0.9.7-r1.ebuild | 74 ++++++++++++++++++++++ |
18 |
2 files changed, 97 insertions(+) |
19 |
|
20 |
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.7-execinfo-configure.patch b/net-p2p/rtorrent/files/rtorrent-0.9.7-execinfo-configure.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..2c7ce5222b8 |
23 |
--- /dev/null |
24 |
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.7-execinfo-configure.patch |
25 |
@@ -0,0 +1,23 @@ |
26 |
+From f84670dd6394729158569a7a5366a00a7d1dccb2 Mon Sep 17 00:00:00 2001 |
27 |
+From: Stephen Shkardoon <ss23@×××××××××.nz> |
28 |
+Date: Mon, 25 Jun 2018 20:14:43 +1200 |
29 |
+Subject: [PATCH] Use AC_COMPILE instead of AC_RUN to check for execinfo.h |
30 |
+ |
31 |
+This way enables cross compiling, since we don't need to run anything during the configure script. |
32 |
+--- |
33 |
+ scripts/common.m4 | 2 +- |
34 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
35 |
+ |
36 |
+diff --git a/scripts/common.m4 b/scripts/common.m4 |
37 |
+index 9885b037..b1b815b1 100644 |
38 |
+--- a/scripts/common.m4 |
39 |
++++ b/scripts/common.m4 |
40 |
+@@ -153,7 +153,7 @@ dnl Need to fix this so that it uses the stuff defined by the system. |
41 |
+ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ |
42 |
+ AC_MSG_CHECKING(for execinfo.h) |
43 |
+ |
44 |
+- AC_RUN_IFELSE([AC_LANG_SOURCE([ |
45 |
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
46 |
+ #include <execinfo.h> |
47 |
+ int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} |
48 |
+ ])], |
49 |
|
50 |
diff --git a/net-p2p/rtorrent/rtorrent-0.9.7-r1.ebuild b/net-p2p/rtorrent/rtorrent-0.9.7-r1.ebuild |
51 |
new file mode 100644 |
52 |
index 00000000000..74bf66d2a2c |
53 |
--- /dev/null |
54 |
+++ b/net-p2p/rtorrent/rtorrent-0.9.7-r1.ebuild |
55 |
@@ -0,0 +1,74 @@ |
56 |
+# Copyright 1999-2018 Gentoo Foundation |
57 |
+# Distributed under the terms of the GNU General Public License v2 |
58 |
+ |
59 |
+EAPI=6 |
60 |
+ |
61 |
+inherit autotools linux-info systemd |
62 |
+ |
63 |
+DESCRIPTION="BitTorrent Client using libtorrent" |
64 |
+HOMEPAGE="https://rakshasa.github.io/rtorrent/" |
65 |
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz" |
66 |
+ |
67 |
+LICENSE="GPL-2" |
68 |
+SLOT="0" |
69 |
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris" |
70 |
+IUSE="daemon debug selinux test xmlrpc" |
71 |
+ |
72 |
+COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.} |
73 |
+ >=dev-libs/libsigc++-2.2.2:2 |
74 |
+ >=net-misc/curl-7.19.1 |
75 |
+ sys-libs/ncurses:0= |
76 |
+ xmlrpc? ( dev-libs/xmlrpc-c )" |
77 |
+RDEPEND="${COMMON_DEPEND} |
78 |
+ daemon? ( app-misc/screen ) |
79 |
+ selinux? ( sec-policy/selinux-rtorrent ) |
80 |
+" |
81 |
+DEPEND="${COMMON_DEPEND} |
82 |
+ dev-util/cppunit |
83 |
+ virtual/pkgconfig" |
84 |
+ |
85 |
+DOCS=( doc/rtorrent.rc ) |
86 |
+ |
87 |
+PATCHES=( |
88 |
+ "${FILESDIR}/${PN}-0.9.7-tinfo.patch" |
89 |
+ "${FILESDIR}/${PN}-0.9.7-execinfo-configure.patch" |
90 |
+) |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ if ! linux_config_exists || ! linux_chkconfig_present IPV6; then |
94 |
+ ewarn "rtorrent will not start without IPv6 support in your kernel" |
95 |
+ ewarn "without further configuration. Please set bind=0.0.0.0 or" |
96 |
+ ewarn "similar in your rtorrent.rc" |
97 |
+ ewarn "Upstream bug: https://github.com/rakshasa/rtorrent/issues/732" |
98 |
+ fi |
99 |
+} |
100 |
+ |
101 |
+src_prepare() { |
102 |
+ default |
103 |
+ |
104 |
+ # https://github.com/rakshasa/rtorrent/issues/332 |
105 |
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die |
106 |
+ |
107 |
+ eautoreconf |
108 |
+} |
109 |
+ |
110 |
+src_configure() { |
111 |
+ default |
112 |
+ |
113 |
+ # configure needs bash or script bombs out on some null shift, bug #291229 |
114 |
+ CONFIG_SHELL=${BASH} econf \ |
115 |
+ --disable-dependency-tracking \ |
116 |
+ $(use_enable debug) \ |
117 |
+ $(use_with xmlrpc xmlrpc-c) |
118 |
+} |
119 |
+ |
120 |
+src_install() { |
121 |
+ default |
122 |
+ doman doc/rtorrent.1 |
123 |
+ |
124 |
+ if use daemon; then |
125 |
+ newinitd "${FILESDIR}/rtorrentd.init" rtorrentd |
126 |
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd |
127 |
+ systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service" |
128 |
+ fi |
129 |
+} |