commit: 5837f60b82e256c6321fe741c75a3d0933875def
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 7 18:32:57 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 7 18:33:24 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5837f60b
toolchain.eclass: fix USE=doc for non-gcc (kgcc64)
We can simplify the has_feature ... && _use_if ... later.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 153018607a02..205c0e5314db 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -299,7 +299,8 @@ tc_has_feature() {
if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
IUSE+=" debug +cxx"
IUSE+=" +fortran" TC_FEATURES+=( fortran )
- IUSE+=" doc hardened multilib objc"
+ IUSE+=" doc" TC_FEATURES+=( doc )
+ IUSE+=" hardened multilib objc"
IUSE+=" pgo"
IUSE+=" objc-gc" TC_FEATURES+=( objc-gc )
IUSE+=" libssp objc++"
@@ -373,7 +374,6 @@ BDEPEND="
app-alternatives/yacc
sys-devel/binutils:*
>=sys-devel/flex-2.5.4
- doc? ( app-text/doxygen )
nls? ( sys-devel/gettext )
test? (
${PYTHON_DEPS}
@@ -381,6 +381,11 @@ BDEPEND="
>=sys-devel/autogen-5.5.4
)
"
+
+if tc_has_feature doc ; then
+ BDEPEND+=" doc? ( app-text/doxygen )"
+fi
+
DEPEND="${RDEPEND}"
if [[ ${PN} == gcc && ${PV} == *_p* ]] ; then
@@ -2348,7 +2353,7 @@ gcc_do_make() {
pushd "${WORKDIR}"/build >/dev/null || die
emake "${emakeargs[@]}" ${GCC_MAKE_TARGET}
- if ! is_crosscompile && _tc_use_if_iuse cxx && _tc_use_if_iuse doc ;
then
+ if ! is_crosscompile && _tc_use_if_iuse cxx && tc_has_feature doc &&
_tc_use_if_iuse doc ; then
cd "${CTARGET}"/libstdc++-v3/doc || die
emake doc-man-doxygen