diff options
author | David Michael <fedora.dm0@gmail.com> | 2021-06-24 11:23:37 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2021-06-28 13:23:16 -0400 |
commit | cec274bcb2fde829ddf72c3a06ffad14d4adb373 (patch) | |
tree | 943713a8830a40e4e3ac03eaf791455fc23be4e7 /eclass | |
parent | app-admin/gixy: [QA] fix python_prepare_all (diff) | |
download | gentoo-cec274bcb2fde829ddf72c3a06ffad14d4adb373.tar.gz gentoo-cec274bcb2fde829ddf72c3a06ffad14d4adb373.tar.bz2 gentoo-cec274bcb2fde829ddf72c3a06ffad14d4adb373.zip |
ninja-utils.eclass: EAPI 8 support
Also drop support for EAPIs < 5 to match multiprocessing.eclass.
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ninja-utils.eclass | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass index ca8d67191dc4..c5e195a9f80b 100644 --- a/eclass/ninja-utils.eclass +++ b/eclass/ninja-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ninja-utils.eclass @@ -8,7 +8,7 @@ # @AUTHOR: # Michał Górny <mgorny@gentoo.org> # Mike Gilbert <floppym@gentoo.org> -# @SUPPORTED_EAPIS: 2 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: common bits to run dev-util/ninja builder # @DESCRIPTION: # This eclass provides a single function -- eninja -- that can be used @@ -18,15 +18,14 @@ # be used indirectly by the eclasses for other build systems (CMake, # Meson). -if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then - -case ${EAPI:-0} in - 0|1|3) die "EAPI=${EAPI:-0} is not supported (too old)";; - # copied from cmake-utils - 2|4|5|6|7) ;; - *) die "EAPI=${EAPI} is not yet supported" ;; +case ${EAPI} in + 5|6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac +if [[ -z ${_NINJA_UTILS_ECLASS} ]]; then +_NINJA_UTILS_ECLASS=1 + # @ECLASS-VARIABLE: NINJAOPTS # @DEFAULT_UNSET # @DESCRIPTION: @@ -44,7 +43,7 @@ inherit multiprocessing # with EAPI 6, it also supports being called via 'nonfatal'. eninja() { local nonfatal_args=() - [[ ${EAPI:-0} != [245] ]] && nonfatal_args+=( -n ) + [[ ${EAPI} != 5 ]] && nonfatal_args+=( -n ) if [[ -z ${NINJAOPTS+set} ]]; then NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0)" @@ -54,5 +53,4 @@ eninja() { "$@" || die "${nonfatal_args[@]}" "${*} failed" } -_NINJA_UTILS_ECLASS=1 fi |