guile-utils.eclass: make generated GUILE_USEDEP entries conditional

If the user specifies only GUILE_TARGETS="3-0", previously, we would
incorrectly try to pull in dependencies with USE flag dependencies like
[guile_targets_2-2,guile_targets_3-0], which lead to an error about
missing USE flags in the dependencies.

Signed-off-by: Kacper Słomiński <kacper.slominski72@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44587
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Kacper Słomiński 2025-11-11 00:13:46 +01:00 committed by Sam James
parent 7572bd583a
commit 998c2e8173
No known key found for this signature in database
GPG Key ID: 738409F520DF9190

View File

@ -1,4 +1,4 @@
# Copyright 2023-2024 Gentoo Authors # Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: guile-utils.eclass # @ECLASS: guile-utils.eclass
@ -146,7 +146,7 @@ guile_generate_depstrings() {
for ver in "${GUILE_COMPAT[@]}"; do for ver in "${GUILE_COMPAT[@]}"; do
[[ -n ${GUILE_USEDEP} ]] && GUILE_USEDEP+="," [[ -n ${GUILE_USEDEP} ]] && GUILE_USEDEP+=","
uses+=("${prefix}_${ver}") uses+=("${prefix}_${ver}")
GUILE_USEDEP+="${prefix}_${ver}" GUILE_USEDEP+="${prefix}_${ver}?"
done done
GUILE_REQUIRED_USE="${depop} ( ${uses[@]} )" GUILE_REQUIRED_USE="${depop} ( ${uses[@]} )"
IUSE="${uses[@]}" IUSE="${uses[@]}"