app-benchmarks/bootchart2: fix python_setup

* Call python-single-r1_pkg_setup (i.e. python_setup) conditionally
  based on USE=cairo to match the other Python conditionals
* Fix style (conditional last, not first in *DEPEND; whitespace; variable
  order)

Closes: https://bugs.gentoo.org/950448
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2025-04-19 02:26:01 +01:00
parent 012e58054c
commit ace8b37ca2
No known key found for this signature in database
GPG Key ID: 738409F520DF9190

View File

@ -1,15 +1,16 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} pypy3 )
PYTHON_COMPAT=( python3_{10..11} 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"
S="${WORKDIR}"/${PN%2}-${PV}
LICENSE="GPL-2"
SLOT="0"
@ -20,13 +21,14 @@ 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
cairo? (
${PYTHON_DEPS}
$(python_gen_cond_dep 'dev-python/pycairo[${PYTHON_USEDEP}]')
)
"
BDEPEND="cairo? ( ${PYTHON_DEPS} )"
S="${WORKDIR}"/${PN%2}-${PV}
CONFIG_CHECK="~PROC_EVENTS ~TASKSTATS ~TASK_DELAY_ACCT ~TMPFS"
PATCHES=(
@ -34,9 +36,13 @@ PATCHES=(
"${FILESDIR}"/${P}-glibc-2.36.patch
)
pkg_setup() {
use cairo && python-single_r1_pkg_setup
}
src_prepare() {
default
python_setup
tc-export CC
# Redirects systemd unit directory,