1 |
commit: 93b1bdad544f0fa01791f099945d8f2fd41540e1 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 26 10:31:13 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 26 16:48:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93b1bdad |
7 |
|
8 |
llvm.org.eclass: Remove support for pre-9.0.1 archives |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
eclass/llvm.org.eclass | 84 +++++--------------------------------------------- |
13 |
1 file changed, 8 insertions(+), 76 deletions(-) |
14 |
|
15 |
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass |
16 |
index 3bb0465c377..42fa04734d2 100644 |
17 |
--- a/eclass/llvm.org.eclass |
18 |
+++ b/eclass/llvm.org.eclass |
19 |
@@ -85,27 +85,6 @@ inherit multiprocessing |
20 |
|
21 |
# == global scope logic == |
22 |
|
23 |
-# @FUNCTION: _llvm.org_get_archives |
24 |
-# @USAGE: <components> |
25 |
-# @INTERNAL |
26 |
-# @DESCRIPTION: |
27 |
-# Set 'archives' array to list of unique archive filenames |
28 |
-# for components passed as parameters. |
29 |
-_llvm.org_get_archives() { |
30 |
- local c |
31 |
- archives=() |
32 |
- |
33 |
- for c; do |
34 |
- local cn=${c%%/*} |
35 |
- case ${cn} in |
36 |
- clang) cn=cfe;; |
37 |
- esac |
38 |
- |
39 |
- local a=${cn}-${PV}.src.tar.xz |
40 |
- has "${a}" "${archives[@]}" || archives+=( "${a}" ) |
41 |
- done |
42 |
-} |
43 |
- |
44 |
# @FUNCTION: llvm.org_set_globals |
45 |
# @DESCRIPTION: |
46 |
# Set global variables. This must be called after setting LLVM_* |
47 |
@@ -126,18 +105,8 @@ llvm.org_set_globals() { |
48 |
[[ ${PV} != ${_LLVM_MASTER_MAJOR}.* ]] && |
49 |
EGIT_BRANCH="release/${PV%%.*}.x" |
50 |
elif [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then |
51 |
- if ver_test -ge 9.0.1_rc1; then |
52 |
- # 9.0.1 RCs as GitHub archive |
53 |
- SRC_URI+=" |
54 |
- https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz" |
55 |
- else |
56 |
- local a archives=() |
57 |
- _llvm.org_get_archives "${LLVM_COMPONENTS[@]}" |
58 |
- for a in "${archives[@]}"; do |
59 |
- SRC_URI+=" |
60 |
- https://releases.llvm.org/${PV}/${a}" |
61 |
- done |
62 |
- fi |
63 |
+ SRC_URI+=" |
64 |
+ https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz" |
65 |
else |
66 |
die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}" |
67 |
fi |
68 |
@@ -147,26 +116,6 @@ llvm.org_set_globals() { |
69 |
if [[ -n ${LLVM_TEST_COMPONENTS+1} ]]; then |
70 |
IUSE+=" test" |
71 |
RESTRICT+=" !test? ( test )" |
72 |
- |
73 |
- if [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then |
74 |
- if ver_test -ge 9.0.1_rc1; then |
75 |
- # everything already fetched |
76 |
- : |
77 |
- else |
78 |
- # split 9.0.0 release and older |
79 |
- SRC_URI+=" |
80 |
- test? (" |
81 |
- |
82 |
- _llvm.org_get_archives "${LLVM_TEST_COMPONENTS[@]}" |
83 |
- for a in "${archives[@]}"; do |
84 |
- SRC_URI+=" |
85 |
- https://releases.llvm.org/${PV}/${a}" |
86 |
- done |
87 |
- |
88 |
- SRC_URI+=" |
89 |
- )" |
90 |
- fi |
91 |
- fi |
92 |
fi |
93 |
|
94 |
# === useful defaults for cmake-based packages === |
95 |
@@ -202,29 +151,12 @@ llvm.org_src_unpack() { |
96 |
git-r3_fetch |
97 |
git-r3_checkout '' . '' "${components[@]}" |
98 |
else |
99 |
- if ver_test -ge 9.0.1_rc1; then |
100 |
- local archive=llvmorg-${PV/_/-}.tar.gz |
101 |
- ebegin "Unpacking from ${archive}" |
102 |
- tar -x -z -o --strip-components 1 \ |
103 |
- -f "${DISTDIR}/${archive}" \ |
104 |
- "${components[@]/#/llvm-project-${archive%.tar*}/}" || die |
105 |
- eend ${?} |
106 |
- else |
107 |
- local c archives |
108 |
- # TODO: optimize this |
109 |
- for c in "${components[@]}"; do |
110 |
- local top_dir=${c%%/*} |
111 |
- _llvm.org_get_archives "${c}" |
112 |
- local sub_path=${archives[0]%.tar.xz} |
113 |
- [[ ${c} == */* ]] && sub_path+=/${c#*/} |
114 |
- |
115 |
- ebegin "Unpacking ${sub_path} from ${archives[0]}" |
116 |
- mkdir -p "${top_dir}" || die |
117 |
- tar -C "${top_dir}" -x -J -o --strip-components 1 \ |
118 |
- -f "${DISTDIR}/${archives[0]}" "${sub_path}" || die |
119 |
- eend ${?} |
120 |
- done |
121 |
- fi |
122 |
+ local archive=llvmorg-${PV/_/-}.tar.gz |
123 |
+ ebegin "Unpacking from ${archive}" |
124 |
+ tar -x -z -o --strip-components 1 \ |
125 |
+ -f "${DISTDIR}/${archive}" \ |
126 |
+ "${components[@]/#/llvm-project-${archive%.tar*}/}" || die |
127 |
+ eend ${?} |
128 |
fi |
129 |
} |