From 147f4e2aa92fc575baeb768acf4e7083cf2ec0a2 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 11 Mar 2025 03:55:11 +0000 Subject: [PATCH] dev-ada/gnatcoll-core: fixup python_check_deps With USE="-doc test", if we have dev-ada/e3-testsuite installed but not dev-python/sphinx, we end up failing because we don't return early if *ONLY* USE=test and end up looking for doc deps. Feel like I'm missing a more elegant way of doing this (other than relying on just the implicit return which doesnt't simplify much) but let's get it fixed in any case. Bug: https://bugs.gentoo.org/951067 Signed-off-by: Sam James --- .../gnatcoll-core/gnatcoll-core-25.0.0.ebuild | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/dev-ada/gnatcoll-core/gnatcoll-core-25.0.0.ebuild b/dev-ada/gnatcoll-core/gnatcoll-core-25.0.0.ebuild index 0694b04c8e712..19391f8e72947 100644 --- a/dev-ada/gnatcoll-core/gnatcoll-core-25.0.0.ebuild +++ b/dev-ada/gnatcoll-core/gnatcoll-core-25.0.0.ebuild @@ -36,11 +36,22 @@ BDEPEND="${RDEPEND} PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) python_check_deps() { - if use test; then + if use doc && use test ; then + python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && + python_has_version "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" && python_has_version "dev-ada/e3-testsuite[${PYTHON_USEDEP}]" || return 1 - fi; - python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && - python_has_version "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" + + return 0 + elif use test; then + python_has_version "dev-ada/e3-testsuite[${PYTHON_USEDEP}]" || return 1 + + return 0 + elif use doc; then + python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && + python_has_version "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" || return 1 + fi + + return 0 } pkg_setup() {