diff options
author | 2022-01-30 17:13:29 +0100 | |
---|---|---|
committer | 2022-01-30 17:17:04 +0100 | |
commit | df7e76bc57a1389c1fb23211157973e26aa24627 (patch) | |
tree | 14b9dddd9e19a17dc50cdeba0e74633c72e5006f /app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild | |
parent | sys-kernel/git-sources: Linux version bump (diff) | |
download | gentoo-df7e76bc57a1389c1fb23211157973e26aa24627.tar.gz gentoo-df7e76bc57a1389c1fb23211157973e26aa24627.tar.bz2 gentoo-df7e76bc57a1389c1fb23211157973e26aa24627.zip |
app-benchmarks/bootchart2: add 0.14.9-r1
Bump to EAPI 8 and do not call python3 directly. Based on a patch by
Carlos "capozotte" [1].
1: https://bugs.gentoo.org/832220#c3
Closes: https://bugs.gentoo.org/832220
Closes: https://bugs.gentoo.org/832219
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild')
-rw-r--r-- | app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild b/app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild new file mode 100644 index 000000000000..6cd79686f3af --- /dev/null +++ b/app-benchmarks/bootchart2/bootchart2-0.14.9-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} pypy3 ) + +inherit linux-info python-single-r1 systemd toolchain-funcs + +DESCRIPTION="Performance analysis and visualization of the system boot process" +HOMEPAGE="https://github.com/xrmx/bootchart" +SRC_URI="https://github.com/xrmx/bootchart/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+cairo" + +REQUIRED_USE="cairo? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!cairo? ( test )" + +RDEPEND=" + cairo? ( ${PYTHON_DEPS} $(python_gen_cond_dep 'dev-python/pycairo[${PYTHON_USEDEP}]') ) + sys-apps/lsb-release +" +BDEPEND="cairo? ( ${PYTHON_DEPS} )" + +S="${WORKDIR}"/${PN%2}-${PV} + +CONFIG_CHECK="~PROC_EVENTS ~TASKSTATS ~TASK_DELAY_ACCT ~TMPFS" + +PATCHES=( + "${FILESDIR}"/${PN}-0.14.8-no-compressed-man.patch +) + +src_prepare() { + default + python_setup + tc-export CC + + # Redirects systemd unit directory, + # as well as disable the built-in python setup. + sed -i \ + -e "/^SYSTEMD_UNIT_DIR/s:=.*:= $(systemd_get_systemunitdir):g" \ + -e "/^install/s:py-install-compile::g" \ + -e "/pybootchartgui.1/d" \ + Makefile || die + + sed -i \ + -e '/^EXIT_PROC/s:^.*$:EXIT_PROC="agetty mgetty mingetty:g' \ + bootchartd.conf bootchartd.in || die +} + +src_test() { + emake test +} + +src_install() { + export DOCDIR=/usr/share/doc/${PF} + default + + if use cairo; then + doman pybootchartgui.1 + + python_scriptinto /usr/bin + python_newscript pybootchartgui{.py,} + + python_domodule pybootchartgui + python_optimize + fi + + # Note: LIBDIR is hardcoded as /lib in collector/common.h, so we shouldn't + # just change it. Since no libraries are installed, /lib is fine. + keepdir /lib/bootchart/tmpfs + + newinitd "${FILESDIR}"/${PN}.init ${PN} +} + +pkg_postinst() { + elog "If you are using an initrd during boot" + elog "please add the init script to your default runlevel" + if has_version sys-apps/openrc; then + elog "rc-update add bootchart2 default" + fi +} |