Gentoo Archives: gentoo-commits

From: "Bernard Cafarelli (voyageur)" <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-devel/llvm-gcc: llvm-gcc-9999.ebuild ChangeLog
Date: Wed, 02 Jun 2010 15:54:13
Message-Id: 20100602155407.83AC72CE14@corvid.gentoo.org
1 voyageur 10/06/02 15:54:07
2
3 Modified: ChangeLog
4 Added: llvm-gcc-9999.ebuild
5 Log:
6 Add live version, by Anders Bach Madsen <abachn@××××××××.dk> in bug #320919
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.7 sys-devel/llvm-gcc/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm-gcc/ChangeLog?rev=1.7&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm-gcc/ChangeLog?rev=1.7&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm-gcc/ChangeLog?r1=1.6&r2=1.7
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/ChangeLog,v
19 retrieving revision 1.6
20 retrieving revision 1.7
21 diff -u -r1.6 -r1.7
22 --- ChangeLog 20 May 2010 12:57:26 -0000 1.6
23 +++ ChangeLog 2 Jun 2010 15:54:07 -0000 1.7
24 @@ -1,6 +1,13 @@
25 # ChangeLog for sys-devel/llvm-gcc
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/ChangeLog,v 1.6 2010/05/20 12:57:26 voyageur Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/ChangeLog,v 1.7 2010/06/02 15:54:07 voyageur Exp $
29 +
30 +*llvm-gcc-9999 (02 Jun 2010)
31 +
32 + 02 Jun 2010; Bernard Cafarelli <voyageur@g.o>
33 + +llvm-gcc-9999.ebuild:
34 + Add live version, by Anders Bach Madsen <abachn@××××××××.dk> in bug
35 + #320919
36
37 *llvm-gcc-2.7-r1 (20 May 2010)
38
39
40
41
42 1.1 sys-devel/llvm-gcc/llvm-gcc-9999.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm-gcc/llvm-gcc-9999.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm-gcc/llvm-gcc-9999.ebuild?rev=1.1&content-type=text/plain
46
47 Index: llvm-gcc-9999.ebuild
48 ===================================================================
49 # Copyright 1999-2010 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/llvm-gcc-9999.ebuild,v 1.1 2010/06/02 15:54:07 voyageur Exp $
52
53 EAPI=2
54 inherit subversion libtool flag-o-matic gnuconfig multilib
55
56 LLVM_GCC_VERSION=4.2
57 MY_PV=${LLVM_GCC_VERSION}-${PV/_pre*}
58
59 DESCRIPTION="LLVM C front-end"
60 HOMEPAGE="http://llvm.org"
61 SRC_URI=""
62 ESVN_REPO_URI="http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk"
63
64 LICENSE="GPL-2"
65 SLOT=0
66 KEYWORDS=""
67 IUSE="bootstrap fortran multilib nls objc objc++ test"
68
69 RDEPEND=">=sys-devel/llvm-$PV"
70 DEPEND="${RDEPEND}
71 >=sys-apps/texinfo-4.2-r4
72 >=sys-devel/binutils-2.18
73 >=sys-devel/bison-1.875
74 test? ( dev-util/dejagnu
75 sys-devel/autogen )"
76
77 src_prepare() {
78 #we keep the directory structure suggested by README.LLVM,
79 mkdir -p "${S}"/obj
80
81 # From toolchain eclass
82 elibtoolize --portage --shallow --no-uclibc
83 gnuconfig_update
84
85 # update configure files
86 local f
87 for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do
88 #ebegin " Updating ${f/${S}\/} [LANG]"
89 ebegin " Updating \"${f/${S}\/}\" [LANG]"
90 patch "${f}" "${FILESDIR}"/gcc-configure-LANG.patch >& "${T}"/configure-patch.log \
91 || eerror "Please file a bug about this"
92 eend $?
93 done
94 sed -i 's|A-Za-z0-9|[:alnum:]|g' gcc/*.awk #215828
95
96 if [[ -x contrib/gcc_update ]] ; then
97 einfo "Touching generated files"
98 ./contrib/gcc_update --touch | \
99 while read f ; do
100 einfo " ${f%%...}"
101 done
102 fi
103 }
104
105 src_configure() {
106 gcc_do_filter_flags
107 # Target options are handled by econf
108
109 cd "${S}"/obj
110 EXTRALANGS=""
111 use fortran && EXTRALANGS="${EXTRALANGS},fortran"
112 use objc && EXTRALANGS="${EXTRALANGS},objc"
113 use objc++ && EXTRALANGS="${EXTRALANGS},obj-c++"
114
115 ECONF_SOURCE="${S}" econf --prefix=/usr/$(get_libdir)/${PN}-${MY_PV} \
116 $(use_enable multilib) \
117 --program-prefix=${PN}-${MY_PV}- \
118 --enable-llvm=/usr --enable-languages=c,c++${EXTRALANGS} \
119 || die "configure failed"
120 }
121
122 src_compile() {
123 gcc_do_filter_flags
124 cd "${S}"/obj
125 BUILDOPTIONS="LLVM_VERSION_INFO=${MY_PV}"
126 use bootstrap && BUILDOPTIONS="${BUILDOPTIONS} bootstrap"
127 emake ${BUILDOPTIONS} || die "emake failed"
128 }
129
130 src_test() {
131 cd "${S}"/obj
132 emake -j1 -k check || ewarn "check failed and that sucks :("
133 }
134
135 src_install() {
136 cd "${S}"/obj
137
138 # Do allow symlinks in private gcc include dir as this can break the build
139 find gcc/include*/ -type l -print0 | xargs -0 rm -f
140 # Remove generated headers, as they can cause things to break
141 # (ncurses, openssl, etc).
142 for x in $(find gcc/include*/ -name '*.h') ; do
143 grep -q 'It has been auto-edited by fixincludes from' "${x}" \
144 && rm -f "${x}"
145 done
146
147 emake DESTDIR="${D}" install || die "installation failed"
148 rm -rf "${D}"/usr/share/man/man7
149 if ! use nls; then
150 einfo "nls USE flag disabled, not installing locale files"
151 rm -rf "${D}"/usr/share/locale
152 fi
153
154 # Add some symlinks
155 dodir /usr/bin
156 cd "${D}/usr/bin"
157 for X in c++ g++ cpp gcc gcov gccbug ; do
158 ln -s /usr/$(get_libdir)/${PN}-${MY_PV}/bin/${PN}-${MY_PV}-${X} llvm-${X}
159 done
160 use fortran && \
161 ln -s /usr/$(get_libdir)/${PN}-${MY_PV}/bin/${PN}-${MY_PV}-gfortran llvm-gfortran
162 }
163
164 gcc_do_filter_flags() {
165 strip-flags
166
167 # In general gcc does not like optimization, and add -O2 where
168 # it is safe. This is especially true for gcc 3.3 + 3.4
169 replace-flags -O? -O2
170
171 # ... sure, why not?
172 strip-unsupported-flags
173
174 # dont want to funk ourselves
175 filter-flags '-mabi*' -m31 -m32 -m64
176
177 filter-flags '-mcpu=*'
178 }