1 |
commit: f29ebeaa1bac665d9dc6dac6935bf0439eb82975 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 29 10:55:22 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 29 10:56:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f29ebeaa |
7 |
|
8 |
sys-devel/clang: Bump to 11.0.1-rc1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/clang/Manifest | 1 + |
13 |
sys-devel/clang/clang-11.0.1_rc1.ebuild | 430 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 431 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest |
17 |
index 8c576bf0d45..8b7152624b2 100644 |
18 |
--- a/sys-devel/clang/Manifest |
19 |
+++ b/sys-devel/clang/Manifest |
20 |
@@ -4,4 +4,5 @@ DIST llvm-11.0.0-manpages.tar.bz2 179592 BLAKE2B d03dff5e7426f4c648d6112dee0fa7a |
21 |
DIST llvm-9.0.0-manpages.tar.bz2 158546 BLAKE2B eed6235698a0b5993affe305f7fd22cd4cf444adf931275a1685f2049a5f17cf2933907577d9ce142348a3c579769b0436aa2b5a9a953958504125a8c3e83b7d SHA512 64c8d18061eb2870b379a1df485be0b61eac07cb10b3f97347b54b2ee326faa63437ca04466776be282e120dd3f6147e14fffdd38ca370db85748fe5eb54d764 |
22 |
DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 |
23 |
DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 |
24 |
+DIST llvmorg-11.0.1-rc1.tar.gz 122777435 BLAKE2B 23b520d33cf4b641027ee52bb10c6171d60356c9167d5b94012929e6e547c526cda1a6177c295ed19592dfb83b020f63b2cef4cabc70ce9a2a8e098fe654a3cd SHA512 605c7bbff1610f335be8ea4f1204df797fed21185a54c77565f6ff2d00794d1967e9c5fab7c87633e242f2f999bdffb76da83f756d261c1ca476114599409ae1 |
25 |
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 |
26 |
|
27 |
diff --git a/sys-devel/clang/clang-11.0.1_rc1.ebuild b/sys-devel/clang/clang-11.0.1_rc1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..1e9b8aabd11 |
30 |
--- /dev/null |
31 |
+++ b/sys-devel/clang/clang-11.0.1_rc1.ebuild |
32 |
@@ -0,0 +1,430 @@ |
33 |
+# Copyright 1999-2020 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{6..9} ) |
39 |
+inherit cmake llvm llvm.org multilib-minimal pax-utils \ |
40 |
+ python-single-r1 toolchain-funcs |
41 |
+ |
42 |
+DESCRIPTION="C language family frontend for LLVM" |
43 |
+HOMEPAGE="https://llvm.org/" |
44 |
+ |
45 |
+# Keep in sync with sys-devel/llvm |
46 |
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE ) |
47 |
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 |
48 |
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore |
49 |
+ "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) |
50 |
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
51 |
+ |
52 |
+# MSVCSetupApi.h: MIT |
53 |
+# sorttable.js: MIT |
54 |
+ |
55 |
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" |
56 |
+SLOT="$(ver_cut 1)" |
57 |
+KEYWORDS="" |
58 |
+IUSE="debug default-compiler-rt default-libcxx default-lld |
59 |
+ doc +static-analyzer test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" |
60 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
61 |
+ || ( ${ALL_LLVM_TARGETS[*]} )" |
62 |
+RESTRICT="!test? ( test )" |
63 |
+ |
64 |
+RDEPEND=" |
65 |
+ ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] |
66 |
+ static-analyzer? ( dev-lang/perl:* ) |
67 |
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) |
68 |
+ ${PYTHON_DEPS}" |
69 |
+for x in "${ALL_LLVM_TARGETS[@]}"; do |
70 |
+ RDEPEND+=" |
71 |
+ ${x}? ( ~sys-devel/llvm-${PV}:${SLOT}[${x}] )" |
72 |
+done |
73 |
+unset x |
74 |
+ |
75 |
+DEPEND="${RDEPEND}" |
76 |
+BDEPEND=" |
77 |
+ >=dev-util/cmake-3.16 |
78 |
+ doc? ( dev-python/sphinx ) |
79 |
+ xml? ( virtual/pkgconfig ) |
80 |
+ ${PYTHON_DEPS}" |
81 |
+RDEPEND="${RDEPEND} |
82 |
+ !<sys-devel/llvm-4.0.0_rc:0 |
83 |
+ !sys-devel/clang:0" |
84 |
+PDEPEND=" |
85 |
+ sys-devel/clang-common |
86 |
+ ~sys-devel/clang-runtime-${PV} |
87 |
+ default-compiler-rt? ( =sys-libs/compiler-rt-${PV%_*}* ) |
88 |
+ default-libcxx? ( >=sys-libs/libcxx-${PV} ) |
89 |
+ default-lld? ( sys-devel/lld )" |
90 |
+ |
91 |
+LLVM_COMPONENTS=( clang clang-tools-extra ) |
92 |
+LLVM_MANPAGES=build |
93 |
+LLVM_TEST_COMPONENTS=( |
94 |
+ llvm/lib/Testing/Support |
95 |
+ llvm/utils/{lit,llvm-lit,unittest} |
96 |
+ llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} |
97 |
+) |
98 |
+llvm.org_set_globals |
99 |
+ |
100 |
+# Multilib notes: |
101 |
+# 1. ABI_* flags control ABIs libclang* is built for only. |
102 |
+# 2. clang is always capable of compiling code for all ABIs for enabled |
103 |
+# target. However, you will need appropriate crt* files (installed |
104 |
+# e.g. by sys-devel/gcc and sys-libs/glibc). |
105 |
+# 3. ${CHOST}-clang wrappers are always installed for all ABIs included |
106 |
+# in the current profile (i.e. alike supported by sys-devel/gcc). |
107 |
+# |
108 |
+# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need |
109 |
+# multilib clang* libraries (not runtime, not wrappers). |
110 |
+ |
111 |
+pkg_setup() { |
112 |
+ LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup |
113 |
+ python-single-r1_pkg_setup |
114 |
+} |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access |
118 |
+ mkdir -p x/y || die |
119 |
+ BUILD_DIR=${WORKDIR}/x/y/clang |
120 |
+ |
121 |
+ llvm.org_src_prepare |
122 |
+ |
123 |
+ mv ../clang-tools-extra tools/extra || die |
124 |
+} |
125 |
+ |
126 |
+check_distribution_components() { |
127 |
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then |
128 |
+ local all_targets=() my_targets=() l |
129 |
+ cd "${BUILD_DIR}" || die |
130 |
+ |
131 |
+ while read -r l; do |
132 |
+ if [[ ${l} == install-*-stripped:* ]]; then |
133 |
+ l=${l#install-} |
134 |
+ l=${l%%-stripped*} |
135 |
+ |
136 |
+ case ${l} in |
137 |
+ # meta-targets |
138 |
+ clang-libraries|distribution) |
139 |
+ continue |
140 |
+ ;; |
141 |
+ # headers for clang-tidy static library |
142 |
+ clang-tidy-headers) |
143 |
+ continue |
144 |
+ ;; |
145 |
+ # tools |
146 |
+ clang|clangd|clang-*) |
147 |
+ ;; |
148 |
+ # static libraries |
149 |
+ clang*|findAllSymbols) |
150 |
+ continue |
151 |
+ ;; |
152 |
+ # conditional to USE=doc |
153 |
+ docs-clang-html|docs-clang-tools-html) |
154 |
+ use doc || continue |
155 |
+ ;; |
156 |
+ esac |
157 |
+ |
158 |
+ all_targets+=( "${l}" ) |
159 |
+ fi |
160 |
+ done < <(ninja -t targets all) |
161 |
+ |
162 |
+ while read -r l; do |
163 |
+ my_targets+=( "${l}" ) |
164 |
+ done < <(get_distribution_components $"\n") |
165 |
+ |
166 |
+ local add=() remove=() |
167 |
+ for l in "${all_targets[@]}"; do |
168 |
+ if ! has "${l}" "${my_targets[@]}"; then |
169 |
+ add+=( "${l}" ) |
170 |
+ fi |
171 |
+ done |
172 |
+ for l in "${my_targets[@]}"; do |
173 |
+ if ! has "${l}" "${all_targets[@]}"; then |
174 |
+ remove+=( "${l}" ) |
175 |
+ fi |
176 |
+ done |
177 |
+ |
178 |
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then |
179 |
+ eqawarn "get_distribution_components() is outdated!" |
180 |
+ eqawarn " Add: ${add[*]}" |
181 |
+ eqawarn "Remove: ${remove[*]}" |
182 |
+ fi |
183 |
+ cd - >/dev/null || die |
184 |
+ fi |
185 |
+} |
186 |
+ |
187 |
+get_distribution_components() { |
188 |
+ local sep=${1-;} |
189 |
+ |
190 |
+ local out=( |
191 |
+ # common stuff |
192 |
+ clang-cmake-exports |
193 |
+ clang-headers |
194 |
+ clang-resource-headers |
195 |
+ libclang-headers |
196 |
+ |
197 |
+ # libs |
198 |
+ clang-cpp |
199 |
+ libclang |
200 |
+ ) |
201 |
+ |
202 |
+ if multilib_is_native_abi; then |
203 |
+ out+=( |
204 |
+ # common stuff |
205 |
+ bash-autocomplete |
206 |
+ libclang-python-bindings |
207 |
+ |
208 |
+ # tools |
209 |
+ c-index-test |
210 |
+ clang |
211 |
+ clang-format |
212 |
+ clang-offload-bundler |
213 |
+ clang-offload-wrapper |
214 |
+ clang-refactor |
215 |
+ clang-rename |
216 |
+ clang-scan-deps |
217 |
+ diagtool |
218 |
+ hmaptool |
219 |
+ |
220 |
+ # extra tools |
221 |
+ clang-apply-replacements |
222 |
+ clang-change-namespace |
223 |
+ clang-doc |
224 |
+ clang-include-fixer |
225 |
+ clang-move |
226 |
+ clang-query |
227 |
+ clang-reorder-fields |
228 |
+ clang-tidy |
229 |
+ clangd |
230 |
+ find-all-symbols |
231 |
+ modularize |
232 |
+ pp-trace |
233 |
+ ) |
234 |
+ |
235 |
+ if llvm_are_manpages_built; then |
236 |
+ out+=( |
237 |
+ # manpages |
238 |
+ docs-clang-man |
239 |
+ docs-clang-tools-man |
240 |
+ ) |
241 |
+ fi |
242 |
+ |
243 |
+ use doc && out+=( |
244 |
+ docs-clang-html |
245 |
+ docs-clang-tools-html |
246 |
+ ) |
247 |
+ |
248 |
+ use static-analyzer && out+=( |
249 |
+ clang-check |
250 |
+ clang-extdef-mapping |
251 |
+ scan-build |
252 |
+ scan-view |
253 |
+ ) |
254 |
+ fi |
255 |
+ |
256 |
+ printf "%s${sep}" "${out[@]}" |
257 |
+} |
258 |
+ |
259 |
+multilib_src_configure() { |
260 |
+ local llvm_version=$(llvm-config --version) || die |
261 |
+ local clang_version=$(ver_cut 1-3 "${llvm_version}") |
262 |
+ |
263 |
+ local mycmakeargs=( |
264 |
+ -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm" |
265 |
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" |
266 |
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" |
267 |
+ # relative to bindir |
268 |
+ -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" |
269 |
+ |
270 |
+ -DBUILD_SHARED_LIBS=OFF |
271 |
+ -DCLANG_LINK_CLANG_DYLIB=ON |
272 |
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) |
273 |
+ |
274 |
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" |
275 |
+ -DLLVM_BUILD_TESTS=$(usex test) |
276 |
+ |
277 |
+ # these are not propagated reliably, so redefine them |
278 |
+ -DLLVM_ENABLE_EH=ON |
279 |
+ -DLLVM_ENABLE_RTTI=ON |
280 |
+ |
281 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) |
282 |
+ # libgomp support fails to find headers without explicit -I |
283 |
+ # furthermore, it provides only syntax checking |
284 |
+ -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp |
285 |
+ |
286 |
+ # override default stdlib and rtlib |
287 |
+ -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") |
288 |
+ -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") |
289 |
+ -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") |
290 |
+ |
291 |
+ -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) |
292 |
+ -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) |
293 |
+ |
294 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
295 |
+ ) |
296 |
+ use test && mycmakeargs+=( |
297 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
298 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags)" |
299 |
+ ) |
300 |
+ |
301 |
+ if multilib_is_native_abi; then |
302 |
+ local build_docs=OFF |
303 |
+ if llvm_are_manpages_built; then |
304 |
+ build_docs=ON |
305 |
+ mycmakeargs+=( |
306 |
+ -DLLVM_BUILD_DOCS=ON |
307 |
+ -DLLVM_ENABLE_SPHINX=ON |
308 |
+ -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" |
309 |
+ -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" |
310 |
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF |
311 |
+ ) |
312 |
+ fi |
313 |
+ |
314 |
+ mycmakeargs+=( |
315 |
+ # normally copied from LLVM_INCLUDE_DOCS but the latter |
316 |
+ # is lacking value in stand-alone builds |
317 |
+ -DCLANG_INCLUDE_DOCS=${build_docs} |
318 |
+ -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} |
319 |
+ ) |
320 |
+ else |
321 |
+ mycmakeargs+=( |
322 |
+ -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF |
323 |
+ ) |
324 |
+ fi |
325 |
+ |
326 |
+ if [[ -n ${EPREFIX} ]]; then |
327 |
+ mycmakeargs+=( |
328 |
+ -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" |
329 |
+ ) |
330 |
+ fi |
331 |
+ |
332 |
+ if tc-is-cross-compiler; then |
333 |
+ [[ -x "/usr/bin/clang-tblgen" ]] \ |
334 |
+ || die "/usr/bin/clang-tblgen not found or usable" |
335 |
+ mycmakeargs+=( |
336 |
+ -DCMAKE_CROSSCOMPILING=ON |
337 |
+ -DCLANG_TABLEGEN=/usr/bin/clang-tblgen |
338 |
+ ) |
339 |
+ fi |
340 |
+ |
341 |
+ # LLVM can have very high memory consumption while linking, |
342 |
+ # exhausting the limit on 32-bit linker executable |
343 |
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" |
344 |
+ |
345 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
346 |
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
347 |
+ cmake_src_configure |
348 |
+ |
349 |
+ multilib_is_native_abi && check_distribution_components |
350 |
+} |
351 |
+ |
352 |
+multilib_src_compile() { |
353 |
+ cmake_build distribution |
354 |
+ |
355 |
+ # provide a symlink for tests |
356 |
+ if [[ ! -L ${WORKDIR}/lib/clang ]]; then |
357 |
+ mkdir -p "${WORKDIR}"/lib || die |
358 |
+ ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die |
359 |
+ fi |
360 |
+} |
361 |
+ |
362 |
+multilib_src_test() { |
363 |
+ # respect TMPDIR! |
364 |
+ local -x LIT_PRESERVES_TMP=1 |
365 |
+ cmake_build check-clang |
366 |
+ multilib_is_native_abi && |
367 |
+ cmake_build check-clang-tools check-clangd |
368 |
+} |
369 |
+ |
370 |
+src_install() { |
371 |
+ MULTILIB_WRAPPED_HEADERS=( |
372 |
+ /usr/include/clang/Config/config.h |
373 |
+ ) |
374 |
+ |
375 |
+ multilib-minimal_src_install |
376 |
+ |
377 |
+ # Move runtime headers to /usr/lib/clang, where they belong |
378 |
+ mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die |
379 |
+ # move (remaining) wrapped headers back |
380 |
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die |
381 |
+ |
382 |
+ # Apply CHOST and version suffix to clang tools |
383 |
+ # note: we use two version components here (vs 3 in runtime path) |
384 |
+ local llvm_version=$(llvm-config --version) || die |
385 |
+ local clang_version=$(ver_cut 1 "${llvm_version}") |
386 |
+ local clang_full_version=$(ver_cut 1-3 "${llvm_version}") |
387 |
+ local clang_tools=( clang clang++ clang-cl clang-cpp ) |
388 |
+ local abi i |
389 |
+ |
390 |
+ # cmake gives us: |
391 |
+ # - clang-X |
392 |
+ # - clang -> clang-X |
393 |
+ # - clang++, clang-cl, clang-cpp -> clang |
394 |
+ # we want to have: |
395 |
+ # - clang-X |
396 |
+ # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X |
397 |
+ # - clang, clang++, clang-cl, clang-cpp -> clang*-X |
398 |
+ # also in CHOST variant |
399 |
+ for i in "${clang_tools[@]:1}"; do |
400 |
+ rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die |
401 |
+ dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}" |
402 |
+ dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}" |
403 |
+ done |
404 |
+ |
405 |
+ # now create target symlinks for all supported ABIs |
406 |
+ for abi in $(get_all_abis); do |
407 |
+ local abi_chost=$(get_abi_CHOST "${abi}") |
408 |
+ for i in "${clang_tools[@]}"; do |
409 |
+ dosym "${i}-${clang_version}" \ |
410 |
+ "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}" |
411 |
+ dosym "${abi_chost}-${i}-${clang_version}" \ |
412 |
+ "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}" |
413 |
+ done |
414 |
+ done |
415 |
+ |
416 |
+ # Remove unnecessary headers on FreeBSD, bug #417171 |
417 |
+ if use kernel_FreeBSD; then |
418 |
+ rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die |
419 |
+ fi |
420 |
+} |
421 |
+ |
422 |
+multilib_src_install() { |
423 |
+ DESTDIR=${D} cmake_build install-distribution |
424 |
+ |
425 |
+ # move headers to /usr/include for wrapping & ABI mismatch checks |
426 |
+ # (also drop the version suffix from runtime headers) |
427 |
+ rm -rf "${ED}"/usr/include || die |
428 |
+ mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die |
429 |
+ mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die |
430 |
+} |
431 |
+ |
432 |
+multilib_src_install_all() { |
433 |
+ python_fix_shebang "${ED}" |
434 |
+ if use static-analyzer; then |
435 |
+ python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view |
436 |
+ fi |
437 |
+ |
438 |
+ docompress "/usr/lib/llvm/${SLOT}/share/man" |
439 |
+ llvm_install_manpages |
440 |
+ # match 'html' non-compression |
441 |
+ use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" |
442 |
+ # +x for some reason; TODO: investigate |
443 |
+ use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1" |
444 |
+} |
445 |
+ |
446 |
+pkg_postinst() { |
447 |
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then |
448 |
+ eselect compiler-shadow update all |
449 |
+ fi |
450 |
+ |
451 |
+ elog "You can find additional utility scripts in:" |
452 |
+ elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang" |
453 |
+ elog "Some of them are vim integration scripts (with instructions inside)." |
454 |
+ elog "The run-clang-tidy.py script requires the following additional package:" |
455 |
+ elog " dev-python/pyyaml" |
456 |
+} |
457 |
+ |
458 |
+pkg_postrm() { |
459 |
+ if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then |
460 |
+ eselect compiler-shadow clean all |
461 |
+ fi |
462 |
+} |