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