1 |
mgorny 13/07/31 22:47:06 |
2 |
|
3 |
Modified: llvm-9999.ebuild ChangeLog |
4 |
Removed: llvm-9999-r1.ebuild |
5 |
Log: |
6 |
Merge llvm-9999-r1 into llvm-9999 since it was unmasked. |
7 |
|
8 |
(Portage version: 2.2.0_alpha191/cvs/Linux x86_64, signed Manifest commit with key 9627F456F9DA7643!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.46 sys-devel/llvm/llvm-9999.ebuild |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?rev=1.46&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?rev=1.46&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?r1=1.45&r2=1.46 |
16 |
|
17 |
Index: llvm-9999.ebuild |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v |
20 |
retrieving revision 1.45 |
21 |
retrieving revision 1.46 |
22 |
diff -u -r1.45 -r1.46 |
23 |
--- llvm-9999.ebuild 28 Jul 2013 15:59:24 -0000 1.45 |
24 |
+++ llvm-9999.ebuild 31 Jul 2013 22:47:06 -0000 1.46 |
25 |
@@ -1,14 +1,13 @@ |
26 |
# Copyright 1999-2013 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.45 2013/07/28 15:59:24 aballier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.46 2013/07/31 22:47:06 mgorny Exp $ |
30 |
|
31 |
EAPI=5 |
32 |
|
33 |
-# pypy gives me around 1700 unresolved tests due to open file limit |
34 |
-# being exceeded. probably GC does not close them fast enough. |
35 |
-PYTHON_COMPAT=( python{2_5,2_6,2_7} ) |
36 |
+PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} ) |
37 |
|
38 |
-inherit subversion eutils flag-o-matic multilib python-any-r1 toolchain-funcs pax-utils |
39 |
+inherit subversion eutils flag-o-matic multilib multilib-minimal \ |
40 |
+ python-r1 toolchain-funcs pax-utils |
41 |
|
42 |
DESCRIPTION="Low Level Virtual Machine" |
43 |
HOMEPAGE="http://llvm.org/" |
44 |
@@ -18,9 +17,11 @@ |
45 |
LICENSE="UoI-NCSA" |
46 |
SLOT="0" |
47 |
KEYWORDS="" |
48 |
-IUSE="debug doc gold +libffi multitarget ocaml test udis86 vim-syntax video_cards_radeon" |
49 |
+IUSE="clang debug doc gold +libffi multitarget ocaml python |
50 |
+ +static-analyzer test udis86 video_cards_radeon" |
51 |
|
52 |
-DEPEND="dev-lang/perl |
53 |
+DEPEND="app-admin/chrpath |
54 |
+ dev-lang/perl |
55 |
dev-python/sphinx |
56 |
>=sys-devel/make-3.79 |
57 |
>=sys-devel/flex-2.5.4 |
58 |
@@ -32,18 +33,30 @@ |
59 |
sys-libs/zlib |
60 |
gold? ( >=sys-devel/binutils-2.22[cxx] ) |
61 |
libffi? ( virtual/pkgconfig |
62 |
- virtual/libffi ) |
63 |
+ virtual/libffi[${MULTILIB_USEDEP}] ) |
64 |
ocaml? ( dev-lang/ocaml ) |
65 |
- udis86? ( dev-libs/udis86[pic(+)] ) |
66 |
+ udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] ) |
67 |
${PYTHON_DEPS}" |
68 |
RDEPEND="dev-lang/perl |
69 |
- libffi? ( virtual/libffi ) |
70 |
- vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
71 |
+ libffi? ( virtual/libffi[${MULTILIB_USEDEP}] ) |
72 |
+ clang? ( |
73 |
+ python? ( ${PYTHON_DEPS} ) |
74 |
+ static-analyzer? ( |
75 |
+ dev-lang/perl |
76 |
+ ${PYTHON_DEPS} |
77 |
+ ) |
78 |
+ ) |
79 |
+ udis86? ( dev-libs/udis86[pic(+),${MULTILIB_USEDEP}] ) |
80 |
+ clang? ( !<=sys-devel/clang-9999-r99 ) |
81 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
82 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
83 |
|
84 |
-pkg_setup() { |
85 |
- # Required for test and build |
86 |
- python-any-r1_pkg_setup |
87 |
+# pypy gives me around 1700 unresolved tests due to open file limit |
88 |
+# being exceeded. probably GC does not close them fast enough. |
89 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
90 |
+ test? ( || ( $(python_gen_useflags 'python*') ) )" |
91 |
|
92 |
+pkg_setup() { |
93 |
# need to check if the active compiler is ok |
94 |
|
95 |
broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 " |
96 |
@@ -77,43 +90,65 @@ |
97 |
fi |
98 |
} |
99 |
|
100 |
+src_unpack() { |
101 |
+ if use clang; then |
102 |
+ ESVN_PROJECT=compiler-rt S="${S}"/projects/compiler-rt subversion_fetch "http://llvm.org/svn/llvm-project/compiler-rt/trunk" |
103 |
+ |
104 |
+ # Force version match between LLVM, compiler-rt & clang |
105 |
+ # but first work-around subversion.eclass smartness, bug #282486. |
106 |
+ ESVN_PROJECT=compiler-rt subversion_wc_info "http://llvm.org/svn/llvm-project/compiler-rt/trunk" |
107 |
+ local ESVN_REVISION=${ESVN_WC_REVISION} |
108 |
+ |
109 |
+ ESVN_PROJECT=clang S="${S}"/tools/clang subversion_fetch "http://llvm.org/svn/llvm-project/cfe/trunk" |
110 |
+ fi |
111 |
+ |
112 |
+ # Do llvm last so that ESVN_WC_* is top-level. |
113 |
+ subversion_src_unpack |
114 |
+} |
115 |
+ |
116 |
src_prepare() { |
117 |
+ epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
118 |
+ epatch "${FILESDIR}"/${PN}-3.4-gentoo-install.patch |
119 |
+ use clang && epatch "${FILESDIR}"/clang-3.3-gentoo-install.patch |
120 |
+ |
121 |
+ local sub_files=( |
122 |
+ Makefile.config.in |
123 |
+ Makefile.rules |
124 |
+ tools/llvm-config/llvm-config.cpp |
125 |
+ ) |
126 |
+ use clang && sub_files+=( |
127 |
+ tools/clang/lib/Driver/Tools.cpp |
128 |
+ tools/clang/tools/scan-build/scan-build |
129 |
+ ) |
130 |
+ |
131 |
# unfortunately ./configure won't listen to --mandir and the-like, so take |
132 |
# care of this. |
133 |
+ # note: we're setting the main libdir intentionally. |
134 |
+ # where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
135 |
einfo "Fixing install dirs" |
136 |
- sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
137 |
- -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
138 |
- -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \ |
139 |
- -i Makefile.config.in || die "Makefile.config sed failed" |
140 |
- sed -e "/ActiveLibDir = ActivePrefix/s/lib/$(get_libdir)\/${PN}/" \ |
141 |
- -i tools/llvm-config/llvm-config.cpp || die "llvm-config sed failed" |
142 |
- |
143 |
- einfo "Fixing rpath and CFLAGS" |
144 |
- sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
145 |
- -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ |
146 |
- -i Makefile.rules || die "rpath sed failed" |
147 |
- if use gold; then |
148 |
- sed -e 's,\$(SharedLibDir),'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
149 |
- -i tools/gold/Makefile || die "gold rpath sed failed" |
150 |
- fi |
151 |
- |
152 |
- # FileCheck is needed at least for dragonegg tests |
153 |
- sed -e "/NO_INSTALL = 1/s/^/#/" -i utils/FileCheck/Makefile \ |
154 |
- || die "FileCheck Makefile sed failed" |
155 |
- |
156 |
- epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
157 |
+ sed -e "s,@libdir@,$(get_libdir),g" \ |
158 |
+ -e "s,@PF@,${PF},g" \ |
159 |
+ -e "s,@EPREFIX@,${EPREFIX},g" \ |
160 |
+ -i "${sub_files[@]}" \ |
161 |
+ || die "install paths sed failed" |
162 |
|
163 |
# User patches |
164 |
epatch_user |
165 |
} |
166 |
|
167 |
-src_configure() { |
168 |
- local CONF_FLAGS="--enable-shared |
169 |
+multilib_src_configure() { |
170 |
+ local CONF_FLAGS="--enable-keep-symbols |
171 |
+ --enable-shared |
172 |
--with-optimize-option= |
173 |
$(use_enable !debug optimized) |
174 |
$(use_enable debug assertions) |
175 |
$(use_enable debug expensive-checks)" |
176 |
|
177 |
+ if use clang; then |
178 |
+ CONF_FLAGS+=" |
179 |
+ --with-clang-resource-dir=../lib/clang/3.4" |
180 |
+ fi |
181 |
+ |
182 |
if use multitarget; then |
183 |
CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
184 |
else |
185 |
@@ -123,14 +158,14 @@ |
186 |
fi |
187 |
fi |
188 |
|
189 |
- if use amd64; then |
190 |
+ if [[ ${ABI} == amd64 ]]; then |
191 |
CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
192 |
fi |
193 |
|
194 |
- if use gold; then |
195 |
+ if multilib_is_native_abi && use gold; then |
196 |
CONF_FLAGS="${CONF_FLAGS} --with-binutils-include=${EPREFIX}/usr/include/" |
197 |
fi |
198 |
- if use ocaml; then |
199 |
+ if multilib_is_native_abi && use ocaml; then |
200 |
CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml" |
201 |
else |
202 |
CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none" |
203 |
@@ -145,20 +180,29 @@ |
204 |
fi |
205 |
CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)" |
206 |
|
207 |
+ # build with a suitable Python version |
208 |
+ python_export_best |
209 |
+ |
210 |
# llvm prefers clang over gcc, so we may need to force that |
211 |
tc-export CC CXX |
212 |
+ |
213 |
+ ECONF_SOURCE=${S} \ |
214 |
econf ${CONF_FLAGS} |
215 |
} |
216 |
|
217 |
-src_compile() { |
218 |
- emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 |
219 |
+multilib_src_compile() { |
220 |
+ emake VERBOSE=1 REQUIRES_RTTI=1 GENTOO_LIBDIR=$(get_libdir) |
221 |
|
222 |
- emake -C docs -f Makefile.sphinx man |
223 |
- use doc && emake -C docs -f Makefile.sphinx html |
224 |
+ if multilib_is_native_abi; then |
225 |
+ emake -C "${S}"/docs -f Makefile.sphinx man |
226 |
+ use doc && emake -C "${S}"/docs -f Makefile.sphinx html |
227 |
+ fi |
228 |
|
229 |
if use debug; then |
230 |
+ pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
231 |
pax-mark m Debug+Asserts+Checks/bin/lli |
232 |
else |
233 |
+ pax-mark m Release/bin/llvm-rtdyld |
234 |
pax-mark m Release/bin/lli |
235 |
fi |
236 |
if use test; then |
237 |
@@ -168,15 +212,44 @@ |
238 |
fi |
239 |
} |
240 |
|
241 |
+multilib_src_test() { |
242 |
+ default |
243 |
+ |
244 |
+ use clang && emake -C tools/clang test |
245 |
+} |
246 |
+ |
247 |
src_install() { |
248 |
- emake KEEP_SYMBOLS=1 DESTDIR="${D}" install |
249 |
+ local MULTILIB_WRAPPED_HEADERS=( |
250 |
+ /usr/include/llvm/Config/config.h |
251 |
+ /usr/include/llvm/Config/llvm-config.h |
252 |
+ ) |
253 |
|
254 |
- doman docs/_build/man/*.1 |
255 |
- use doc && dohtml -r docs/_build/html/ |
256 |
+ use clang && MULTILIB_WRAPPED_HEADERS+=( |
257 |
+ /usr/include/clang/Config/config.h |
258 |
+ ) |
259 |
|
260 |
- if use vim-syntax; then |
261 |
- insinto /usr/share/vim/vimfiles/syntax |
262 |
- doins utils/vim/*.vim |
263 |
+ multilib-minimal_src_install |
264 |
+} |
265 |
+ |
266 |
+multilib_src_install() { |
267 |
+ emake DESTDIR="${D}" GENTOO_LIBDIR=$(get_libdir) install |
268 |
+ |
269 |
+ # Fix rpaths. |
270 |
+ chrpath -r "${EPREFIX}"/usr/$(get_libdir)/llvm \ |
271 |
+ "${ED}"/usr/bin/* || die |
272 |
+ |
273 |
+ if multilib_is_native_abi; then |
274 |
+ # Move files back. |
275 |
+ if path_exists -o "${ED}"/tmp/llvm-config.*; then |
276 |
+ mv "${ED}"/tmp/llvm-config.* "${ED}"/usr/bin || die |
277 |
+ fi |
278 |
+ else |
279 |
+ # Preserve ABI-variant of llvm-config, |
280 |
+ # then drop all the executables since LLVM doesn't like to |
281 |
+ # clobber when installing. |
282 |
+ mkdir -p "${ED}"/tmp || die |
283 |
+ mv "${ED}"/usr/bin/llvm-config "${ED}"/tmp/llvm-config.${ABI} || die |
284 |
+ rm -r "${ED}"/usr/bin || die |
285 |
fi |
286 |
|
287 |
# Fix install_names on Darwin. The build system is too complicated |
288 |
@@ -185,23 +258,81 @@ |
289 |
if [[ ${CHOST} == *-darwin* ]] ; then |
290 |
eval $(grep PACKAGE_VERSION= configure) |
291 |
[[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
292 |
- for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do |
293 |
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib {BugpointPasses,LLVMHello}.dylib ; do |
294 |
# libEnhancedDisassembly is Darwin10 only, so non-fatal |
295 |
+ # + omit clang libs if not enabled |
296 |
[[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
297 |
+ |
298 |
ebegin "fixing install_name of $lib" |
299 |
install_name_tool \ |
300 |
-id "${EPREFIX}"/usr/lib/${PN}/${lib} \ |
301 |
"${ED}"/usr/lib/${PN}/${lib} |
302 |
eend $? |
303 |
done |
304 |
- for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do |
305 |
+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/lib{LTO,clang}.dylib ; do |
306 |
+ # omit clang libs if not enabled |
307 |
+ [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
308 |
+ |
309 |
odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib) |
310 |
ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
311 |
install_name_tool \ |
312 |
-change "${odylib}" \ |
313 |
"${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \ |
314 |
+ -change "@rpath/libclang.dylib" \ |
315 |
+ "${EPREFIX}"/usr/lib/llvm/libclang.dylib \ |
316 |
+ -change "${S}"/Release/lib/libclang.dylib \ |
317 |
+ "${EPREFIX}"/usr/lib/llvm/libclang.dylib \ |
318 |
"${f}" |
319 |
eend $? |
320 |
done |
321 |
fi |
322 |
} |
323 |
+ |
324 |
+multilib_src_install_all() { |
325 |
+ doman docs/_build/man/*.1 |
326 |
+ use doc && dohtml -r docs/_build/html/ |
327 |
+ |
328 |
+ insinto /usr/share/vim/vimfiles/syntax |
329 |
+ doins utils/vim/*.vim |
330 |
+ |
331 |
+ if use clang; then |
332 |
+ cd tools/clang || die |
333 |
+ |
334 |
+ if use static-analyzer ; then |
335 |
+ dobin tools/scan-build/ccc-analyzer |
336 |
+ dosym ccc-analyzer /usr/bin/c++-analyzer |
337 |
+ dobin tools/scan-build/scan-build |
338 |
+ |
339 |
+ insinto /usr/share/${PN} |
340 |
+ doins tools/scan-build/scanview.css |
341 |
+ doins tools/scan-build/sorttable.js |
342 |
+ fi |
343 |
+ |
344 |
+ python_inst() { |
345 |
+ if use static-analyzer ; then |
346 |
+ pushd tools/scan-view >/dev/null || die |
347 |
+ |
348 |
+ python_doscript scan-view |
349 |
+ |
350 |
+ touch __init__.py || die |
351 |
+ python_moduleinto clang |
352 |
+ python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
353 |
+ |
354 |
+ popd >/dev/null || die |
355 |
+ fi |
356 |
+ |
357 |
+ if use python ; then |
358 |
+ pushd bindings/python/clang >/dev/null || die |
359 |
+ |
360 |
+ python_moduleinto clang |
361 |
+ python_domodule __init__.py cindex.py enumerations.py |
362 |
+ |
363 |
+ popd >/dev/null || die |
364 |
+ fi |
365 |
+ |
366 |
+ # AddressSanitizer symbolizer (currently separate) |
367 |
+ python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
368 |
+ } |
369 |
+ python_foreach_impl python_inst |
370 |
+ fi |
371 |
+} |
372 |
|
373 |
|
374 |
|
375 |
1.127 sys-devel/llvm/ChangeLog |
376 |
|
377 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.127&view=markup |
378 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.127&content-type=text/plain |
379 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?r1=1.126&r2=1.127 |
380 |
|
381 |
Index: ChangeLog |
382 |
=================================================================== |
383 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v |
384 |
retrieving revision 1.126 |
385 |
retrieving revision 1.127 |
386 |
diff -u -r1.126 -r1.127 |
387 |
--- ChangeLog 31 Jul 2013 22:08:14 -0000 1.126 |
388 |
+++ ChangeLog 31 Jul 2013 22:47:06 -0000 1.127 |
389 |
@@ -1,6 +1,10 @@ |
390 |
# ChangeLog for sys-devel/llvm |
391 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
392 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.126 2013/07/31 22:08:14 mgorny Exp $ |
393 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.127 2013/07/31 22:47:06 mgorny Exp $ |
394 |
+ |
395 |
+ 31 Jul 2013; Michał Górny <mgorny@g.o> -llvm-9999-r1.ebuild, |
396 |
+ llvm-9999.ebuild: |
397 |
+ Merge llvm-9999-r1 into llvm-9999 since it was unmasked. |
398 |
|
399 |
31 Jul 2013; Michał Górny <mgorny@g.o> llvm-3.3-r1.ebuild: |
400 |
Call doc-build for html & man separate due to parallel make issues, bug |