commit:     37dd8af58378b219bdce3b0cf465465eb3a86ada
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  8 19:18:59 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 13 06:16:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37dd8af5

ninja-utils.eclass: Respect NINJA for NINJA_DEPEND again

Make NINJA_DEPEND respect the value of NINJA again.  This was changed
while updating for app-alternatives/ninja.  However, it is still valid
to override NINJA in ebuilds, in which case we want NINJA_DEPEND
to refer to the appropriate implementation rather than any alternative.

Fixes: 2fa125d055dcf ("ninja-utils.eclass: use app-alternatives/ninja")
Bug: https://bugs.gentoo.org/922639
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/44539
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/ninja-utils.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass
index c38fd4094a4e..08743bcea1a4 100644
--- a/eclass/ninja-utils.eclass
+++ b/eclass/ninja-utils.eclass
@@ -60,7 +60,17 @@ _NINJA_UTILS_ECLASS=1
 
 inherit multiprocessing
 
-NINJA_DEPEND="app-alternatives/ninja"
+case ${NINJA} in
+       ninja)
+               NINJA_DEPEND="app-alternatives/ninja"
+               ;;
+       ninja-reference)
+               NINJA_DEPEND="dev-build/ninja"
+               ;;
+       samu)
+               NINJA_DEPEND="dev-build/samurai"
+               ;;
+esac
 
 # @FUNCTION: get_NINJAOPTS
 # @DESCRIPTION:

Reply via email to