1 |
El dom, 08-05-2022 a las 23:07 +0000, Sam James escribió: |
2 |
> From: orbea <orbea@××××××.net> |
3 |
> |
4 |
> samurai is a ninja-compatible build tool written in C which |
5 |
> works with cmake, meson and other users of ninja. |
6 |
> |
7 |
> It is feature-complete and supports most of the same options |
8 |
> as ninja. |
9 |
> |
10 |
> Signed-off-by: orbea <orbea@××××××.net> |
11 |
> Signed-off-by: Sam James <sam@g.o> |
12 |
> --- |
13 |
> eclass/ninja-utils.eclass | 24 +++++++++++++++++++++++- |
14 |
> 1 file changed, 23 insertions(+), 1 deletion(-) |
15 |
> |
16 |
> diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass |
17 |
> index c5f34934192f..67f7a6b5e8a7 100644 |
18 |
> --- a/eclass/ninja-utils.eclass |
19 |
> +++ b/eclass/ninja-utils.eclass |
20 |
> @@ -26,6 +26,15 @@ esac |
21 |
> if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then |
22 |
> _NINJA_UTILS_ECLASS=1 |
23 |
> |
24 |
> +# @ECLASS_VARIABLE: NINJA |
25 |
> +# @PRE_INHERIT |
26 |
> +# @DEFAULT_UNSET |
27 |
> +# @DESCRIPTION: |
28 |
> +# Specify a compatible ninja implementation to be used by eninja. |
29 |
> +# At this point only "ninja" and "samu" are supported. |
30 |
> +# The default is set to "ninja". |
31 |
> +: ${NINJA:=ninja} |
32 |
> + |
33 |
> # @ECLASS_VARIABLE: NINJAOPTS |
34 |
> # @DEFAULT_UNSET |
35 |
> # @DESCRIPTION: |
36 |
> @@ -35,6 +44,19 @@ _NINJA_UTILS_ECLASS=1 |
37 |
> |
38 |
> inherit multiprocessing |
39 |
> |
40 |
> +case "${NINJA}" in |
41 |
> + ninja) |
42 |
> + NINJA_DEPEND=">=dev-util/ninja-1.8.2" |
43 |
> + ;; |
44 |
> + samu) |
45 |
> + NINJA_DEPEND="dev-util/samurai" |
46 |
> + ;; |
47 |
> + *) |
48 |
> + eerror "Unknown value for \${NINJA}" |
49 |
> + die "Value ${NINJA} is not supported" |
50 |
> + ;; |
51 |
> +esac |
52 |
> + |
53 |
|
54 |
Personally I would add "samurai" as value instead of the abbreviated "samu" form |
55 |
(that could come from other words than "samurai")... but has you wish :), it is |
56 |
only a cosmetic change anyway |
57 |
|
58 |
Thanks |