diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-07-18 15:34:26 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-08-03 13:13:51 +0200 |
commit | f24a4018a32e3cc7bf6017ccb944574acb7f4727 (patch) | |
tree | 5f69c19b6c82f17fbdaf15ba965c084c5eebd67e /eclass | |
parent | optfeature.eclass: Drop support for EAPIs 0,1,2,3,4,5 (diff) | |
download | gentoo-f24a4018a32e3cc7bf6017ccb944574acb7f4727.tar.gz gentoo-f24a4018a32e3cc7bf6017ccb944574acb7f4727.tar.bz2 gentoo-f24a4018a32e3cc7bf6017ccb944574acb7f4727.zip |
check-reqs.eclass: Support EAPI-8
Move EAPI check and EXPORT_FUNCTIONS on top, before include guard.
Standardise include guard.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/check-reqs.eclass | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass index 5c4a420ee06e..27ab1513aabe 100644 --- a/eclass/check-reqs.eclass +++ b/eclass/check-reqs.eclass @@ -7,8 +7,8 @@ # @AUTHOR: # Bo Ørsted Andresen <zlin@gentoo.org> # Original Author: Ciaran McCreesh <ciaranm@gentoo.org> -# @SUPPORTED_EAPIS: 4 5 6 7 -# @BLURB: Provides a uniform way of handling ebuild which have very high build requirements +# @SUPPORTED_EAPIS: 4 5 6 7 8 +# @BLURB: Provides a uniform way of handling ebuilds with very high build requirements # @DESCRIPTION: # This eclass provides a uniform way of handling ebuilds which have very high # build requirements in terms of memory or disk space. It provides a function @@ -38,14 +38,22 @@ # These checks should probably mostly work on non-Linux, and they should # probably degrade gracefully if they don't. Probably. -if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then +case ${EAPI} in + 4|5|6|7|8) ;; + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_pretend pkg_setup + +if [[ ! ${_CHECK_REQS_ECLASS} ]]; then +_CHECK_REQS_ECLASS=1 # @ECLASS-VARIABLE: CHECKREQS_MEMORY # @DEFAULT_UNSET # @DESCRIPTION: # How much RAM is needed? Eg.: CHECKREQS_MEMORY=15M -# @ECLASS-VARIABLE: CHECKREQS_DISK_BUILD +# @ECLASS-VARIABLE: CHECKREQS_DISK_BUILD # @DEFAULT_UNSET # @DESCRIPTION: # How much diskspace is needed to build the package? Eg.: CHECKREQS_DISK_BUILD=2T @@ -60,13 +68,6 @@ if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then # @DESCRIPTION: # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M -case ${EAPI:-0} in - 4|5|6|7) ;; - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; -esac - -EXPORT_FUNCTIONS pkg_pretend pkg_setup - # Obsolete function executing all the checks and printing out results check_reqs() { eerror "Package calling old ${FUNCNAME} function." @@ -357,5 +358,4 @@ check-reqs_unsatisfied() { CHECKREQS_FAILED="true" } -_CHECK_REQS_ECLASS_=1 fi |