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