1 |
commit: c27c310203920042096ade5157c985854d1b1487 |
2 |
Author: Paul Healy <lmiphay <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Mar 1 16:28:17 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 3 14:53:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c27c3102 |
7 |
|
8 |
sys-apps/dstat: correct python-r1 usage |
9 |
|
10 |
1. Call python_foreach_impl instead of the upstream make install target |
11 |
2. Install the rest of the files using install functions |
12 |
3. Follow https://dev.gentoo.org/~mgorny/python-guide/multi.html for |
13 |
REQUIRED_USE/RDEPEND/DEPEND values. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/710254 |
16 |
Signed-off-by: Paul Healy <lmiphay <AT> gmail.com> |
17 |
Closes: https://github.com/gentoo/gentoo/pull/14814 |
18 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
19 |
|
20 |
sys-apps/dstat/dstat-0.7.4-r1.ebuild | 59 ++++++++++++++++++++++++++++++++++++ |
21 |
1 file changed, 59 insertions(+) |
22 |
|
23 |
diff --git a/sys-apps/dstat/dstat-0.7.4-r1.ebuild b/sys-apps/dstat/dstat-0.7.4-r1.ebuild |
24 |
new file mode 100644 |
25 |
index 00000000000..b2f209299e7 |
26 |
--- /dev/null |
27 |
+++ b/sys-apps/dstat/dstat-0.7.4-r1.ebuild |
28 |
@@ -0,0 +1,59 @@ |
29 |
+# Copyright 1999-2020 Gentoo Authors |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=7 |
33 |
+ |
34 |
+PYTHON_COMPAT=( python{2_7,3_{6,7}} ) |
35 |
+ |
36 |
+inherit python-r1 |
37 |
+ |
38 |
+DESCRIPTION="Versatile replacement for vmstat, iostat and ifstat" |
39 |
+HOMEPAGE="http://dag.wieers.com/home-made/dstat/" |
40 |
+SRC_URI="https://github.com/dagwieers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
41 |
+ |
42 |
+LICENSE="GPL-2" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~alpha amd64 ~arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" |
45 |
+IUSE="doc examples wifi" |
46 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
47 |
+ |
48 |
+RDEPEND=" |
49 |
+ ${PYTHON_DEPS} |
50 |
+ dev-python/six[${PYTHON_USEDEP}] |
51 |
+ wifi? ( |
52 |
+ net-wireless/python-wifi |
53 |
+ )" |
54 |
+DEPEND="${RDEPEND}" |
55 |
+ |
56 |
+PATCHES=( \ |
57 |
+ "${FILESDIR}/dstat-${PV}-skip-non-sandbox-tests.patch" \ |
58 |
+ "${FILESDIR}/fix-collections-deprecation-warning.patch" \ |
59 |
+) |
60 |
+ |
61 |
+src_prepare() { |
62 |
+ |
63 |
+ # bug fix: allow delay to be specified |
64 |
+ # backport from: https://github.com/dagwieers/dstat/pull/167/files |
65 |
+ sed -i -e 's; / op\.delay; // op.delay;' "dstat" || die |
66 |
+ |
67 |
+ default |
68 |
+} |
69 |
+ |
70 |
+src_install() { |
71 |
+ python_foreach_impl python_doscript dstat |
72 |
+ |
73 |
+ insinto /usr/share/dstat |
74 |
+ newins dstat dstat.py |
75 |
+ doins plugins/dstat_*.py |
76 |
+ |
77 |
+ doman docs/dstat.1 |
78 |
+ |
79 |
+ einstalldocs |
80 |
+ |
81 |
+ if use examples; then |
82 |
+ dodoc examples/{mstat,read}.py |
83 |
+ fi |
84 |
+ if use doc; then |
85 |
+ dodoc docs/*.html |
86 |
+ fi |
87 |
+} |