Magellan Linux

Contents of /branches/magellan-next/extras/gcj/gcj-4.6.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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