mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-03 12:51:11 +02:00
eclass/ninja-utils: Support EAPI 4
This commit is contained in:
parent
9522ecbb6d
commit
3ba5570ef3
@ -1,6 +1,8 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
# Flatcar: Support EAPI 4.
|
||||||
|
|
||||||
# @ECLASS: ninja-utils.eclass
|
# @ECLASS: ninja-utils.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
# Michał Górny <mgorny@gentoo.org>
|
# Michał Górny <mgorny@gentoo.org>
|
||||||
@ -8,7 +10,7 @@
|
|||||||
# @AUTHOR:
|
# @AUTHOR:
|
||||||
# Michał Górny <mgorny@gentoo.org>
|
# Michał Górny <mgorny@gentoo.org>
|
||||||
# Mike Gilbert <floppym@gentoo.org>
|
# Mike Gilbert <floppym@gentoo.org>
|
||||||
# @SUPPORTED_EAPIS: 5 6 7 8
|
# @SUPPORTED_EAPIS: 4 5 6 7 8
|
||||||
# @BLURB: common bits to run dev-util/ninja builder
|
# @BLURB: common bits to run dev-util/ninja builder
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# This eclass provides a single function -- eninja -- that can be used
|
# This eclass provides a single function -- eninja -- that can be used
|
||||||
@ -19,7 +21,7 @@
|
|||||||
# Meson).
|
# Meson).
|
||||||
|
|
||||||
case ${EAPI} in
|
case ${EAPI} in
|
||||||
5|6|7|8) ;;
|
4|5|6|7|8) ;;
|
||||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -43,7 +45,7 @@ inherit multiprocessing
|
|||||||
# with EAPI 6, it also supports being called via 'nonfatal'.
|
# with EAPI 6, it also supports being called via 'nonfatal'.
|
||||||
eninja() {
|
eninja() {
|
||||||
local nonfatal_args=()
|
local nonfatal_args=()
|
||||||
[[ ${EAPI} != 5 ]] && nonfatal_args+=( -n )
|
[[ ${EAPI} != [45] ]] && nonfatal_args+=( -n )
|
||||||
|
|
||||||
if [[ -z ${NINJAOPTS+set} ]]; then
|
if [[ -z ${NINJAOPTS+set} ]]; then
|
||||||
NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0)"
|
NINJAOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user