1 |
commit: 27c3e671005c0c1f2dc747d98aed7d573636bb07 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 12 10:06:11 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 16 17:40:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27c3e671 |
7 |
|
8 |
multibuild.eclass: remove EAPI 4 and 5 |
9 |
|
10 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/23699 |
12 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
13 |
|
14 |
eclass/multibuild.eclass | 42 +++++++----------------------------------- |
15 |
1 file changed, 7 insertions(+), 35 deletions(-) |
16 |
|
17 |
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass |
18 |
index 4699ebc43fb1..a0941ae02ea4 100644 |
19 |
--- a/eclass/multibuild.eclass |
20 |
+++ b/eclass/multibuild.eclass |
21 |
@@ -6,25 +6,20 @@ |
22 |
# Michał Górny <mgorny@g.o> |
23 |
# @AUTHOR: |
24 |
# Author: Michał Górny <mgorny@g.o> |
25 |
-# @SUPPORTED_EAPIS: 4 5 6 7 8 |
26 |
+# @SUPPORTED_EAPIS: 6 7 8 |
27 |
# @BLURB: A generic eclass for building multiple variants of packages. |
28 |
# @DESCRIPTION: |
29 |
# The multibuild eclass aims to provide a generic framework for building |
30 |
# multiple 'variants' of a package (e.g. multilib, Python |
31 |
# implementations). |
32 |
|
33 |
-case "${EAPI:-0}" in |
34 |
- [0-3]) |
35 |
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" |
36 |
- ;; |
37 |
- [4-8]) |
38 |
- ;; |
39 |
- *) |
40 |
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" |
41 |
- ;; |
42 |
+case ${EAPI} in |
43 |
+ 6|7|8) ;; |
44 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
45 |
esac |
46 |
|
47 |
-if [[ ! ${_MULTIBUILD} ]]; then |
48 |
+if [[ ! ${_MULTIBUILD_ECLASS} ]]; then |
49 |
+_MULTIBUILD_ECLASS=1 |
50 |
|
51 |
# @ECLASS-VARIABLE: MULTIBUILD_VARIANTS |
52 |
# @REQUIRED |
53 |
@@ -137,25 +132,6 @@ multibuild_foreach_variant() { |
54 |
return ${ret} |
55 |
} |
56 |
|
57 |
-# @FUNCTION: multibuild_parallel_foreach_variant |
58 |
-# @USAGE: [<argv>...] |
59 |
-# @DESCRIPTION: |
60 |
-# Run the passed command repeatedly for each of the enabled package |
61 |
-# variants. This used to run the commands in parallel but now it's |
62 |
-# just a deprecated alias to multibuild_foreach_variant. |
63 |
-# |
64 |
-# The function returns 0 if all commands return 0, or the first non-zero |
65 |
-# exit status otherwise. However, it performs all the invocations |
66 |
-# nevertheless. It is preferred to call 'die' inside of the passed |
67 |
-# function. |
68 |
-multibuild_parallel_foreach_variant() { |
69 |
- debug-print-function ${FUNCNAME} "${@}" |
70 |
- |
71 |
- [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}" |
72 |
- |
73 |
- multibuild_foreach_variant "${@}" |
74 |
-} |
75 |
- |
76 |
# @FUNCTION: multibuild_for_best_variant |
77 |
# @USAGE: [<argv>...] |
78 |
# @DESCRIPTION: |
79 |
@@ -172,10 +148,7 @@ multibuild_for_best_variant() { |
80 |
[[ ${MULTIBUILD_VARIANTS} ]] \ |
81 |
|| die "MULTIBUILD_VARIANTS need to be set" |
82 |
|
83 |
- # bash-4.1 can't handle negative subscripts |
84 |
- local MULTIBUILD_VARIANTS=( |
85 |
- "${MULTIBUILD_VARIANTS[$(( ${#MULTIBUILD_VARIANTS[@]} - 1 ))]}" |
86 |
- ) |
87 |
+ local MULTIBUILD_VARIANTS=( "${MULTIBUILD_VARIANTS[-1]}" ) |
88 |
multibuild_foreach_variant "${@}" |
89 |
} |
90 |
|
91 |
@@ -239,5 +212,4 @@ multibuild_merge_root() { |
92 |
rm -rf "${src}" || die |
93 |
} |
94 |
|
95 |
-_MULTIBUILD=1 |
96 |
fi |