Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Thu, 01 Dec 2016 23:10:50
Message-Id: 1480633827.926da9a17e6e78c74a5c0466527cf0ad9c26d167.mpagano@gentoo
1 commit: 926da9a17e6e78c74a5c0466527cf0ad9c26d167
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 1 23:10:27 2016 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 1 23:10:27 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=926da9a1
7
8 kernel-2.eclass: Fix eapply_user as per PMS spec and execute in src_prepare. Support older EAPIs with epatch_user.
9
10 eclass/kernel-2.eclass | 35 ++++++++++++++++++++++++++---------
11 1 file changed, 26 insertions(+), 9 deletions(-)
12
13 diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
14 index 3f5fb3b..547153c 100644
15 --- a/eclass/kernel-2.eclass
16 +++ b/eclass/kernel-2.eclass
17 @@ -90,12 +90,18 @@
18 # If you do change them, there is a chance that we will not fix resulting bugs;
19 # that of course does not mean we're not willing to help.
20
21 -has "${EAPI:-0}" 0 1 2 3 4 5 || die "kernel-2.eclass is unsupported for EAPI ${EAPI}"
22 -
23 PYTHON_COMPAT=( python{2_6,2_7} )
24
25 inherit eutils toolchain-funcs versionator multilib python-any-r1
26 -EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
27 +case ${EAPI:-0} in
28 + 0|1)
29 + EXPORT_FUNCTIONS src_{unpack,compile,install,test} \
30 + pkg_{setup,preinst,postinst,postrm} ;;
31 + 2|3|4|5)
32 + EXPORT_FUNCTIONS src_{unpack,prepare,compile,install,test} \
33 + pkg_{setup,preinst,postinst,postrm} ;;
34 + *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
35 +esac
36
37 # Added by Daniel Ostrow <dostrow@g.o>
38 # This is an ugly hack to get around an issue with a 32-bit userland on ppc64.
39 @@ -1260,12 +1266,9 @@ kernel-2_src_unpack() {
40 # we run misc `make` functions below
41 [[ $(type -t kernel-2_hook_premake) == "function" ]] && kernel-2_hook_premake
42
43 - debug-print "Applying any user patches"
44 - # apply any user patches
45 - case ${EAPI:-0} in
46 - 0|1|2|3|4|5) epatch_user ;;
47 - 6) eapply_user ;;
48 - esac
49 + case ${EAPI:-0} in
50 + 0|1) kernel-2_src_prepare ;;
51 + esac
52
53 debug-print "Doing unpack_set_extraversion"
54
55 @@ -1305,6 +1308,20 @@ kernel-2_src_unpack() {
56 fi
57 }
58
59 +# @FUNCTION: kernel-2_src_prepare
60 +# @DESCRIPTION:
61 +# Apply any user patches
62 +kernel-2_src_prepare() {
63 +
64 + debug-print "Applying any user patches"
65 +
66 + # apply any user patches
67 + case ${EAPI:-0} in
68 + 0|1|2|3|4|5) epatch_user ;;
69 + 6) eapply_user ;;
70 + esac
71 +}
72 +
73 kernel-2_src_compile() {
74 cd "${S}"
75 [[ ${ETYPE} == headers ]] && compile_headers