summaryrefslogtreecommitdiffstats
path: root/gcc/Pkgfile
blob: 298d60e12588bed7f9c36be78a9f66c78ddd6c2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
description="The GNU Compiler Collection"
packager=""
maintainer="CRUX System Team, core-ports at crux dot nu"
url="http://gcc.gnu.org"
depends=(zlib libmpc)

name=gcc
version=4.5.1
release=1
source=(http://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-core-4.5.1.tar.bz2 http://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-g++-4.5.1.tar.bz2 http://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-objc-4.5.1.tar.bz2 gcc-nocheck-fixincludes.patch)
build () 
{ 
    patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch;
    mkdir build;
    cd build;
    ../$name-$version/configure --prefix=/usr --mandir=/usr/man --libexecdir=/usr/lib --enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-shared --disable-nls --with-x=no --with-system-zlib --with-pkgversion="CRUX";
    make bootstrap;
    make -j1 check;
    make -j1 DESTDIR=$PKG install;
    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++;
    mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/;
    rm $PKG/usr/lib/{libiberty.a,libstdc++.so.6.0.14-gdb.py};
    rm -r $PKG/usr/share;
    rm -r $PKG/usr/bin/*-linux-gnu-*;
    rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed};
    sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
}