1 |
commit: 9563cd26049e21cd10b23372a1e58ef501bcf960 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 30 08:10:03 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 15 12:47:17 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9563cd26 |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: Add slotted version |
9 |
|
10 |
... => compiler-rt-sanitizers-4.0.0_rc1-r1.ebuild} | 48 ++++++++++------------ |
11 |
.../compiler-rt-sanitizers-9999.ebuild | 48 ++++++++++------------ |
12 |
2 files changed, 44 insertions(+), 52 deletions(-) |
13 |
|
14 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0_rc1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0_rc1-r1.ebuild |
15 |
similarity index 63% |
16 |
rename from sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0_rc1.ebuild |
17 |
rename to sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0_rc1-r1.ebuild |
18 |
index e80334139e..679d166d73 100644 |
19 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0_rc1.ebuild |
20 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0_rc1-r1.ebuild |
21 |
@@ -9,7 +9,7 @@ EAPI=6 |
22 |
CMAKE_MIN_VERSION=3.7.0-r1 |
23 |
PYTHON_COMPAT=( python2_7 ) |
24 |
|
25 |
-inherit cmake-utils flag-o-matic python-any-r1 |
26 |
+inherit cmake-utils flag-o-matic python-any-r1 versionator |
27 |
|
28 |
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
29 |
HOMEPAGE="http://llvm.org/" |
30 |
@@ -17,23 +17,22 @@ SRC_URI="http://www.llvm.org/pre-releases/${PV/_//}/compiler-rt-${PV/_/}.src.tar |
31 |
test? ( http://www.llvm.org/pre-releases/${PV/_//}/llvm-${PV/_/}.src.tar.xz )" |
32 |
|
33 |
LICENSE="|| ( UoI-NCSA MIT )" |
34 |
-SLOT="0/${PV%.*}" |
35 |
+SLOT="${PV%_*}" |
36 |
KEYWORDS="~amd64 ~arm64 ~x86" |
37 |
IUSE="test" |
38 |
|
39 |
-RDEPEND="!<sys-devel/llvm-${PV}" |
40 |
+LLVM_SLOT=${SLOT%%.*} |
41 |
+RDEPEND="!=sys-libs/compiler-rt-sanitizers-${SLOT}*:0" |
42 |
# llvm-4 needed for --cmakedir |
43 |
-DEPEND="${RDEPEND} |
44 |
+DEPEND=" |
45 |
>=sys-devel/llvm-4 |
46 |
test? ( |
47 |
app-portage/unsandbox |
48 |
$(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") |
49 |
- ~sys-devel/clang-${PV} |
50 |
- ~sys-libs/compiler-rt-${PV} ) |
51 |
+ =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} |
52 |
+ sys-libs/compiler-rt:${SLOT} ) |
53 |
${PYTHON_DEPS}" |
54 |
|
55 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
56 |
- |
57 |
S=${WORKDIR}/compiler-rt-${PV/_/}.src |
58 |
|
59 |
# least intrusive of all |
60 |
@@ -51,14 +50,11 @@ src_configure() { |
61 |
# pre-set since we need to pass it to cmake |
62 |
BUILD_DIR=${WORKDIR}/${P}_build |
63 |
|
64 |
- local llvm_version=$(llvm-config --version) || die |
65 |
- local clang_version=$(get_version_component_range 1-3 "${llvm_version}") |
66 |
- local libdir=$(get_libdir) |
67 |
local mycmakeargs=( |
68 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${clang_version}" |
69 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
70 |
# use a build dir structure consistent with install |
71 |
# this makes it possible to easily deploy test-friendly clang |
72 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${clang_version}" |
73 |
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
74 |
|
75 |
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
76 |
# built-ins installed by sys-libs/compiler-rt |
77 |
@@ -72,8 +68,8 @@ src_configure() { |
78 |
-DLIT_COMMAND="${EPREFIX}/usr/bin/unsandbox;${EPREFIX}/usr/bin/lit" |
79 |
|
80 |
# they are created during src_test() |
81 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/bin/clang" |
82 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/bin/clang++" |
83 |
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang" |
84 |
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang++" |
85 |
) |
86 |
|
87 |
# same flags are passed for build & tests, so we need to strip |
88 |
@@ -84,23 +80,23 @@ src_configure() { |
89 |
cmake-utils_src_configure |
90 |
|
91 |
if use test; then |
92 |
- local sys_dir=( "${EPREFIX}/usr/lib/clang/${clang_version}/lib"/* ) |
93 |
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
94 |
[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
95 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[@]}" |
96 |
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
97 |
|
98 |
# copy clang over since resource_dir is located relatively to binary |
99 |
# therefore, we can put our new libraries in it |
100 |
- mkdir -p "${BUILD_DIR}"/{bin,$(get_libdir),lib/clang/"${clang_version}"/include} || die |
101 |
- cp "${EPREFIX}/usr/bin/clang" "${EPREFIX}/usr/bin/clang++" \ |
102 |
- "${BUILD_DIR}"/bin/ || die |
103 |
- cp "${EPREFIX}/usr/lib/clang/${clang_version}/include"/*.h \ |
104 |
- "${BUILD_DIR}/lib/clang/${clang_version}/include/" || die |
105 |
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
106 |
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/bin/clang{,++} \ |
107 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/bin/ || die |
108 |
+ cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
109 |
+ "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
110 |
cp "${sys_dir}"/*builtins*.a \ |
111 |
- "${BUILD_DIR}/lib/clang/${clang_version}/lib/${sys_dir##*/}/" || die |
112 |
+ "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
113 |
# we also need LLVMgold.so for gold-based tests |
114 |
- if [[ -f ${EPREFIX}/usr/$(get_libdir)/LLVMgold.so ]]; then |
115 |
- ln -s "${EPREFIX}/usr/$(get_libdir)/LLVMgold.so" \ |
116 |
- "${BUILD_DIR}/$(get_libdir)/" || die |
117 |
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
118 |
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so \ |
119 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/$(get_libdir)/ || die |
120 |
fi |
121 |
fi |
122 |
} |
123 |
|
124 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild |
125 |
index 83addde698..6e41986151 100644 |
126 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild |
127 |
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild |
128 |
@@ -9,7 +9,7 @@ EAPI=6 |
129 |
CMAKE_MIN_VERSION=3.7.0-r1 |
130 |
PYTHON_COMPAT=( python2_7 ) |
131 |
|
132 |
-inherit cmake-utils flag-o-matic git-r3 python-any-r1 |
133 |
+inherit cmake-utils flag-o-matic git-r3 python-any-r1 versionator |
134 |
|
135 |
DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
136 |
HOMEPAGE="http://llvm.org/" |
137 |
@@ -18,23 +18,22 @@ EGIT_REPO_URI="http://llvm.org/git/compiler-rt.git |
138 |
https://github.com/llvm-mirror/compiler-rt.git" |
139 |
|
140 |
LICENSE="|| ( UoI-NCSA MIT )" |
141 |
-SLOT="0/${PV%.*}" |
142 |
+# Note: this needs to be updated to match version of clang-9999 |
143 |
+SLOT="5.0.0" |
144 |
KEYWORDS="" |
145 |
IUSE="test" |
146 |
|
147 |
-RDEPEND="!<sys-devel/llvm-${PV}" |
148 |
+LLVM_SLOT=${SLOT%%.*} |
149 |
# llvm-4 needed for --cmakedir |
150 |
-DEPEND="${RDEPEND} |
151 |
+DEPEND=" |
152 |
>=sys-devel/llvm-4 |
153 |
test? ( |
154 |
app-portage/unsandbox |
155 |
$(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") |
156 |
- ~sys-devel/clang-${PV} |
157 |
- ~sys-libs/compiler-rt-${PV} ) |
158 |
+ =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} |
159 |
+ sys-libs/compiler-rt:${SLOT} ) |
160 |
${PYTHON_DEPS}" |
161 |
|
162 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
163 |
- |
164 |
# least intrusive of all |
165 |
CMAKE_BUILD_TYPE=RelWithDebInfo |
166 |
|
167 |
@@ -57,14 +56,11 @@ src_configure() { |
168 |
# pre-set since we need to pass it to cmake |
169 |
BUILD_DIR=${WORKDIR}/${P}_build |
170 |
|
171 |
- local llvm_version=$(llvm-config --version) || die |
172 |
- local clang_version=$(get_version_component_range 1-3 "${llvm_version}") |
173 |
- local libdir=$(get_libdir) |
174 |
local mycmakeargs=( |
175 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${clang_version}" |
176 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
177 |
# use a build dir structure consistent with install |
178 |
# this makes it possible to easily deploy test-friendly clang |
179 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${clang_version}" |
180 |
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
181 |
|
182 |
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
183 |
# built-ins installed by sys-libs/compiler-rt |
184 |
@@ -78,8 +74,8 @@ src_configure() { |
185 |
-DLIT_COMMAND="${EPREFIX}/usr/bin/unsandbox;${EPREFIX}/usr/bin/lit" |
186 |
|
187 |
# they are created during src_test() |
188 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/bin/clang" |
189 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/bin/clang++" |
190 |
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang" |
191 |
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang++" |
192 |
) |
193 |
|
194 |
# same flags are passed for build & tests, so we need to strip |
195 |
@@ -90,23 +86,23 @@ src_configure() { |
196 |
cmake-utils_src_configure |
197 |
|
198 |
if use test; then |
199 |
- local sys_dir=( "${EPREFIX}/usr/lib/clang/${clang_version}/lib"/* ) |
200 |
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
201 |
[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
202 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[@]}" |
203 |
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
204 |
|
205 |
# copy clang over since resource_dir is located relatively to binary |
206 |
# therefore, we can put our new libraries in it |
207 |
- mkdir -p "${BUILD_DIR}"/{bin,$(get_libdir),lib/clang/"${clang_version}"/include} || die |
208 |
- cp "${EPREFIX}/usr/bin/clang" "${EPREFIX}/usr/bin/clang++" \ |
209 |
- "${BUILD_DIR}"/bin/ || die |
210 |
- cp "${EPREFIX}/usr/lib/clang/${clang_version}/include"/*.h \ |
211 |
- "${BUILD_DIR}/lib/clang/${clang_version}/include/" || die |
212 |
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
213 |
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/bin/clang{,++} \ |
214 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/bin/ || die |
215 |
+ cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
216 |
+ "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
217 |
cp "${sys_dir}"/*builtins*.a \ |
218 |
- "${BUILD_DIR}/lib/clang/${clang_version}/lib/${sys_dir##*/}/" || die |
219 |
+ "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
220 |
# we also need LLVMgold.so for gold-based tests |
221 |
- if [[ -f ${EPREFIX}/usr/$(get_libdir)/LLVMgold.so ]]; then |
222 |
- ln -s "${EPREFIX}/usr/$(get_libdir)/LLVMgold.so" \ |
223 |
- "${BUILD_DIR}/$(get_libdir)/" || die |
224 |
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
225 |
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)/LLVMgold.so \ |
226 |
+ "${BUILD_DIR}"/lib/llvm/${LLVM_SLOT}/$(get_libdir)/ || die |
227 |
fi |
228 |
fi |
229 |
} |