2006-11-21 22:03:23 +11:00
|
|
|
# Description: GNU Java Compiler.
|
|
|
|
# URL: http://gcc.gnu.org/
|
|
|
|
# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
|
|
|
|
# Packager: Aaron Marks, nymacro at gmail dot com
|
2008-01-10 23:49:14 +11:00
|
|
|
# Depends On: alsa-lib
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
name=gcj
|
2007-12-17 21:45:10 +11:00
|
|
|
version=4.2.2
|
2008-01-10 23:49:14 +11:00
|
|
|
release=2
|
2006-11-21 22:03:23 +11:00
|
|
|
source=(ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-{core,g++,java}-$version.tar.bz2 \
|
2007-04-07 19:44:29 +10:00
|
|
|
gcj-$version-nocheck-fixincludes.patch \
|
|
|
|
gcj-$version-fixinc.patch)
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
build() {
|
2007-04-07 19:44:29 +10:00
|
|
|
patch -d gcc-$version -p1 -i $SRC/gcj-$version-nocheck-fixincludes.patch
|
|
|
|
patch -d gcc-$version -p1 -i $SRC/gcj-$version-fixinc.patch
|
|
|
|
|
|
|
|
sed -i -e 's|VERSUFFIX ""|VERSUFFIX " (CRUX)"|' \
|
|
|
|
gcc-$version/gcc/version.c
|
|
|
|
|
|
|
|
mkdir build
|
2006-11-21 22:03:23 +11:00
|
|
|
cd build
|
|
|
|
|
|
|
|
../gcc-$version/configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--enable-languages=java \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--enable-__cxa_atexit \
|
|
|
|
--enable-clocale=gnu \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-nls \
|
|
|
|
--with-x=no \
|
|
|
|
--enable-version-specific-runtime-libs
|
|
|
|
|
2007-04-07 19:44:29 +10:00
|
|
|
make bootstrap
|
|
|
|
make check
|
2008-01-10 23:49:14 +11:00
|
|
|
make prefix=$PKG/usr install
|
2006-11-21 22:03:23 +11:00
|
|
|
|
2007-04-07 19:44:29 +10:00
|
|
|
ln -sf /usr/libexec/gcc/i686-pc-linux-gnu/$version/jc1 $PKG/usr/bin/jc1
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
# remove un-needed files
|
2007-04-07 19:44:29 +10:00
|
|
|
find $PKG -name 'README' -delete
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
rm \
|
|
|
|
$PKG/usr/lib/libiberty.a \
|
2007-04-07 19:44:29 +10:00
|
|
|
$PKG/usr/bin/*-linux-gnu-* \
|
|
|
|
$PKG/usr/man/man1/{cpp,g++,gcc,gcov}.1
|
|
|
|
|
2006-11-21 22:03:23 +11:00
|
|
|
rm -r \
|
|
|
|
$PKG/usr/info \
|
2007-04-07 19:44:29 +10:00
|
|
|
$PKG/usr/man/man7 \
|
2006-11-21 22:03:23 +11:00
|
|
|
$PKG/usr/lib/gcc/*/$version/install-tools
|
|
|
|
|
|
|
|
# remove files already on the system out of the port
|
2008-01-10 23:49:14 +11:00
|
|
|
for i in $(pkginfo -l gcc |sed -e "s|^|/|"); do
|
|
|
|
if [ -e "$i" ] && [ ! -d "$i" ]; then
|
|
|
|
if [ -e "$PKG$i" ]; then
|
|
|
|
rm "$PKG$i"
|
|
|
|
fi
|
2006-11-21 22:03:23 +11:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Remove empty directories
|
2007-04-07 19:44:29 +10:00
|
|
|
find $PKG -depth -empty -delete
|
2006-11-21 22:03:23 +11:00
|
|
|
|
|
|
|
# remove build links from *.la files
|
|
|
|
for i in `find $PKG -name '*.la' | sed -e "s|$PKG|/|"`; do
|
|
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/$i
|
|
|
|
done
|
2007-04-07 19:44:29 +10:00
|
|
|
|
|
|
|
# install distcc symlinks if distcc is installed
|
2007-05-16 17:19:00 +10:00
|
|
|
if pkginfo -i |grep '^distcc '; then
|
2007-04-07 19:44:29 +10:00
|
|
|
install -d $PKG/usr/lib/distcc
|
|
|
|
for c in gcj jc1; do
|
|
|
|
cd $PKG/usr/lib/distcc && ln -s ../../bin/distcc $c
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
# install ccache symlinks if ccache is installed
|
2007-05-16 17:19:00 +10:00
|
|
|
if pkginfo -i |grep '^ccache '; then
|
2007-04-07 19:44:29 +10:00
|
|
|
install -d $PKG/usr/lib/ccache
|
|
|
|
for c in gcj jc1; do
|
|
|
|
cd $PKG/usr/lib/ccache && ln -s ../../bin/ccache $c
|
|
|
|
done
|
|
|
|
fi
|
2006-11-21 22:03:23 +11:00
|
|
|
}
|
|
|
|
|