1 |
voyageur 15/02/28 09:38:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: llvm-3.6.0.ebuild |
5 |
Removed: llvm-3.6.0_rc4.ebuild |
6 |
Log: |
7 |
Bump to final version |
8 |
|
9 |
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key C74525F2) |
10 |
|
11 |
Revision Changes Path |
12 |
1.232 sys-devel/llvm/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.232&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.232&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?r1=1.231&r2=1.232 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v |
21 |
retrieving revision 1.231 |
22 |
retrieving revision 1.232 |
23 |
diff -u -r1.231 -r1.232 |
24 |
--- ChangeLog 23 Feb 2015 10:38:15 -0000 1.231 |
25 |
+++ ChangeLog 28 Feb 2015 09:38:22 -0000 1.232 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for sys-devel/llvm |
28 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.231 2015/02/23 10:38:15 voyageur Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.232 2015/02/28 09:38:22 voyageur Exp $ |
31 |
+ |
32 |
+*llvm-3.6.0 (27 Feb 2015) |
33 |
+ |
34 |
+ 27 Feb 2015; Bernard Cafarelli <voyageur@g.o> -llvm-3.6.0_rc4.ebuild, |
35 |
+ +llvm-3.6.0.ebuild: |
36 |
+ Bump to final version |
37 |
|
38 |
*llvm-3.6.0_rc4 (23 Feb 2015) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-devel/llvm/llvm-3.6.0.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-3.6.0.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-3.6.0.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: llvm-3.6.0.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2015 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-3.6.0.ebuild,v 1.1 2015/02/28 09:38:22 voyageur Exp $ |
53 |
|
54 |
EAPI=5 |
55 |
|
56 |
PYTHON_COMPAT=( python2_7 pypy ) |
57 |
|
58 |
inherit eutils flag-o-matic multibuild multilib \ |
59 |
multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
60 |
|
61 |
DESCRIPTION="Low Level Virtual Machine" |
62 |
HOMEPAGE="http://llvm.org/" |
63 |
SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
64 |
clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
65 |
http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
66 |
http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
67 |
!doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
68 |
|
69 |
LICENSE="UoI-NCSA" |
70 |
SLOT="0/3.6" |
71 |
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
72 |
IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
73 |
+static-analyzer test xml video_cards_radeon |
74 |
kernel_Darwin kernel_FreeBSD" |
75 |
|
76 |
COMMON_DEPEND=" |
77 |
sys-libs/zlib:0= |
78 |
clang? ( |
79 |
python? ( ${PYTHON_DEPS} ) |
80 |
static-analyzer? ( |
81 |
dev-lang/perl:* |
82 |
${PYTHON_DEPS} |
83 |
) |
84 |
xml? ( dev-libs/libxml2:2= ) |
85 |
) |
86 |
gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
87 |
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
88 |
libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
89 |
ncurses? ( >=sys-libs/ncurses-5.9-r3:5=[${MULTILIB_USEDEP}] ) |
90 |
ocaml? ( dev-lang/ocaml:0= )" |
91 |
# configparser-3.2 breaks the build (3.3 or none at all are fine) |
92 |
DEPEND="${COMMON_DEPEND} |
93 |
app-arch/xz-utils |
94 |
dev-lang/perl |
95 |
>=sys-devel/make-3.81 |
96 |
>=sys-devel/flex-2.5.4 |
97 |
>=sys-devel/bison-1.875d |
98 |
|| ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 |
99 |
( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
100 |
) |
101 |
|| ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 ) |
102 |
clang? ( xml? ( virtual/pkgconfig ) ) |
103 |
doc? ( dev-python/sphinx ) |
104 |
libffi? ( virtual/pkgconfig ) |
105 |
!!<dev-python/configparser-3.3.0.2 |
106 |
${PYTHON_DEPS}" |
107 |
RDEPEND="${COMMON_DEPEND} |
108 |
clang? ( !<=sys-devel/clang-${PV}-r99 |
109 |
!>=sys-devel/clang-9999 ) |
110 |
abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
111 |
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
112 |
PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
113 |
|
114 |
# pypy gives me around 1700 unresolved tests due to open file limit |
115 |
# being exceeded. probably GC does not close them fast enough. |
116 |
REQUIRED_USE="${PYTHON_REQUIRED_USE} |
117 |
test? ( || ( $(python_gen_useflags 'python*') ) )" |
118 |
|
119 |
S=${WORKDIR}/${P/_}.src |
120 |
|
121 |
# Some people actually override that in make.conf. That sucks since |
122 |
# we need to run install per-directory, and ninja can't do that... |
123 |
# so why did it call itself ninja in the first place? |
124 |
CMAKE_MAKEFILE_GENERATOR=emake |
125 |
|
126 |
pkg_pretend() { |
127 |
# in megs |
128 |
# !clang !debug !multitarget -O2 400 |
129 |
# !clang !debug multitarget -O2 550 |
130 |
# clang !debug !multitarget -O2 950 |
131 |
# clang !debug multitarget -O2 1200 |
132 |
# !clang debug multitarget -O2 5G |
133 |
# clang !debug multitarget -O0 -g 12G |
134 |
# clang debug multitarget -O2 16G |
135 |
# clang debug multitarget -O0 -g 14G |
136 |
|
137 |
local build_size=550 |
138 |
use clang && build_size=1200 |
139 |
|
140 |
if use debug; then |
141 |
ewarn "USE=debug is known to increase the size of package considerably" |
142 |
ewarn "and cause the tests to fail." |
143 |
ewarn |
144 |
|
145 |
(( build_size *= 14 )) |
146 |
elif is-flagq -g || is-flagq -ggdb; then |
147 |
ewarn "The C++ compiler -g option is known to increase the size of the package" |
148 |
ewarn "considerably. If you run out of space, please consider removing it." |
149 |
ewarn |
150 |
|
151 |
(( build_size *= 10 )) |
152 |
fi |
153 |
|
154 |
# Multiply by number of ABIs :). |
155 |
local abis=( $(multilib_get_enabled_abis) ) |
156 |
(( build_size *= ${#abis[@]} )) |
157 |
|
158 |
local CHECKREQS_DISK_BUILD=${build_size}M |
159 |
check-reqs_pkg_pretend |
160 |
|
161 |
if [[ ${MERGE_TYPE} != binary ]]; then |
162 |
echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
163 |
ebegin "Trying to build a C++11 test program" |
164 |
if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
165 |
eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
166 |
eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
167 |
eerror "to gcc-4.7 or an equivalent version supporting C++11." |
168 |
die "Currently active compiler does not support -std=c++11" |
169 |
fi |
170 |
eend ${?} |
171 |
fi |
172 |
} |
173 |
|
174 |
pkg_setup() { |
175 |
pkg_pretend |
176 |
} |
177 |
|
178 |
src_unpack() { |
179 |
default |
180 |
|
181 |
rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
182 |
|| die "symlinks removal failed" |
183 |
|
184 |
if use clang; then |
185 |
mv "${WORKDIR}"/cfe-${PV/_}.src "${S}"/tools/clang \ |
186 |
|| die "clang source directory move failed" |
187 |
mv "${WORKDIR}"/compiler-rt-${PV/_}.src "${S}"/projects/compiler-rt \ |
188 |
|| die "compiler-rt source directory move failed" |
189 |
mv "${WORKDIR}"/clang-tools-extra-${PV/_}.src "${S}"/tools/clang/tools/extra \ |
190 |
|| die "clang-tools-extra source directory move failed" |
191 |
fi |
192 |
} |
193 |
|
194 |
src_prepare() { |
195 |
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
196 |
epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
197 |
epatch "${FILESDIR}"/${PN}-3.6-gentoo-install.patch |
198 |
# Make ocaml warnings non-fatal, bug #537308 |
199 |
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
200 |
|
201 |
if use clang; then |
202 |
# Automatically select active system GCC's libraries, bugs #406163 and #417913 |
203 |
epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
204 |
|
205 |
epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
206 |
epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
207 |
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
208 |
fi |
209 |
|
210 |
if use prefix && use clang; then |
211 |
sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
212 |
projects/compiler-rt/make/platform/clang_*.mk || die |
213 |
fi |
214 |
|
215 |
local sub_files=( |
216 |
Makefile.config.in |
217 |
Makefile.rules |
218 |
tools/llvm-config/llvm-config.cpp |
219 |
) |
220 |
use clang && sub_files+=( |
221 |
tools/clang/lib/Driver/Tools.cpp |
222 |
tools/clang/tools/scan-build/scan-build |
223 |
) |
224 |
|
225 |
# unfortunately ./configure won't listen to --mandir and the-like, so take |
226 |
# care of this. |
227 |
# note: we're setting the main libdir intentionally. |
228 |
# where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
229 |
einfo "Fixing install dirs" |
230 |
sed -e "s,@libdir@,$(get_libdir),g" \ |
231 |
-e "s,@PF@,${PF},g" \ |
232 |
-e "s,@EPREFIX@,${EPREFIX},g" \ |
233 |
-i "${sub_files[@]}" \ |
234 |
|| die "install paths sed failed" |
235 |
|
236 |
if use clang; then |
237 |
# constantly fails for a long time, likely due to our patches |
238 |
rm tools/clang/test/Driver/cross-linux.c || die |
239 |
fi |
240 |
|
241 |
# User patches |
242 |
epatch_user |
243 |
|
244 |
python_setup |
245 |
} |
246 |
|
247 |
multilib_src_configure() { |
248 |
# disable timestamps since they confuse ccache |
249 |
local conf_flags=( |
250 |
--disable-timestamps |
251 |
--enable-keep-symbols |
252 |
--enable-shared |
253 |
--with-optimize-option= |
254 |
$(tc-is-static-only && echo --disable-shared) |
255 |
$(use_enable !debug optimized) |
256 |
$(use_enable debug assertions) |
257 |
$(use_enable debug expensive-checks) |
258 |
$(use_enable libedit) |
259 |
$(use_enable ncurses terminfo) |
260 |
$(use_enable libffi) |
261 |
) |
262 |
|
263 |
# well, it's used only by clang executable c-index-test |
264 |
if multilib_is_native_abi && use clang && use xml; then |
265 |
conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
266 |
else |
267 |
conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
268 |
fi |
269 |
|
270 |
local targets bindings |
271 |
if use multitarget; then |
272 |
targets='all' |
273 |
else |
274 |
targets='host,cpp' |
275 |
use video_cards_radeon && targets+=',r600' |
276 |
fi |
277 |
conf_flags+=( --enable-targets=${targets} ) |
278 |
|
279 |
if multilib_is_native_abi; then |
280 |
use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
281 |
# extra commas don't hurt |
282 |
use ocaml && bindings+=',ocaml' |
283 |
fi |
284 |
|
285 |
[[ ${bindings} ]] || bindings='none' |
286 |
conf_flags+=( --enable-bindings=${bindings} ) |
287 |
|
288 |
if use libffi; then |
289 |
local CPPFLAGS=${CPPFLAGS} |
290 |
append-cppflags "$(pkg-config --cflags libffi)" |
291 |
fi |
292 |
|
293 |
# llvm prefers clang over gcc, so we may need to force that |
294 |
tc-export CC CXX |
295 |
|
296 |
ECONF_SOURCE=${S} \ |
297 |
econf "${conf_flags[@]}" |
298 |
} |
299 |
|
300 |
set_makeargs() { |
301 |
MAKEARGS=( |
302 |
VERBOSE=1 |
303 |
REQUIRES_RTTI=1 |
304 |
GENTOO_LIBDIR=$(get_libdir) |
305 |
) |
306 |
|
307 |
# for tests, we want it all! otherwise, we may use a little filtering... |
308 |
# adding ONLY_TOOLS also disables unittest building... |
309 |
if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
310 |
local tools=( llvm-config ) |
311 |
use clang && tools+=( clang ) |
312 |
|
313 |
if multilib_is_native_abi; then |
314 |
tools+=( |
315 |
opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
316 |
llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
317 |
llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
318 |
llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
319 |
llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
320 |
) |
321 |
|
322 |
# the build system runs explicitly specified tools in parallel, |
323 |
# so we need to split it into two runs |
324 |
if [[ ${1} != -1 ]]; then |
325 |
# those require lto |
326 |
tools+=( llvm-lto ) |
327 |
use gold && tools+=( gold ) |
328 |
|
329 |
# those require clang :) |
330 |
# we need to explicitly specify all its tools |
331 |
# since we're passing BUILD_CLANG_ONLY |
332 |
use clang && tools+=( |
333 |
clang/tools/{clang-check,clang-format,extra} |
334 |
) |
335 |
fi |
336 |
fi |
337 |
|
338 |
MAKEARGS+=( |
339 |
# filter tools + disable unittests implicitly |
340 |
ONLY_TOOLS="${tools[*]}" |
341 |
|
342 |
# this disables unittests & docs from clang |
343 |
BUILD_CLANG_ONLY=YES |
344 |
) |
345 |
fi |
346 |
} |
347 |
|
348 |
multilib_src_compile() { |
349 |
local MAKEARGS |
350 |
set_makeargs -1 |
351 |
emake "${MAKEARGS[@]}" |
352 |
|
353 |
if multilib_is_native_abi; then |
354 |
set_makeargs |
355 |
emake -C tools "${MAKEARGS[@]}" |
356 |
|
357 |
if use doc; then |
358 |
emake -C "${S}"/docs -f Makefile.sphinx man |
359 |
use clang && emake -C "${S}"/tools/clang/docs/tools \ |
360 |
BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
361 |
emake -C "${S}"/docs -f Makefile.sphinx html |
362 |
fi |
363 |
fi |
364 |
|
365 |
if use debug; then |
366 |
pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
367 |
pax-mark m Debug+Asserts+Checks/bin/lli |
368 |
pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
369 |
else |
370 |
pax-mark m Release/bin/llvm-rtdyld |
371 |
pax-mark m Release/bin/lli |
372 |
pax-mark m Release/bin/lli-child-target |
373 |
fi |
374 |
} |
375 |
|
376 |
multilib_src_test() { |
377 |
local MAKEARGS |
378 |
set_makeargs |
379 |
|
380 |
# build the remaining tools & unittests |
381 |
emake "${MAKEARGS[@]}" |
382 |
|
383 |
pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
384 |
pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
385 |
pax-mark m unittests/Support/Release/SupportTests |
386 |
|
387 |
# respect TMPDIR! |
388 |
local -x LIT_PRESERVES_TMP=1 |
389 |
emake "${MAKEARGS[@]}" check |
390 |
use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
391 |
} |
392 |
|
393 |
src_install() { |
394 |
local MULTILIB_CHOST_TOOLS=( |
395 |
/usr/bin/llvm-config |
396 |
) |
397 |
|
398 |
local MULTILIB_WRAPPED_HEADERS=( |
399 |
/usr/include/llvm/Config/config.h |
400 |
/usr/include/llvm/Config/llvm-config.h |
401 |
) |
402 |
|
403 |
if use clang; then |
404 |
# note: magic applied below |
405 |
MULTILIB_CHOST_TOOLS+=( |
406 |
/usr/bin/clang |
407 |
/usr/bin/clang++ |
408 |
/usr/bin/clang-${PV} |
409 |
/usr/bin/clang++-${PV} |
410 |
) |
411 |
|
412 |
MULTILIB_WRAPPED_HEADERS+=( |
413 |
/usr/include/clang/Config/config.h |
414 |
) |
415 |
fi |
416 |
|
417 |
multilib-minimal_src_install |
418 |
|
419 |
# Remove unnecessary headers on FreeBSD, bug #417171 |
420 |
use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
421 |
} |
422 |
|
423 |
multilib_src_install() { |
424 |
local MAKEARGS |
425 |
set_makeargs |
426 |
|
427 |
local root=${D}/_${ABI} |
428 |
|
429 |
emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
430 |
multibuild_merge_root "${root}" "${D}" |
431 |
|
432 |
if ! multilib_is_native_abi; then |
433 |
# Backwards compat, will be happily removed someday. |
434 |
dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
435 |
else |
436 |
# Install docs. |
437 |
if use doc; then |
438 |
doman "${S}"/docs/_build/man/*.1 |
439 |
use clang && doman "${T}"/clang.1 |
440 |
dohtml -r "${S}"/docs/_build/html/ |
441 |
else |
442 |
if ! use clang; then |
443 |
rm "${WORKDIR}"/${P}-manpages/clang.1 || die |
444 |
fi |
445 |
doman "${WORKDIR}"/${P}-manpages/*.1 |
446 |
fi |
447 |
|
448 |
# Symlink the gold plugin. |
449 |
if use gold; then |
450 |
dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
451 |
dosym ../../../../$(get_libdir)/LLVMgold.so \ |
452 |
/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
453 |
fi |
454 |
fi |
455 |
|
456 |
# apply CHOST and PV to clang executables |
457 |
# they're statically linked so we don't have to worry about the lib |
458 |
if use clang; then |
459 |
local clang_tools=( clang clang++ ) |
460 |
local i |
461 |
|
462 |
# append ${PV} and symlink back |
463 |
# TODO: use alternatives.eclass? does that make any sense? |
464 |
# maybe with USE=-clang on :0 and USE=clang on older |
465 |
for i in "${clang_tools[@]}"; do |
466 |
mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
467 |
dosym "${i}"-${PV} /usr/bin/${i} |
468 |
done |
469 |
|
470 |
# now prepend ${CHOST} and let the multilib-build.eclass symlink it |
471 |
if ! multilib_is_native_abi; then |
472 |
# non-native? let's replace it with a simple wrapper |
473 |
for i in "${clang_tools[@]}"; do |
474 |
rm "${ED%/}/usr/bin/${i}-${PV}" || die |
475 |
cat > "${T}"/wrapper.tmp <<-_EOF_ |
476 |
#!${EPREFIX}/bin/sh |
477 |
exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
478 |
_EOF_ |
479 |
newbin "${T}"/wrapper.tmp "${i}-${PV}" |
480 |
done |
481 |
fi |
482 |
fi |
483 |
|
484 |
# Fix install_names on Darwin. The build system is too complicated |
485 |
# to just fix this, so we correct it post-install |
486 |
local lib= f= odylib= ndylib= libpv=${PV} |
487 |
if [[ ${CHOST} == *-darwin* ]] ; then |
488 |
eval $(grep PACKAGE_VERSION= configure) |
489 |
[[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
490 |
libpvminor=${libpv%.[0-9]*} |
491 |
for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_{osx,iossim}_dynamic.dylib; do |
492 |
# libEnhancedDisassembly is Darwin10 only, so non-fatal |
493 |
# + omit clang libs if not enabled |
494 |
[[ -f ${ED}/usr/lib/${lib} ]] || continue |
495 |
|
496 |
ebegin "fixing install_name of $lib" |
497 |
install_name_tool \ |
498 |
-id "${EPREFIX}"/usr/lib/${lib} \ |
499 |
"${ED}"/usr/lib/${lib} |
500 |
eend $? |
501 |
done |
502 |
for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
503 |
# omit clang libs if not enabled |
504 |
[[ -f "${f}" ]] || continue |
505 |
|
506 |
scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
507 |
while read odylib ; do |
508 |
ndylib= |
509 |
case ${odylib} in |
510 |
*/libclang.dylib) |
511 |
ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
512 |
;; |
513 |
*/libLLVM-${libpv}.dylib) |
514 |
ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
515 |
;; |
516 |
*/libLLVM-${libpvminor}.dylib) |
517 |
ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpvminor}.dylib |
518 |
;; |
519 |
*/libLTO.dylib) |
520 |
ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
521 |
;; |
522 |
esac |
523 |
if [[ -n ${ndylib} ]] ; then |
524 |
ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
525 |
install_name_tool \ |
526 |
-change "${odylib}" "${ndylib}" \ |
527 |
"${f}" |
528 |
eend $? |
529 |
fi |
530 |
done |
531 |
done |
532 |
fi |
533 |
} |
534 |
|
535 |
multilib_src_install_all() { |
536 |
insinto /usr/share/vim/vimfiles/syntax |
537 |
doins utils/vim/*.vim |
538 |
|
539 |
if use clang; then |
540 |
cd tools/clang || die |
541 |
|
542 |
if use static-analyzer ; then |
543 |
dobin tools/scan-build/ccc-analyzer |
544 |
dosym ccc-analyzer /usr/bin/c++-analyzer |
545 |
dobin tools/scan-build/scan-build |
546 |
|
547 |
insinto /usr/share/${PN} |
548 |
doins tools/scan-build/scanview.css |
549 |
doins tools/scan-build/sorttable.js |
550 |
fi |
551 |
|
552 |
python_inst() { |
553 |
if use static-analyzer ; then |
554 |
pushd tools/scan-view >/dev/null || die |
555 |
|
556 |
python_doscript scan-view |
557 |
|
558 |
touch __init__.py || die |
559 |
python_moduleinto clang |
560 |
python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
561 |
|
562 |
popd >/dev/null || die |
563 |
fi |
564 |
|
565 |
if use python ; then |
566 |
pushd bindings/python/clang >/dev/null || die |
567 |
|
568 |
python_moduleinto clang |
569 |
python_domodule __init__.py cindex.py enumerations.py |
570 |
|
571 |
popd >/dev/null || die |
572 |
fi |
573 |
|
574 |
# AddressSanitizer symbolizer (currently separate) |
575 |
python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
576 |
} |
577 |
python_foreach_impl python_inst |
578 |
fi |
579 |
} |