Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 28 Jun 2021 17:32:37
Message-Id: 1624900996.cec274bcb2fde829ddf72c3a06ffad14d4adb373.floppym@gentoo
1 commit: cec274bcb2fde829ddf72c3a06ffad14d4adb373
2 Author: David Michael <fedora.dm0 <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 24 15:23:37 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 28 17:23:16 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cec274bc
7
8 ninja-utils.eclass: EAPI 8 support
9
10 Also drop support for EAPIs < 5 to match multiprocessing.eclass.
11
12 Signed-off-by: David Michael <fedora.dm0 <AT> gmail.com>
13 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
14
15 eclass/ninja-utils.eclass | 20 +++++++++-----------
16 1 file changed, 9 insertions(+), 11 deletions(-)
17
18 diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass
19 index ca8d67191dc..c5e195a9f80 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 Authors
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 @@ -18,15 +18,14 @@
38 # be used indirectly by the eclasses for other build systems (CMake,
39 # Meson).
40
41 -if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then
42 -
43 -case ${EAPI:-0} in
44 - 0|1|3) die "EAPI=${EAPI:-0} is not supported (too old)";;
45 - # copied from cmake-utils
46 - 2|4|5|6|7) ;;
47 - *) die "EAPI=${EAPI} is not yet supported" ;;
48 +case ${EAPI} in
49 + 5|6|7|8) ;;
50 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
51 esac
52
53 +if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then
54 +_NINJA_UTILS_ECLASS=1
55 +
56 # @ECLASS-VARIABLE: NINJAOPTS
57 # @DEFAULT_UNSET
58 # @DESCRIPTION:
59 @@ -44,7 +43,7 @@ inherit multiprocessing
60 # with EAPI 6, it also supports being called via 'nonfatal'.
61 eninja() {
62 local nonfatal_args=()
63 - [[ ${EAPI:-0} != [245] ]] && nonfatal_args+=( -n )
64 + [[ ${EAPI} != 5 ]] && nonfatal_args+=( -n )
65
66 if [[ -z ${NINJAOPTS+set} ]]; then
67 NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0)"
68 @@ -54,5 +53,4 @@ eninja() {
69 "$@" || die "${nonfatal_args[@]}" "${*} failed"
70 }
71
72 -_NINJA_UTILS_ECLASS=1
73 fi