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