Contents of /branches/magellan-next/extras/gcj/gcj-4.6.2-r1.smage2
Parent Directory | Revision Log
Revision 9686 -
(show annotations)
(download)
Wed Jan 4 15:00:03 2012 UTC (12 years, 4 months ago) by niro
File size: 3296 byte(s)
Wed Jan 4 15:00:03 2012 UTC (12 years, 4 months ago) by niro
File size: 3296 byte(s)
auto added: ver bump to 4.6.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="gcj" |
4 | PVER="4.6.2" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="sys-dev" |
8 | |
9 | HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" |
10 | |
11 | DEPEND="== sys-libs/libstdc++-${PVER} |
12 | >= sys-dev/binutils-2.21 |
13 | == sys-dev/gcc-${PVER} |
14 | >= virtual/glibc |
15 | >= dev-libs/gmp-5.0.2 |
16 | >= dev-libs/mpfr-3.0.1 |
17 | >= dev-libs/mpc-0.9 |
18 | >= dev-libs/ppl-0.11.2 |
19 | >= dev-libs/cloog-ppl-0.15.11 |
20 | >= dev-libs/elfutils-0.152" |
21 | |
22 | SDEPEND=">= virtual/kernel-headers" |
23 | |
24 | PROVIDE="virtual/java |
25 | virtual/java-jdk" |
26 | |
27 | SRCFILE="gcc-${PVER}.tar.bz2" |
28 | SRCDIR="${BUILDDIR}/gcc-${PVER}" |
29 | |
30 | # you better off when not using distcc to compile |
31 | # your new compiler :) maybe not all are the same |
32 | msetfeature "!distcc" |
33 | |
34 | # languages to build into gcc |
35 | MyLanguages=java |
36 | |
37 | sminclude mtools cleanutils libtool |
38 | |
39 | SRC_URI=( |
40 | gnu://gcc/gcc-${PVER}/${SRCFILE} |
41 | mirror://gcc/${SRCFILE} |
42 | mirror://gcc/gcc-4.5.1-no-fixincludes.patch |
43 | ) |
44 | |
45 | UP2DATE="updatecmd \"http://ftp.gnu.org/gnu/${PNAME}/?C=M;O=A\" | sed -n 's/.*${PNAME}-\(.*\)\//\1/;$ p'" |
46 | |
47 | # gcc don't like strong CFLAGS |
48 | export CFLAGS="${CFLAGS//-O?} -O2" |
49 | export CXXFLAGS="${CFLAGS}" |
50 | |
51 | # check for crosscompile or export default CHOST |
52 | if [[ -z ${CCHOST} ]] |
53 | then |
54 | # no crosscompile defined |
55 | export CCHOST=${CHOST} |
56 | else |
57 | # use crosscompile host |
58 | export CCHOST=${CCHOST} |
59 | fi |
60 | |
61 | src_prepare() |
62 | { |
63 | munpack ${SRCFILE} || die |
64 | cd ${SRCDIR} |
65 | |
66 | # generic fixes |
67 | mpatch gcc-4.5.1-no-fixincludes.patch || die |
68 | |
69 | # suppress installation of libiberty, as we will be |
70 | # using the one from binutils |
71 | sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || die |
72 | |
73 | install -d ${SRCDIR}/build || die |
74 | cd ${SRCDIR}/build |
75 | } |
76 | |
77 | src_compile() |
78 | { |
79 | cd ${SRCDIR}/build |
80 | |
81 | local myconf |
82 | |
83 | # Straight from the GCC install doc: |
84 | # "GCC has code to correctly determine the correct value for target |
85 | # for nearly all native systems. Therefore, we highly recommend you |
86 | # not provide a configure target when configuring a native compiler." |
87 | if [[ ${CHOST} != ${CCHOST} ]] |
88 | then |
89 | myconf+=" --target=${CCHOST}" |
90 | fi |
91 | |
92 | # gcc >= 4.3 has now configure flags for uri and version - yeah! |
93 | AR=ar \ |
94 | ../configure \ |
95 | --with-bugurl="http://bugs.magellan-linux.de/" \ |
96 | --with-pkgversion="Magellan-Linux" \ |
97 | --build=${CHOST} \ |
98 | --host=${CHOST} \ |
99 | --prefix=/usr \ |
100 | --mandir=/usr/share/man \ |
101 | --infodir=/usr/share/info \ |
102 | --libdir=/usr/$(mlibdir) \ |
103 | --libexecdir=/usr/$(mlibdir) \ |
104 | --enable-shared \ |
105 | --enable-threads=posix \ |
106 | --enable-__cxa_atexit \ |
107 | --enable-clocale=gnu \ |
108 | --disable-checking \ |
109 | --with-system-zlib \ |
110 | --enable-long-long \ |
111 | --enable-cstdio=stdio \ |
112 | --enable-languages=${MyLanguages} \ |
113 | --disable-libstdcxx-pch \ |
114 | --enable-gnu-unique-object \ |
115 | --enable-lto \ |
116 | --enable-plugin \ |
117 | --enable-gold \ |
118 | ${myconf} \ |
119 | || die |
120 | |
121 | # parallel builds seems to break sometimes on x86_64 |
122 | local myopts |
123 | [[ ${ARCH} = x86_64 ]] && myopts=-j1 |
124 | |
125 | mmake ${myopts} bootstrap-lean || die |
126 | } |
127 | |
128 | src_install() |
129 | { |
130 | cd ${SRCDIR}/build |
131 | |
132 | # install all targets |
133 | make DESTDIR=${BINDIR} install || die |
134 | |
135 | # versionize all bins and symlink them |
136 | for bin in $(find ${BINDIR}/usr/bin -type f) |
137 | do |
138 | echo ${bin} |
139 | mv ${bin} ${bin}-${PVER} || die |
140 | ln -snf $(basename ${bin}-${PVER}) ${bin} || die |
141 | done |
142 | |
143 | # fix all .la files |
144 | # they may contain invalid libpathes which are not needed |
145 | local la |
146 | for la in $(find ${BINDIR} -name \*.la) |
147 | do |
148 | fix_la_file ${la} || die ${la} |
149 | done |
150 | } |