Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH 1/5] ninja-utils.eclass: Support dev-util/samurai
Date: Mon, 30 May 2022 20:56:36
Message-Id: CAJ0EP40cMbdS9MtXt2_Uvu22wv5bseATSZ8kZD_V3-5Zmcf7RQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH 1/5] ninja-utils.eclass: Support dev-util/samurai by "Anna “CyberTailor”"
1 On Mon, May 30, 2022 at 3:57 PM Anna “CyberTailor”
2 <cyber+gentoo@×××××.in> wrote:
3 >
4 > On 2022-05-08 23:07, Sam James wrote:
5 > > From: orbea <orbea@××××××.net>
6 > >
7 > > samurai is a ninja-compatible build tool written in C which
8 > > works with cmake, meson and other users of ninja.
9 > >
10 > > It is feature-complete and supports most of the same options
11 > > as ninja.
12 > >
13 > > Signed-off-by: orbea <orbea@××××××.net>
14 > > Signed-off-by: Sam James <sam@g.o>
15 > > ---
16 > > eclass/ninja-utils.eclass | 24 +++++++++++++++++++++++-
17 > > 1 file changed, 23 insertions(+), 1 deletion(-)
18 > >
19 > > diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass
20 > > index c5f34934192f..67f7a6b5e8a7 100644
21 > > --- a/eclass/ninja-utils.eclass
22 > > +++ b/eclass/ninja-utils.eclass
23 > > @@ -26,6 +26,15 @@ esac
24 > > if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then
25 > > _NINJA_UTILS_ECLASS=1
26 > >
27 > > +# @ECLASS_VARIABLE: NINJA
28 > > +# @PRE_INHERIT
29 >
30 > How about making it @USER_VARIABLE instead? Because it's more likely to
31 > be set in make.conf rather than in an ebuild.
32
33 It's "unofficially" supported as a user variable. If users set it in
34 make.conf, it will break metadata invariance and the dependency cache
35 will need to be rebuilt.
36
37 If we truly want to support it as a user variable, we need to provide
38 some alternate means of varying BDEPEND.