Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 19/41] ninja-utils.eclass: drop EAPI 5, 6 support
Date: Sun, 25 Dec 2022 22:20:53
Message-Id: 20221225221552.8023-19-soap@gentoo.org
In Reply to: [gentoo-dev] [PATCH 01/41] ada.eclass: drop EAPI 6 support by David Seifert
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/ninja-utils.eclass | 13 +++++--------
4 1 file changed, 5 insertions(+), 8 deletions(-)
5
6 diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass
7 index 9be502fa8ad..eb2fb62f6c3 100644
8 --- a/eclass/ninja-utils.eclass
9 +++ b/eclass/ninja-utils.eclass
10 @@ -8,7 +8,7 @@
11 # @AUTHOR:
12 # Michał Górny <mgorny@g.o>
13 # Mike Gilbert <floppym@g.o>
14 -# @SUPPORTED_EAPIS: 5 6 7 8
15 +# @SUPPORTED_EAPIS: 7 8
16 # @BLURB: common bits to run dev-util/ninja builder
17 # @DESCRIPTION:
18 # This eclass provides a single function -- eninja -- that can be used
19 @@ -19,7 +19,7 @@
20 # Meson).
21
22 case ${EAPI} in
23 - 5|6|7|8) ;;
24 + 7|8) ;;
25 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
26 esac
27
28 @@ -76,16 +76,13 @@ get_NINJAOPTS() {
29 # @USAGE: [<args>...]
30 # @DESCRIPTION:
31 # Call Ninja, passing the NINJAOPTS (or converted MAKEOPTS), followed
32 -# by the supplied arguments. This function dies if ninja fails. Starting
33 -# with EAPI 6, it also supports being called via 'nonfatal'.
34 +# by the supplied arguments. This function dies if ninja fails. It
35 +# also supports being called via 'nonfatal'.
36 eninja() {
37 - local nonfatal_args=()
38 - [[ ${EAPI} != 5 ]] && nonfatal_args+=( -n )
39 -
40 [[ -n "${NINJA_DEPEND}" ]] || ewarn "Unknown value '${NINJA}' for \${NINJA}"
41 set -- "${NINJA}" -v $(get_NINJAOPTS) "$@"
42 echo "$@" >&2
43 - "$@" || die "${nonfatal_args[@]}" "${*} failed"
44 + "$@" || die -n "${*} failed"
45 }
46
47 fi
48 --
49 2.39.0