1 |
Signed-off-by: David Seifert <soap@g.o> |
2 |
--- |
3 |
eclass/linux-info.eclass | 20 +++++++++++++++----- |
4 |
1 file changed, 15 insertions(+), 5 deletions(-) |
5 |
|
6 |
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass |
7 |
index a65d0c441ba2..ce04a0dc66a7 100644 |
8 |
--- a/eclass/linux-info.eclass |
9 |
+++ b/eclass/linux-info.eclass |
10 |
@@ -1,9 +1,10 @@ |
11 |
-# Copyright 1999-2022 Gentoo Authors |
12 |
+# Copyright 1999-2023 Gentoo Authors |
13 |
# Distributed under the terms of the GNU General Public License v2 |
14 |
|
15 |
# @ECLASS: linux-info.eclass |
16 |
# @MAINTAINER: |
17 |
# kernel@g.o |
18 |
+# @SUPPORTED_EAPIS: 6 7 8 |
19 |
# @AUTHOR: |
20 |
# Original author: John Mylchreest <johnm@g.o> |
21 |
# @BLURB: eclass used for accessing kernel related information |
22 |
@@ -26,6 +27,14 @@ |
23 |
# get_version |
24 |
# get_running_version |
25 |
|
26 |
+case ${EAPI} in |
27 |
+ 6|7|8) ;; |
28 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
29 |
+esac |
30 |
+ |
31 |
+if [[ -z ${_LINUX_INFO_ECLASS} ]]; then |
32 |
+_LINUX_INFO_ECLASS=1 |
33 |
+ |
34 |
# A Couple of env vars are available to effect usage of this eclass |
35 |
# These are as follows: |
36 |
|
37 |
@@ -151,9 +160,7 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" |
38 |
|
39 |
# And to ensure all the weirdness with crosscompile |
40 |
inherit toolchain-funcs |
41 |
-[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver |
42 |
- |
43 |
-EXPORT_FUNCTIONS pkg_setup |
44 |
+[[ ${EAPI} == 6 ]] && inherit eapi7-ver |
45 |
|
46 |
# bug #75034 |
47 |
case ${ARCH} in |
48 |
@@ -231,7 +238,6 @@ getfilevar() { |
49 |
# We use nonfatal because we want the caller to take care of things #373151 |
50 |
# Pass need-config= to make to avoid config check in kernel Makefile. |
51 |
# Pass dot-config=0 to avoid the config check in kernels prior to 5.4. |
52 |
- [[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; } |
53 |
echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \ |
54 |
nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \ |
55 |
dot-config=0 need-config= need-compiler= \ |
56 |
@@ -1009,3 +1015,7 @@ kernel_get_makefile() { |
57 |
[[ -s ${KV_DIR}/Makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/Makefile" && return |
58 |
|
59 |
} |
60 |
+ |
61 |
+fi |
62 |
+ |
63 |
+EXPORT_FUNCTIONS pkg_setup |
64 |
-- |
65 |
2.40.0 |