Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-benchmarks/bootchart2/
Date: Sun, 30 Jan 2022 16:17:36
Message-Id: 1643559424.df7e76bc57a1389c1fb23211157973e26aa24627.flow@gentoo
1 commit: df7e76bc57a1389c1fb23211157973e26aa24627
2 Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 30 16:13:29 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 30 16:17:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df7e76bc
7
8 app-benchmarks/bootchart2: add 0.14.9-r1
9
10 Bump to EAPI 8 and do not call python3 directly. Based on a patch by
11 Carlos "capozotte" [1].
12
13 1: https://bugs.gentoo.org/832220#c3
14
15 Closes: https://bugs.gentoo.org/832220
16 Closes: https://bugs.gentoo.org/832219
17 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
18
19 ...2-0.14.9.ebuild => bootchart2-0.14.9-r1.ebuild} | 37 +++++++++++++++-------
20 1 file changed, 25 insertions(+), 12 deletions(-)
21
22 diff --git a/app-benchmarks/bootchart2/bootchart2-0.14.9.ebuild b/app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild
23 similarity index 68%
24 rename from app-benchmarks/bootchart2/bootchart2-0.14.9.ebuild
25 rename to app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild
26 index 95f488b32786..6cd79686f3af 100644
27 --- a/app-benchmarks/bootchart2/bootchart2-0.14.9.ebuild
28 +++ b/app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild
29 @@ -1,9 +1,11 @@
30 # Copyright 1999-2022 Gentoo Authors
31 # Distributed under the terms of the GNU General Public License v2
32
33 -EAPI=7
34 +EAPI=8
35
36 -inherit linux-info systemd toolchain-funcs
37 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
38 +
39 +inherit linux-info python-single-r1 systemd toolchain-funcs
40
41 DESCRIPTION="Performance analysis and visualization of the system boot process"
42 HOMEPAGE="https://github.com/xrmx/bootchart"
43 @@ -14,12 +16,14 @@ SLOT="0"
44 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
45 IUSE="+cairo"
46
47 +REQUIRED_USE="cairo? ( ${PYTHON_REQUIRED_USE} )"
48 RESTRICT="!cairo? ( test )"
49
50 RDEPEND="
51 - !app-benchmarks/bootchart
52 - cairo? ( dev-python/pycairo )
53 - sys-apps/lsb-release"
54 + cairo? ( ${PYTHON_DEPS} $(python_gen_cond_dep 'dev-python/pycairo[${PYTHON_USEDEP}]') )
55 + sys-apps/lsb-release
56 +"
57 +BDEPEND="cairo? ( ${PYTHON_DEPS} )"
58
59 S="${WORKDIR}"/${PN%2}-${PV}
60
61 @@ -31,18 +35,17 @@ PATCHES=(
62
63 src_prepare() {
64 default
65 + python_setup
66 tc-export CC
67 +
68 + # Redirects systemd unit directory,
69 + # as well as disable the built-in python setup.
70 sed -i \
71 -e "/^SYSTEMD_UNIT_DIR/s:=.*:= $(systemd_get_systemunitdir):g" \
72 + -e "/^install/s:py-install-compile::g" \
73 + -e "/pybootchartgui.1/d" \
74 Makefile || die
75
76 - if ! use cairo; then
77 - sed -i \
78 - -e "/^install/s:py-install-compile::g" \
79 - -e "/pybootchartgui.1/d" \
80 - Makefile || die
81 - fi
82 -
83 sed -i \
84 -e '/^EXIT_PROC/s:^.*$:EXIT_PROC="agetty mgetty mingetty:g' \
85 bootchartd.conf bootchartd.in || die
86 @@ -56,6 +59,16 @@ src_install() {
87 export DOCDIR=/usr/share/doc/${PF}
88 default
89
90 + if use cairo; then
91 + doman pybootchartgui.1
92 +
93 + python_scriptinto /usr/bin
94 + python_newscript pybootchartgui{.py,}
95 +
96 + python_domodule pybootchartgui
97 + python_optimize
98 + fi
99 +
100 # Note: LIBDIR is hardcoded as /lib in collector/common.h, so we shouldn't
101 # just change it. Since no libraries are installed, /lib is fine.
102 keepdir /lib/bootchart/tmpfs