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 <sam@gentoo.org>
This commit is contained in:
Sam James 2025-03-11 03:55:11 +00:00
parent 648820d97e
commit 147f4e2aa9
No known key found for this signature in database
GPG Key ID: 738409F520DF9190

View File

@ -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() {