diff options
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 0e15d7423547..0dd2c1191273 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -4,16 +4,15 @@ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: # toolchain@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 6 7 8 # @BLURB: common functions to manipulate and query toolchain flags # @DESCRIPTION: # This eclass contains a suite of functions to help developers sanely # and safely manage toolchain flags in their builds. -case ${EAPI:-0} in - 0|1|2|3|4) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;; - 5|6|7|8) ;; - *) die "EAPI ${EAPI} is not supported by flag-o-matic.eclass." ;; +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then @@ -21,7 +20,7 @@ _FLAG_O_MATIC_ECLASS=1 inherit toolchain-funcs -[[ ${EAPI} == [567] ]] && inherit eutils +[[ ${EAPI} == [67] ]] && inherit eutils # @FUNCTION: all-flag-vars # @DESCRIPTION: @@ -36,7 +35,7 @@ all-flag-vars() { # {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags # Note: shell globs and character lists are allowed setup-allowed-flags() { - [[ ${EAPI} == [567] ]] || + [[ ${EAPI} == [67] ]] || die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." _setup-allowed-flags "$@" } @@ -512,7 +511,7 @@ strip-flags() { # Returns shell true if <flag> is supported by given <compiler>, # else returns shell false. test-flag-PROG() { - [[ ${EAPI} == [567] ]] || + [[ ${EAPI} == [67] ]] || die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." _test-flag-PROG "$@" } @@ -651,7 +650,7 @@ test-flag-CCLD() { _test-flag-PROG CC c+ld "$@"; } # Returns shell true if <flags> are supported by given <compiler>, # else returns shell false. test-flags-PROG() { - [[ ${EAPI} == [567] ]] || + [[ ${EAPI} == [67] ]] || die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." _test-flags-PROG "$@" } |