From: orbea <
or...@riseup.net>
samurai is a ninja-compatible build tool written in C which
works with cmake, meson and other users of ninja.
It is feature-complete and supports most of the same options
as ninja.
Signed-off-by: orbea <
or...@riseup.net>
Signed-off-by: Sam James <
s...@gentoo.org>
---
eclass/cmake.eclass | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 59e5b60957c2..7ad0f6a7d45e 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -136,7 +136,7 @@ case ${CMAKE_MAKEFILE_GENERATOR} in
BDEPEND="sys-devel/make"
;;
ninja)
- BDEPEND="dev-util/ninja"
+ BDEPEND="${NINJA_DEPEND}"
;;
*)
eerror "Unknown value for \${CMAKE_MAKEFILE_GENERATOR}"
@@ -365,7 +365,7 @@ cmake_src_prepare() {
# if ninja is enabled but not installed, the build could fail
# this could happen if ninja is manually enabled (eg. make.conf) but not installed
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]] && ! has_version -b dev-util/ninja; then
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]] && ! has_version -b "${NINJA_DEPEND}"; then
eerror "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed."
die "Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR."
fi
@@ -703,12 +703,17 @@ cmake_src_test() {
# @DESCRIPTION:
# Function for installing the package. Automatically detects the build type.
cmake_src_install() {
+ local generator=${CMAKE_MAKEFILE_GENERATOR}
+ case ${CMAKE_MAKEFILE_GENERATOR} in
+ ninja) generator="eninja" ;;
+ esac
+
debug-print-function ${FUNCNAME} "$@"
_cmake_check_build_dir
pushd "${BUILD_DIR}" > /dev/null || die
- DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" ||
- die "died running ${CMAKE_MAKEFILE_GENERATOR} install"
+ DESTDIR="${D}" ${generator} install "$@" ||
+ die "died running ${generator} install"
popd > /dev/null || die
if [[ ${EAPI} == 7 ]]; then
--
2.35.1