1 |
voyageur 10/10/08 13:52:47 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: llvm-2.8-r1.ebuild |
5 |
Removed: llvm-2.8.ebuild |
6 |
Log: |
7 |
SRC_URI arrow workaround to fetch updated tarball with correct package version, thanks Alexey Charkov <alchark@×××××.com> in bug #340106 for spotting it |
8 |
|
9 |
(Portage version: 2.2_rc89/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.25 sys-devel/llvm/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.25&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.25&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?r1=1.24&r2=1.25 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v |
21 |
retrieving revision 1.24 |
22 |
retrieving revision 1.25 |
23 |
diff -u -r1.24 -r1.25 |
24 |
--- ChangeLog 6 Oct 2010 09:21:26 -0000 1.24 |
25 |
+++ ChangeLog 8 Oct 2010 13:52:47 -0000 1.25 |
26 |
@@ -1,6 +1,14 @@ |
27 |
# ChangeLog for sys-devel/llvm |
28 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.24 2010/10/06 09:21:26 voyageur Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.25 2010/10/08 13:52:47 voyageur Exp $ |
31 |
+ |
32 |
+*llvm-2.8-r1 (08 Oct 2010) |
33 |
+ |
34 |
+ 08 Oct 2010; Bernard Cafarelli <voyageur@g.o> -llvm-2.8.ebuild, |
35 |
+ +llvm-2.8-r1.ebuild: |
36 |
+ SRC_URI arrow workaround to fetch updated tarball with correct package |
37 |
+ version, thanks Alexey Charkov <alchark@×××××.com> in bug #340106 for |
38 |
+ spotting it |
39 |
|
40 |
06 Oct 2010; Bernard Cafarelli <voyageur@g.o> llvm-2.8.ebuild, |
41 |
llvm-9999.ebuild: |
42 |
|
43 |
|
44 |
|
45 |
1.1 sys-devel/llvm/llvm-2.8-r1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-2.8-r1.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-2.8-r1.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: llvm-2.8-r1.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2010 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-2.8-r1.ebuild,v 1.1 2010/10/08 13:52:47 voyageur Exp $ |
55 |
|
56 |
EAPI="3" |
57 |
inherit eutils multilib toolchain-funcs |
58 |
|
59 |
DESCRIPTION="Low Level Virtual Machine" |
60 |
HOMEPAGE="http://llvm.org/" |
61 |
# Upstream silently re-released the tarball... |
62 |
# drop the -> in 2.9 |
63 |
SRC_URI="http://llvm.org/releases/${PV}/${P}.tgz -> ${P}-r1.tgz" |
64 |
|
65 |
LICENSE="UoI-NCSA" |
66 |
SLOT="0" |
67 |
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~ppc-macos" |
68 |
IUSE="alltargets debug +libffi llvm-gcc ocaml test udis86" |
69 |
|
70 |
DEPEND="dev-lang/perl |
71 |
>=sys-devel/make-3.79 |
72 |
>=sys-devel/flex-2.5.4 |
73 |
>=sys-devel/bison-1.28 |
74 |
!~sys-devel/bison-1.85 |
75 |
!~sys-devel/bison-1.875 |
76 |
|| ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 ) |
77 |
|| ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
78 |
libffi? ( virtual/libffi ) |
79 |
ocaml? ( dev-lang/ocaml ) |
80 |
udis86? ( amd64? ( dev-libs/udis86[pic] ) |
81 |
!amd64? ( dev-libs/udis86 ) )" |
82 |
RDEPEND="dev-lang/perl" |
83 |
|
84 |
S=${WORKDIR}/${PN}-${PV/_pre*} |
85 |
|
86 |
pkg_setup() { |
87 |
# need to check if the active compiler is ok |
88 |
|
89 |
broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 " |
90 |
broken_gcc_x86=" 3.4.0 3.4.2 " |
91 |
broken_gcc_amd64=" 3.4.6 " |
92 |
|
93 |
gcc_vers=$(gcc-fullversion) |
94 |
|
95 |
if [[ ${broken_gcc} == *" ${version} "* ]] ; then |
96 |
elog "Your version of gcc is known to miscompile llvm." |
97 |
elog "Check http://www.llvm.org/docs/GettingStarted.html for" |
98 |
elog "possible solutions." |
99 |
die "Your currently active version of gcc is known to miscompile llvm" |
100 |
fi |
101 |
|
102 |
if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then |
103 |
elog "Your version of gcc is known to miscompile llvm on x86" |
104 |
elog "architectures. Check" |
105 |
elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
106 |
elog "solutions." |
107 |
die "Your currently active version of gcc is known to miscompile llvm" |
108 |
fi |
109 |
|
110 |
if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]]; |
111 |
then |
112 |
elog "Your version of gcc is known to miscompile llvm in amd64" |
113 |
elog "architectures. Check" |
114 |
elog "http://www.llvm.org/docs/GettingStarted.html for possible" |
115 |
elog "solutions." |
116 |
die "Your currently active version of gcc is known to miscompile llvm" |
117 |
fi |
118 |
} |
119 |
|
120 |
src_prepare() { |
121 |
# unfortunately ./configure won't listen to --mandir and the-like, so take |
122 |
# care of this. |
123 |
einfo "Fixing install dirs" |
124 |
sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
125 |
-e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
126 |
-e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/${PN}, \ |
127 |
-i Makefile.config.in || die "Makefile.config sed failed" |
128 |
sed -e 's,$ABS_RUN_DIR/lib,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
129 |
-i tools/llvm-config/llvm-config.in.in || die "llvm-config sed failed" |
130 |
|
131 |
einfo "Fixing rpath" |
132 |
sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ |
133 |
-i Makefile.rules || die "rpath sed failed" |
134 |
|
135 |
epatch "${FILESDIR}"/${PN}-2.7-nodoctargz.patch |
136 |
epatch "${FILESDIR}"/${PN}-2.6-commandguide-nops.patch |
137 |
} |
138 |
|
139 |
src_configure() { |
140 |
local CONF_FLAGS="--enable-shared" |
141 |
|
142 |
if use debug; then |
143 |
CONF_FLAGS="${CONF_FLAGS} --disable-optimized" |
144 |
einfo "Note: Compiling LLVM in debug mode will create huge and slow binaries" |
145 |
# ...and you probably shouldn't use tmpfs, unless it can hold 900MB |
146 |
else |
147 |
CONF_FLAGS="${CONF_FLAGS} \ |
148 |
--enable-optimized \ |
149 |
--disable-assertions \ |
150 |
--disable-expensive-checks" |
151 |
fi |
152 |
|
153 |
if use alltargets; then |
154 |
CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
155 |
else |
156 |
CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only" |
157 |
fi |
158 |
|
159 |
if use amd64; then |
160 |
CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
161 |
fi |
162 |
|
163 |
# things would be built differently depending on whether llvm-gcc is |
164 |
# used or not. |
165 |
local LLVM_GCC_DIR=/dev/null |
166 |
local LLVM_GCC_DRIVER=nope ; local LLVM_GPP_DRIVER=nope |
167 |
if use llvm-gcc ; then |
168 |
if has_version sys-devel/llvm-gcc; then |
169 |
LLVM_GCC_DIR=$(ls -d ${EROOT}/usr/$(get_libdir)/llvm-gcc* 2> /dev/null) |
170 |
LLVM_GCC_DRIVER=$(find ${LLVM_GCC_DIR} -name 'llvm*-gcc' 2> /dev/null) |
171 |
if [[ -z ${LLVM_GCC_DRIVER} ]] ; then |
172 |
die "failed to find installed llvm-gcc, LLVM_GCC_DIR=${LLVM_GCC_DIR}" |
173 |
fi |
174 |
einfo "Using $LLVM_GCC_DRIVER" |
175 |
LLVM_GPP_DRIVER=${LLVM_GCC_DRIVER/%-gcc/-g++} |
176 |
else |
177 |
eerror "llvm-gcc USE flag enabled, but sys-devel/llvm-gcc was not found" |
178 |
eerror "Building with standard gcc, re-merge this package after installing" |
179 |
eerror "llvm-gcc to build with it" |
180 |
eerror "This is normal behavior on first LLVM merge" |
181 |
fi |
182 |
fi |
183 |
|
184 |
CONF_FLAGS="${CONF_FLAGS} \ |
185 |
--with-llvmgccdir=${LLVM_GCC_DIR} \ |
186 |
--with-llvmgcc=${LLVM_GCC_DRIVER} \ |
187 |
--with-llvmgxx=${LLVM_GPP_DRIVER}" |
188 |
|
189 |
if use ocaml; then |
190 |
CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml" |
191 |
else |
192 |
CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none" |
193 |
fi |
194 |
|
195 |
if use udis86; then |
196 |
CONF_FLAGS="${CONF_FLAGS} --with-udis86" |
197 |
fi |
198 |
CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)" |
199 |
econf ${CONF_FLAGS} || die "econf failed" |
200 |
} |
201 |
|
202 |
src_compile() { |
203 |
emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 || die "emake failed" |
204 |
} |
205 |
|
206 |
src_install() { |
207 |
emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed" |
208 |
|
209 |
# Fix install_names on Darwin. The build system is too complicated |
210 |
# to just fix this, so we correct it post-install |
211 |
if [[ ${CHOST} == *-darwin* ]] ; then |
212 |
for lib in lib{EnhancedDisassembly,LLVM-${PN},LLVMHello,LTO,profile_rt}.dylib ; do |
213 |
# libEnhancedDisassembly is Darwin10 only |
214 |
[[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue |
215 |
install_name_tool -id "${EPREFIX}"/usr/lib/${PN}/${lib} \ |
216 |
"${ED}"/usr/lib/${PN}/${lib} |
217 |
done |
218 |
fi |
219 |
} |