From e7e87eeca3b9dadcd5161a68692a0243134ead10 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 30 Jul 2025 00:48:11 -0400 Subject: [PATCH] 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 --- dev-util/uncrustify/uncrustify-0.76.0.ebuild | 14 ++++++++------ dev-util/uncrustify/uncrustify-0.81.0.ebuild | 14 ++++++++------ dev-util/uncrustify/uncrustify-9999.ebuild | 18 +++++++++--------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/dev-util/uncrustify/uncrustify-0.76.0.ebuild b/dev-util/uncrustify/uncrustify-0.76.0.ebuild index 0041f4754279d..9fe0b8d673c23 100644 --- a/dev-util/uncrustify/uncrustify-0.76.0.ebuild +++ b/dev-util/uncrustify/uncrustify-0.76.0.ebuild @@ -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 } diff --git a/dev-util/uncrustify/uncrustify-0.81.0.ebuild b/dev-util/uncrustify/uncrustify-0.81.0.ebuild index 568609b09f1aa..61a312beee2fc 100644 --- a/dev-util/uncrustify/uncrustify-0.81.0.ebuild +++ b/dev-util/uncrustify/uncrustify-0.81.0.ebuild @@ -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 } diff --git a/dev-util/uncrustify/uncrustify-9999.ebuild b/dev-util/uncrustify/uncrustify-9999.ebuild index b831203eb2148..f1605369a984e 100644 --- a/dev-util/uncrustify/uncrustify-9999.ebuild +++ b/dev-util/uncrustify/uncrustify-9999.ebuild @@ -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 }