core/gcc/Pkgfile

45 lines
1.6 KiB
Plaintext
Raw Normal View History

2006-02-23 16:26:10 +01:00
# Description: The GNU Compiler Collection
# URL: http://gcc.gnu.org
# Maintainer: CRUX System Team, core-ports at crux dot nu
2008-09-17 10:43:39 +02:00
# Depends on: libgmp libmpfr
2006-02-23 16:26:10 +01:00
name=gcc
2008-09-17 10:43:39 +02:00
version=4.3.2
2006-11-20 13:08:00 +01:00
release=1
source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-{core,g++,objc}-$version.tar.bz2
2008-09-17 10:43:39 +02:00
$name-$version-nocheck-fixincludes.patch)
2006-02-23 16:26:10 +01:00
build() {
patch -d $name-$version -p1 -i $SRC/$name-$version-nocheck-fixincludes.patch
2008-09-17 10:43:39 +02:00
sed -i 's|REVISION|REVISION " (CRUX)"|' $name-$version/$name/version.c
2006-11-20 13:08:00 +01:00
2006-02-23 16:26:10 +01:00
mkdir build
cd build
../$name-$version/configure --prefix=/usr \
2008-09-17 10:43:39 +02:00
--libexecdir=/usr/lib \
--enable-languages=c,c++,objc \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-shared \
--disable-nls \
2006-02-23 18:29:54 +01:00
--with-x=no
2006-02-23 16:26:10 +01:00
make bootstrap
make check
2007-09-10 08:36:05 +02:00
make -j1 DESTDIR=$PKG install
2008-09-17 10:43:39 +02:00
2006-02-23 16:26:10 +01:00
mkdir $PKG/lib
ln -sf ../usr/bin/cpp $PKG/lib/cpp
ln -sf gcc $PKG/usr/bin/cc
ln -sf g++ $PKG/usr/bin/c++
2008-09-17 10:43:39 +02:00
mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
2006-02-23 16:26:10 +01:00
rm -rf $PKG/usr/info $PKG/usr/lib/libiberty.a \
2008-09-17 10:43:39 +02:00
$PKG/usr/bin/*-linux-gnu-* \
$PKG/usr/lib/gcc/*/$version/install-tools \
$PKG/usr/lib/gcc/*/$version/include/README \
$PKG/usr/lib/gcc/*/$version/include-fixed
2006-02-23 16:26:10 +01:00
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
}