Gentoo Archives: gentoo-dev

From: David Michael <fedora.dm0@×××××.com>
To: gentoo-dev@l.g.o
Cc: floppym@g.o, mgorny@g.o
Subject: [gentoo-dev] [PATCH 1/2] ninja-utils.eclass: EAPI 8 support
Date: Thu, 24 Jun 2021 16:41:02
Message-Id: 87wnqj8bc9.fsf@gmail.com
1 Also drop support for EAPIs < 5 to match multiprocessing.eclass.
2
3 Signed-off-by: David Michael <fedora.dm0@×××××.com>
4 ---
5
6 Hi,
7
8 Here are a couple patches to support EAPI 8 with meson packages. I also
9 posted this to https://github.com/gentoo/gentoo/pull/21409 for review.
10
11 Thanks.
12
13 David
14
15 eclass/ninja-utils.eclass | 12 +++++-------
16 1 file changed, 5 insertions(+), 7 deletions(-)
17
18 diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass
19 index ca8d67191dc..f8f088b4209 100644
20 --- a/eclass/ninja-utils.eclass
21 +++ b/eclass/ninja-utils.eclass
22 @@ -1,4 +1,4 @@
23 -# Copyright 1999-2018 Gentoo Foundation
24 +# Copyright 1999-2021 Gentoo Foundation
25 # Distributed under the terms of the GNU General Public License v2
26
27 # @ECLASS: ninja-utils.eclass
28 @@ -8,7 +8,7 @@
29 # @AUTHOR:
30 # Michał Górny <mgorny@g.o>
31 # Mike Gilbert <floppym@g.o>
32 -# @SUPPORTED_EAPIS: 2 4 5 6 7
33 +# @SUPPORTED_EAPIS: 5 6 7 8
34 # @BLURB: common bits to run dev-util/ninja builder
35 # @DESCRIPTION:
36 # This eclass provides a single function -- eninja -- that can be used
37 @@ -21,10 +21,8 @@
38 if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then
39
40 case ${EAPI:-0} in
41 - 0|1|3) die "EAPI=${EAPI:-0} is not supported (too old)";;
42 - # copied from cmake-utils
43 - 2|4|5|6|7) ;;
44 - *) die "EAPI=${EAPI} is not yet supported" ;;
45 + 5|6|7|8) ;;
46 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
47 esac
48
49 # @ECLASS-VARIABLE: NINJAOPTS
50 @@ -44,7 +42,7 @@ inherit multiprocessing
51 # with EAPI 6, it also supports being called via 'nonfatal'.
52 eninja() {
53 local nonfatal_args=()
54 - [[ ${EAPI:-0} != [245] ]] && nonfatal_args+=( -n )
55 + [[ ${EAPI} != 5 ]] && nonfatal_args+=( -n )
56
57 if [[ -z ${NINJAOPTS+set} ]]; then
58 NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0)"
59 --
60 2.31.1

Replies

Subject Author
Re: [gentoo-dev] [PATCH 1/2] ninja-utils.eclass: EAPI 8 support Ulrich Mueller <ulm@g.o>