1 |
voyageur 11/12/02 13:20:51 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: clang-3.0.ebuild |
5 |
Removed: clang-3.0_rc4.ebuild |
6 |
Log: |
7 |
Final release bump, remove rc |
8 |
|
9 |
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.49 sys-devel/clang/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/clang/ChangeLog?rev=1.49&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/clang/ChangeLog?rev=1.49&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/clang/ChangeLog?r1=1.48&r2=1.49 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v |
21 |
retrieving revision 1.48 |
22 |
retrieving revision 1.49 |
23 |
diff -u -r1.48 -r1.49 |
24 |
--- ChangeLog 28 Nov 2011 10:56:02 -0000 1.48 |
25 |
+++ ChangeLog 2 Dec 2011 13:20:51 -0000 1.49 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for sys-devel/clang |
28 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.48 2011/11/28 10:56:02 voyageur Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.49 2011/12/02 13:20:51 voyageur Exp $ |
31 |
+ |
32 |
+*clang-3.0 (02 Dec 2011) |
33 |
+ |
34 |
+ 02 Dec 2011; Bernard Cafarelli <voyageur@g.o> -clang-3.0_rc4.ebuild, |
35 |
+ +clang-3.0.ebuild: |
36 |
+ Final release bump, remove rc |
37 |
|
38 |
*clang-3.0_rc4 (28 Nov 2011) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-devel/clang/clang-3.0.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/clang/clang-3.0.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/clang/clang-3.0.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: clang-3.0.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2011 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-3.0.ebuild,v 1.1 2011/12/02 13:20:51 voyageur Exp $ |
53 |
|
54 |
EAPI=3 |
55 |
|
56 |
RESTRICT_PYTHON_ABIS="3.*" |
57 |
SUPPORT_PYTHON_ABIS="1" |
58 |
|
59 |
inherit eutils multilib python |
60 |
|
61 |
DESCRIPTION="C language family frontend for LLVM" |
62 |
HOMEPAGE="http://clang.llvm.org/" |
63 |
# Fetching LLVM as well: see http://llvm.org/bugs/show_bug.cgi?id=4840 |
64 |
SRC_URI="http://llvm.org/releases/${PV}/llvm-${PV}.tar.gz |
65 |
http://llvm.org/releases/${PV}/${P}.tar.gz" |
66 |
|
67 |
LICENSE="UoI-NCSA" |
68 |
SLOT="0" |
69 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
70 |
IUSE="debug multitarget +static-analyzer +system-cxx-headers test" |
71 |
|
72 |
DEPEND="static-analyzer? ( dev-lang/perl )" |
73 |
RDEPEND="~sys-devel/llvm-${PV}[multitarget=]" |
74 |
|
75 |
S=${WORKDIR}/llvm-${PV}.src |
76 |
|
77 |
src_prepare() { |
78 |
mv "${WORKDIR}"/clang-${PV}.src "${S}"/tools/clang || die "clang source directory move failed" |
79 |
|
80 |
# Same as llvm doc patches |
81 |
epatch "${FILESDIR}"/${PN}-2.7-fixdoc.patch |
82 |
|
83 |
# multilib-strict |
84 |
sed -e "/PROJ_headers/s#lib/clang#$(get_libdir)/clang#" \ |
85 |
-i tools/clang/lib/Headers/Makefile \ |
86 |
|| die "clang Makefile failed" |
87 |
# Fix cxx_include_root path for Gentoo |
88 |
epatch "${FILESDIR}"/${P/_*}-fix_cxx_include_root.patch |
89 |
# fix the static analyzer for in-tree install |
90 |
sed -e 's/import ScanView/from clang \0/' \ |
91 |
-i tools/clang/tools/scan-view/scan-view \ |
92 |
|| die "scan-view sed failed" |
93 |
sed -e "/scanview.css\|sorttable.js/s#\$RealBin#${EPREFIX}/usr/share/${PN}#" \ |
94 |
-i tools/clang/tools/scan-build/scan-build \ |
95 |
|| die "scan-build sed failed" |
96 |
# Specify python version |
97 |
python_convert_shebangs 2 tools/clang/tools/scan-view/scan-view |
98 |
|
99 |
# From llvm src_prepare |
100 |
einfo "Fixing install dirs" |
101 |
sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ |
102 |
-e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ |
103 |
-e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/llvm, \ |
104 |
-i Makefile.config.in || die "Makefile.config sed failed" |
105 |
|
106 |
einfo "Fixing rpath and CFLAGS" |
107 |
sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/llvm, \ |
108 |
-e '/OmitFramePointer/s/-fomit-frame-pointer//' \ |
109 |
-i Makefile.rules || die "rpath sed failed" |
110 |
} |
111 |
|
112 |
src_configure() { |
113 |
local CONF_FLAGS="--enable-shared |
114 |
--with-optimize-option= |
115 |
$(use_enable !debug optimized) |
116 |
$(use_enable debug assertions) |
117 |
$(use_enable debug expensive-checks)" |
118 |
|
119 |
# Setup the search path to include the Prefix includes |
120 |
if use prefix ; then |
121 |
CONF_FLAGS="${CONF_FLAGS} \ |
122 |
--with-c-include-dirs=${EPREFIX}/usr/include:/usr/include" |
123 |
fi |
124 |
|
125 |
if use multitarget; then |
126 |
CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" |
127 |
else |
128 |
CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only" |
129 |
fi |
130 |
|
131 |
if use amd64; then |
132 |
CONF_FLAGS="${CONF_FLAGS} --enable-pic" |
133 |
fi |
134 |
|
135 |
if use system-cxx-headers; then |
136 |
# Try to get current gcc headers path |
137 |
local CXX_PATH=$(gcc-config -L| cut -d: -f1) |
138 |
CONF_FLAGS="${CONF_FLAGS} --with-c-include-dirs=/usr/include:${CXX_PATH}/include" |
139 |
CONF_FLAGS="${CONF_FLAGS} --with-cxx-include-root=${CXX_PATH}/include/g++-v4" |
140 |
CONF_FLAGS="${CONF_FLAGS} --with-cxx-include-arch=$CHOST" |
141 |
if has_multilib_profile; then |
142 |
CONF_FLAGS="${CONF_FLAGS} --with-cxx-include-32bit-dir=32" |
143 |
fi |
144 |
fi |
145 |
|
146 |
econf ${CONF_FLAGS} || die "econf failed" |
147 |
} |
148 |
|
149 |
src_compile() { |
150 |
local COMPILE_TARGET |
151 |
if use test; then |
152 |
COMPILE_TARGET="all" |
153 |
else |
154 |
COMPILE_TARGET="clang-only" |
155 |
fi |
156 |
emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 \ |
157 |
${COMPILE_TARGET} || die "emake failed" |
158 |
} |
159 |
|
160 |
src_test() { |
161 |
cd "${S}"/test || die "cd failed" |
162 |
emake site.exp || die "updating llvm site.exp failed" |
163 |
|
164 |
cd "${S}"/tools/clang || die "cd clang failed" |
165 |
|
166 |
# Broken test always assuming i386 host with multilib gcc 4.6.0 |
167 |
# http://llvm.org/bugs/show_bug.cgi?id=11094 |
168 |
rm -f test/Driver/linux-ld.c |
169 |
|
170 |
echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
171 |
if ! emake -j1 VERBOSE=1 test; then |
172 |
has test $FEATURES && die "Make test failed. See above for details." |
173 |
has test $FEATURES || eerror "Make test failed. See above for details." |
174 |
fi |
175 |
} |
176 |
|
177 |
src_install() { |
178 |
cd "${S}"/tools/clang || die "cd clang failed" |
179 |
emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed" |
180 |
|
181 |
if use static-analyzer ; then |
182 |
dobin tools/scan-build/ccc-analyzer |
183 |
dosym ccc-analyzer /usr/bin/c++-analyzer |
184 |
dobin tools/scan-build/scan-build |
185 |
|
186 |
insinto /usr/share/${PN} |
187 |
doins tools/scan-build/scanview.css |
188 |
doins tools/scan-build/sorttable.js |
189 |
|
190 |
cd tools/scan-view || die "cd scan-view failed" |
191 |
dobin scan-view |
192 |
install-scan-view() { |
193 |
insinto "$(python_get_sitedir)"/clang |
194 |
doins Reporter.py Resources ScanView.py startfile.py |
195 |
touch "${ED}"/"$(python_get_sitedir)"/clang/__init__.py |
196 |
} |
197 |
python_execute_function install-scan-view |
198 |
fi |
199 |
|
200 |
# Fix install_names on Darwin. The build system is too complicated |
201 |
# to just fix this, so we correct it post-install |
202 |
if [[ ${CHOST} == *-darwin* ]] ; then |
203 |
for lib in libclang.dylib ; do |
204 |
ebegin "fixing install_name of $lib" |
205 |
install_name_tool -id "${EPREFIX}"/usr/lib/llvm/${lib} \ |
206 |
"${ED}"/usr/lib/llvm/${lib} |
207 |
eend $? |
208 |
done |
209 |
for f in usr/bin/{c-index-test,clang} usr/lib/llvm/libclang.dylib ; do |
210 |
ebegin "fixing references in ${f##*/}" |
211 |
install_name_tool \ |
212 |
-change "@rpath/libclang.dylib" \ |
213 |
"${EPREFIX}"/usr/lib/llvm/libclang.dylib \ |
214 |
-change "@executable_path/../lib/libLLVM-${PV}.dylib" \ |
215 |
"${EPREFIX}"/usr/lib/llvm/libLLVM-${PV}.dylib \ |
216 |
-change "${S}"/Release/lib/libclang.dylib \ |
217 |
"${EPREFIX}"/usr/lib/llvm/libclang.dylib \ |
218 |
"${ED}"/$f |
219 |
eend $? |
220 |
done |
221 |
fi |
222 |
} |
223 |
|
224 |
pkg_postinst() { |
225 |
python_mod_optimize clang |
226 |
if use system-cxx-headers; then |
227 |
elog "C++ headers search path is hardcoded to the active gcc profile one" |
228 |
elog "If you change the active gcc profile, or update gcc to a new version," |
229 |
elog "you will have to remerge this package to update the search path" |
230 |
else |
231 |
elog "If clang++ fails to find C++ headers on your system," |
232 |
elog "you can remerge clang with USE=system-cxx-headers to use C++ headers" |
233 |
elog "from the active gcc profile" |
234 |
fi |
235 |
} |
236 |
|
237 |
pkg_postrm() { |
238 |
python_mod_cleanup clang |
239 |
} |