1 |
commit: 195c8273b589be086190f3c3f0a4539cf04a17c9 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 17 17:58:36 2021 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 17 17:58:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=195c8273 |
7 |
|
8 |
net-p2p/bittornado-0.4.1_p20160925-r4: Fix sed for py38 |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
12 |
|
13 |
.../bittornado-0.4.1_p20160925-r4.ebuild | 60 ++++++++++++++++++++++ |
14 |
1 file changed, 60 insertions(+) |
15 |
|
16 |
diff --git a/net-p2p/bittornado/bittornado-0.4.1_p20160925-r4.ebuild b/net-p2p/bittornado/bittornado-0.4.1_p20160925-r4.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..b07789e6e0b |
19 |
--- /dev/null |
20 |
+++ b/net-p2p/bittornado/bittornado-0.4.1_p20160925-r4.ebuild |
21 |
@@ -0,0 +1,60 @@ |
22 |
+# Copyright 1999-2021 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python3_{7..10} ) |
28 |
+DISTUTILS_USE_SETUPTOOLS=no |
29 |
+inherit distutils-r1 |
30 |
+ |
31 |
+MY_PN=BitTornado |
32 |
+MY_P=${MY_PN}-${PV} |
33 |
+EGIT_COMMIT="ed327c4e1ebbe1fe949be81723527cfda87aeb8d" |
34 |
+ |
35 |
+DESCRIPTION="John Hoffman's fork of the original bittorrent" |
36 |
+HOMEPAGE="https://github.com/effigies/BitTornado" |
37 |
+SRC_URI="https://github.com/effigies/BitTornado/archive/${EGIT_COMMIT}.tar.gz -> ${MY_P}.tar.gz" |
38 |
+# GPL-2 is just for the init script from FILESDIR. |
39 |
+LICENSE="MIT GPL-2" |
40 |
+SLOT="0" |
41 |
+ |
42 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris" |
43 |
+IUSE="test" |
44 |
+RESTRICT="!test? ( test )" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ dev-python/pycryptodome[${PYTHON_USEDEP}] |
48 |
+" |
49 |
+# Block dev-python/pytest-testmon for bug #693508. |
50 |
+DEPEND=" |
51 |
+ test? ( |
52 |
+ !!dev-python/pytest-testmon |
53 |
+ ) |
54 |
+" |
55 |
+ |
56 |
+S=${WORKDIR}/${MY_PN}-${EGIT_COMMIT} |
57 |
+ |
58 |
+distutils_enable_tests pytest |
59 |
+ |
60 |
+python_prepare_all() { |
61 |
+ # https://github.com/effigies/BitTornado/pull/53 |
62 |
+ sed -e 's:"BitTornado.Tracker":\0, "BitTornado.Types":' -i setup.py || die |
63 |
+ find "${S}" -name '*.py' -print0 | \ |
64 |
+ xargs --null -- \ |
65 |
+ sed -r -i ' |
66 |
+ s:time.clock\(\):time.perf_counter():g; |
67 |
+ s:collections.(MutableSet|Set|Sequence|Mapping):collections.abc.\1:g |
68 |
+ ' || die |
69 |
+ distutils-r1_python_prepare_all |
70 |
+} |
71 |
+ |
72 |
+python_test() { |
73 |
+ epytest BitTornado/tests |
74 |
+} |
75 |
+ |
76 |
+python_install_all() { |
77 |
+ distutils-r1_python_install_all |
78 |
+ |
79 |
+ newconfd "${FILESDIR}"/bttrack.conf bttrack |
80 |
+ newinitd "${FILESDIR}"/bttrack.rc bttrack |
81 |
+} |