mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-util/uncrustify: require python always; correctly find it
The build uses several python code generators. The package worked anyway despite pkg_setup only running for USE=test, because it always found the latest version, ignoring PYTHON_COMPAT entirely. This occurs because cmake.eclass no longer forces the python_setup executable to be found. Bug: https://bugs.gentoo.org/959154 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -21,11 +21,13 @@ HOMEPAGE="https://uncrustify.sourceforge.net/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="test? ( ${PYTHON_DEPS} )"
|
||||
BDEPEND="${PYTHON_DEPS}"
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DPython3_FIND_STRATEGY=LOCATION
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -21,11 +21,13 @@ HOMEPAGE="https://uncrustify.sourceforge.net/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="test? ( ${PYTHON_DEPS} )"
|
||||
BDEPEND="${PYTHON_DEPS}"
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DPython3_FIND_STRATEGY=LOCATION
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -12,22 +12,22 @@ else
|
||||
S=${WORKDIR}/${PN}-${P}
|
||||
fi
|
||||
|
||||
inherit cmake ${scm_eclass}
|
||||
|
||||
PYTHON_COMPAT=( python3_{9..12} )
|
||||
|
||||
inherit python-any-r1
|
||||
inherit cmake python-any-r1 ${scm_eclass}
|
||||
|
||||
DESCRIPTION="C/C++/C#/D/Java/Pawn code indenter and beautifier"
|
||||
HOMEPAGE="https://uncrustify.sourceforge.net/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="test? ( ${PYTHON_DEPS} )"
|
||||
BDEPEND="${PYTHON_DEPS}"
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DPython3_FIND_STRATEGY=LOCATION
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user