87 lines
2.1 KiB
Plaintext
87 lines
2.1 KiB
Plaintext
# 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
|
|
# Depends On:
|
|
|
|
name=gcj
|
|
version=4.1.2
|
|
release=1
|
|
source=(ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-{core,g++,java}-$version.tar.bz2 \
|
|
gcj-$version-nocheck-fixincludes.patch \
|
|
gcj-$version-fixinc.patch)
|
|
|
|
build() {
|
|
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
|
|
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
|
|
|
|
make bootstrap
|
|
make check
|
|
make -j1 prefix=$PKG/usr install
|
|
|
|
ln -sf /usr/libexec/gcc/i686-pc-linux-gnu/$version/jc1 $PKG/usr/bin/jc1
|
|
|
|
# remove un-needed files
|
|
find $PKG -name 'README' -delete
|
|
|
|
rm \
|
|
$PKG/usr/lib/libiberty.a \
|
|
$PKG/usr/bin/*-linux-gnu-* \
|
|
$PKG/usr/man/man1/{cpp,g++,gcc,gcov}.1
|
|
|
|
rm -r \
|
|
$PKG/usr/info \
|
|
$PKG/usr/man/man7 \
|
|
$PKG/usr/lib/gcc/*/$version/install-tools
|
|
|
|
# remove files already on the system out of the port
|
|
for i in $(find $PKG | sed -e "s|$PKG|/|"); do
|
|
if [ -e "$i" ] && [ ! -d "$i" ] ; then
|
|
rm $PKG/$i
|
|
fi
|
|
done
|
|
|
|
# Remove empty directories
|
|
find $PKG -depth -empty -delete
|
|
|
|
# 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
|
|
|
|
# install distcc symlinks if distcc is installed
|
|
if prt-get listinst distcc > /dev/null; then
|
|
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
|
|
if prt-get listinst ccache > /dev/null; then
|
|
install -d $PKG/usr/lib/ccache
|
|
for c in gcj jc1; do
|
|
cd $PKG/usr/lib/ccache && ln -s ../../bin/ccache $c
|
|
done
|
|
fi
|
|
}
|
|
|