eclass/flag-o-matic: Sync with Gentoo

It's from Gentoo commit 226e01807ee7b16c451dcc063cf96560c612068b.
This commit is contained in:
Flatcar Buildbot 2024-09-16 07:13:31 +00:00 committed by Krzesimir Nowak
parent c7f0266eeb
commit 37f2f56f70

View File

@ -10,14 +10,18 @@
# This eclass contains a suite of functions to help developers sanely # This eclass contains a suite of functions to help developers sanely
# and safely manage toolchain flags in their builds. # and safely manage toolchain flags in their builds.
case ${EAPI} in
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then
_FLAG_O_MATIC_ECLASS=1 _FLAG_O_MATIC_ECLASS=1
case ${EAPI} in
6)
ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit toolchain-funcs inherit toolchain-funcs
[[ ${EAPI} == 6 ]] && inherit eqawarn [[ ${EAPI} == 6 ]] && inherit eqawarn