forked from ports/contrib
71 lines
1.6 KiB
Plaintext
71 lines
1.6 KiB
Plaintext
# Description: GNU Java Compiler.
|
|
# URL: http://gcc.gnu.org/
|
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
|
# Packager: Aaron Marks, nymacro at gmail dot com
|
|
# Depends On: alsa-lib
|
|
|
|
name=gcj
|
|
version=4.3.2
|
|
release=1
|
|
source=(ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-{core,g++,java}-$version.tar.bz2
|
|
$name-4.2.3-nocheck-fixincludes.patch)
|
|
|
|
build() {
|
|
patch -d gcc-$version -p 1 -i $SRC/$name-4.2.3-nocheck-fixincludes.patch
|
|
|
|
sed -i gcc-$version/gcc/version.c \
|
|
-e 's|VERSUFFIX ""|VERSUFFIX " (CRUX)"|'
|
|
|
|
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 -j 1 DESTDIR=$PKG 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 $(pkginfo -l gcc |sed -e "s|^|/|"); do
|
|
if [ -e "$i" ] && [ ! -d "$i" ]; then
|
|
if [ -e "$PKG$i" ]; then
|
|
rm "$PKG$i"
|
|
fi
|
|
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
|
|
}
|
|
|