Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 29 Jul 2018 23:48:35
Message-Id: 1532906066.3b73ebd9ac730549bb9edf5e8f9ff6614d08726a.whissi@gentoo
1 commit: 3b73ebd9ac730549bb9edf5e8f9ff6614d08726a
2 Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com>
3 AuthorDate: Sun Jul 29 23:14:26 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 29 23:14:26 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b73ebd9
7
8 kernel-2.eclass: drop EAPI 0-1 support code
9
10 Also went ahead and dropped versionator in favor of eapi7-ver for EAPI 0-6,
11 and eutils for epatch. multilib dropped as unneeded. All ebuilds using it
12 tested with ebuild clean install clean.
13
14 Bug: https://bugs.gentoo.org/657926
15 Package-Manager: Portage-2.3.40, Repoman-2.3.9
16 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
17
18 eclass/kernel-2.eclass | 40 ++++++++++++++--------------------------
19 1 file changed, 14 insertions(+), 26 deletions(-)
20
21 diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
22 index a7501e936ca..6c882308f89 100644
23 --- a/eclass/kernel-2.eclass
24 +++ b/eclass/kernel-2.eclass
25 @@ -192,11 +192,10 @@
26
27 PYTHON_COMPAT=( python{2_6,2_7} )
28
29 -inherit eutils toolchain-funcs versionator multilib python-any-r1
30 +inherit toolchain-funcs python-any-r1
31 +[[ ${EAPI:-0} == [012345] ]] && inherit epatch
32 +[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
33 case ${EAPI:-0} in
34 - 0|1)
35 - EXPORT_FUNCTIONS src_{unpack,compile,install,test} \
36 - pkg_{setup,preinst,postinst,postrm} ;;
37 2|3|4|5|6)
38 EXPORT_FUNCTIONS src_{unpack,prepare,compile,install,test} \
39 pkg_{setup,preinst,postinst,postrm} ;;
40 @@ -216,8 +215,6 @@ fi
41 HOMEPAGE="https://www.kernel.org/ https://www.gentoo.org/ ${HOMEPAGE}"
42 : ${LICENSE:="GPL-2"}
43
44 -has "${EAPI:-0}" 0 1 2 && ED=${D} EPREFIX= EROOT=${ROOT}
45 -
46 # This is the latest KV_PATCH of the deblob tool available from the
47 # libre-sources upstream. If you bump this, you MUST regenerate the Manifests
48 # for ALL kernel-2 consumer packages where deblob is available.
49 @@ -326,7 +323,7 @@ detect_version() {
50 OKV=${OKV/-r*}
51 OKV=${OKV/_p*}
52
53 - KV_MAJOR=$(get_version_component_range 1 ${OKV})
54 + KV_MAJOR=$(ver_cut 1 ${OKV})
55 # handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1)
56 local OKV_ARRAY
57 IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
58 @@ -334,17 +331,17 @@ detect_version() {
59 # if KV_MAJOR >= 3, then we have no more KV_MINOR
60 #if [[ ${KV_MAJOR} -lt 3 ]]; then
61 if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
62 - KV_MINOR=$(get_version_component_range 2 ${OKV})
63 - KV_PATCH=$(get_version_component_range 3 ${OKV})
64 + KV_MINOR=$(ver_cut 2 ${OKV})
65 + KV_PATCH=$(ver_cut 3 ${OKV})
66 if [[ ${KV_MAJOR}${KV_MINOR}${KV_PATCH} -ge 269 ]]; then
67 - KV_EXTRA=$(get_version_component_range 4- ${OKV})
68 + KV_EXTRA=$(ver_cut 4- ${OKV})
69 KV_EXTRA=${KV_EXTRA/[-_]*}
70 else
71 - KV_PATCH=$(get_version_component_range 3- ${OKV})
72 + KV_PATCH=$(ver_cut 3- ${OKV})
73 fi
74 else
75 - KV_PATCH=$(get_version_component_range 2 ${OKV})
76 - KV_EXTRA=$(get_version_component_range 3- ${OKV})
77 + KV_PATCH=$(ver_cut 2 ${OKV})
78 + KV_EXTRA=$(ver_cut 3- ${OKV})
79 KV_EXTRA=${KV_EXTRA/[-_]*}
80 fi
81
82 @@ -645,12 +642,7 @@ if [[ ${ETYPE} == sources ]]; then
83 DEBLOB_CHECK_A="deblob-check-${DEBLOB_PV}"
84 DEBLOB_HOMEPAGE="https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/"
85 DEBLOB_URI_PATH="${DEBLOB_PV}${K_DEBLOB_TAG}"
86 - if ! has "${EAPI:-0}" 0 1 ; then
87 - DEBLOB_CHECK_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/deblob-check -> ${DEBLOB_CHECK_A}"
88 - else
89 - DEBLOB_CHECK_URI="mirror://gentoo/${DEBLOB_CHECK_A}"
90 - fi
91 -
92 + DEBLOB_CHECK_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/deblob-check -> ${DEBLOB_CHECK_A}"
93 DEBLOB_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/${DEBLOB_A}"
94 HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}"
95
96 @@ -1075,9 +1067,9 @@ postinst_sources() {
97 fi
98
99 # warn sparc users that they need to do cross-compiling with >= 2.6.25(bug #214765)
100 - KV_MAJOR=$(get_version_component_range 1 ${OKV})
101 - KV_MINOR=$(get_version_component_range 2 ${OKV})
102 - KV_PATCH=$(get_version_component_range 3 ${OKV})
103 + KV_MAJOR=$(ver_cut 1 ${OKV})
104 + KV_MINOR=$(ver_cut 2 ${OKV})
105 + KV_PATCH=$(ver_cut 3 ${OKV})
106 if [[ "$(tc-arch)" = "sparc" ]]; then
107 if [[ $(gcc-major-version) -lt 4 && $(gcc-minor-version) -lt 4 ]]; then
108 if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.24 ]] ; then
109 @@ -1478,10 +1470,6 @@ kernel-2_src_unpack() {
110 # we run misc `make` functions below
111 [[ $(type -t kernel-2_hook_premake) == "function" ]] && kernel-2_hook_premake
112
113 - case ${EAPI:-0} in
114 - 0|1) kernel-2_src_prepare ;;
115 - esac
116 -
117 debug-print "Doing unpack_set_extraversion"
118
119 [[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion