From 61f10f985e19dfe20a4d9552902625edd5b6eabb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 21 Jun 2021 17:32:00 +0100 Subject: gentoo resync : 21.06.2021 --- eclass/linux-mod.eclass | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'eclass/linux-mod.eclass') diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index 11b0fd0cfb5e..e87c5ec0cdb3 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # John Mylchreest , # Stefan Schweizer +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: It provides the functionality required to install external modules against a kernel source tree. # @DESCRIPTION: # This eclass is used to interface with linux-info.eclass in such a way @@ -134,9 +135,20 @@ # @DESCRIPTION: # It's a read-only variable. It contains the extension of the kernel modules. -inherit eutils linux-info multilib toolchain-funcs +case ${EAPI:-0} in + [567]) inherit eutils ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm +if [[ -z ${_LINUX_MOD_ECLASS} ]] ; then +_LINUX_MOD_ECLASS=1 + +# TODO: When adding support for future EAPIs, please audit this list +# for unused inherits and conditionalise them. +inherit linux-info multilib toolchain-funcs + case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;; *) _modules_optional_use_iuse_default='+' ;; @@ -769,3 +781,5 @@ linux-mod_pkg_postrm() { [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return remove_moduledb; } + +fi -- cgit v1.2.3