1 |
commit: 41996de1ef92803e84cad80c05f1fc547d1cf0e4 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 1 17:58:06 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 3 11:46:19 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41996de1 |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: Port to llvm.org eclass |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
.../compiler-rt-sanitizers-10.0.0.9999.ebuild | 19 ++++++---------- |
13 |
.../compiler-rt-sanitizers-9.0.0.ebuild | 25 +++++----------------- |
14 |
.../compiler-rt-sanitizers-9.0.1.9999.ebuild | 20 ++++++----------- |
15 |
3 files changed, 17 insertions(+), 47 deletions(-) |
16 |
|
17 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild |
18 |
index 1cc96771cae..85a0884b7a9 100644 |
19 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild |
20 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild |
21 |
@@ -4,14 +4,14 @@ |
22 |
EAPI=7 |
23 |
|
24 |
PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) |
25 |
-inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \ |
26 |
+inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ |
27 |
multiprocessing python-any-r1 |
28 |
|
29 |
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
30 |
HOMEPAGE="https://llvm.org/" |
31 |
-SRC_URI="" |
32 |
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" |
33 |
-S=${WORKDIR}/${P}/compiler-rt |
34 |
+LLVM_COMPONENTS=( compiler-rt ) |
35 |
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) |
36 |
+llvm.org_set_globals |
37 |
|
38 |
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
39 |
SLOT="$(ver_cut 1-3)" |
40 |
@@ -55,13 +55,6 @@ pkg_setup() { |
41 |
python-any-r1_pkg_setup |
42 |
} |
43 |
|
44 |
-src_unpack() { |
45 |
- local dirs=( compiler-rt ) |
46 |
- use test && dirs+=( llvm/lib/Testing/Support llvm/utils/unittest ) |
47 |
- git-r3_fetch |
48 |
- git-r3_checkout '' '' '' "${dirs[@]}" |
49 |
-} |
50 |
- |
51 |
src_prepare() { |
52 |
cmake-utils_src_prepare |
53 |
|
54 |
@@ -76,7 +69,7 @@ src_prepare() { |
55 |
|
56 |
src_configure() { |
57 |
# pre-set since we need to pass it to cmake |
58 |
- BUILD_DIR=${WORKDIR}/${P}/compiler-rt_build |
59 |
+ BUILD_DIR=${WORKDIR}/compiler-rt_build |
60 |
|
61 |
if use clang; then |
62 |
local -x CC=${CHOST}-clang |
63 |
@@ -101,7 +94,7 @@ src_configure() { |
64 |
) |
65 |
if use test; then |
66 |
mycmakeargs+=( |
67 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm" |
68 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
69 |
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
70 |
-DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |
71 |
|
72 |
|
73 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild |
74 |
index 9ee7e14a6b3..1ced0d08037 100644 |
75 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild |
76 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild |
77 |
@@ -4,17 +4,14 @@ |
78 |
EAPI=7 |
79 |
|
80 |
PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) |
81 |
-inherit check-reqs cmake-utils flag-o-matic llvm \ |
82 |
+inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ |
83 |
multiprocessing python-any-r1 |
84 |
|
85 |
-MY_P=compiler-rt-${PV/_/}.src |
86 |
-LLVM_P=llvm-${PV/_/}.src |
87 |
- |
88 |
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
89 |
HOMEPAGE="https://llvm.org/" |
90 |
-SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz |
91 |
- test? ( https://releases.llvm.org/${PV}/${LLVM_P}.tar.xz )" |
92 |
-S=${WORKDIR}/${MY_P} |
93 |
+LLVM_COMPONENTS=( compiler-rt ) |
94 |
+LLVM_TEST_COMPONENTS=( llvm/utils/unittest ) |
95 |
+llvm.org_set_globals |
96 |
|
97 |
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
98 |
SLOT="$(ver_cut 1-3)" |
99 |
@@ -58,18 +55,6 @@ pkg_setup() { |
100 |
python-any-r1_pkg_setup |
101 |
} |
102 |
|
103 |
-src_unpack() { |
104 |
- einfo "Unpacking ${MY_P}.tar.xz ..." |
105 |
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die |
106 |
- |
107 |
- if use test; then |
108 |
- einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." |
109 |
- tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ |
110 |
- "${LLVM_P}"/utils/unittest || die |
111 |
- mv "${LLVM_P}" llvm || die |
112 |
- fi |
113 |
-} |
114 |
- |
115 |
src_prepare() { |
116 |
cmake-utils_src_prepare |
117 |
|
118 |
@@ -84,7 +69,7 @@ src_prepare() { |
119 |
|
120 |
src_configure() { |
121 |
# pre-set since we need to pass it to cmake |
122 |
- BUILD_DIR=${WORKDIR}/${P}_build |
123 |
+ BUILD_DIR=${WORKDIR}/compiler-rt_build |
124 |
|
125 |
if use clang; then |
126 |
local -x CC=${CHOST}-clang |
127 |
|
128 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild |
129 |
index 832207f6714..f28bb313413 100644 |
130 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild |
131 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild |
132 |
@@ -4,15 +4,14 @@ |
133 |
EAPI=7 |
134 |
|
135 |
PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) |
136 |
-inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \ |
137 |
+inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ |
138 |
multiprocessing python-any-r1 |
139 |
|
140 |
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
141 |
HOMEPAGE="https://llvm.org/" |
142 |
-SRC_URI="" |
143 |
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" |
144 |
-EGIT_BRANCH="release/9.x" |
145 |
-S=${WORKDIR}/${P}/compiler-rt |
146 |
+LLVM_COMPONENTS=( compiler-rt ) |
147 |
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) |
148 |
+llvm.org_set_globals |
149 |
|
150 |
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
151 |
SLOT="$(ver_cut 1-3)" |
152 |
@@ -56,13 +55,6 @@ pkg_setup() { |
153 |
python-any-r1_pkg_setup |
154 |
} |
155 |
|
156 |
-src_unpack() { |
157 |
- local dirs=( compiler-rt ) |
158 |
- use test && dirs+=( llvm/utils/unittest ) |
159 |
- git-r3_fetch |
160 |
- git-r3_checkout '' '' '' "${dirs[@]}" |
161 |
-} |
162 |
- |
163 |
src_prepare() { |
164 |
cmake-utils_src_prepare |
165 |
|
166 |
@@ -77,7 +69,7 @@ src_prepare() { |
167 |
|
168 |
src_configure() { |
169 |
# pre-set since we need to pass it to cmake |
170 |
- BUILD_DIR=${WORKDIR}/${P}/compiler-rt_build |
171 |
+ BUILD_DIR=${WORKDIR}/compiler-rt_build |
172 |
|
173 |
if use clang; then |
174 |
local -x CC=${CHOST}-clang |
175 |
@@ -102,7 +94,7 @@ src_configure() { |
176 |
) |
177 |
if use test; then |
178 |
mycmakeargs+=( |
179 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm" |
180 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
181 |
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
182 |
-DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" |