wok view gcc/receipt @ rev 5781

Speedup some builds
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jul 10 09:37:09 2010 +0200 (2010-07-10)
parents 01b2b28aaebe
children a041e4f77d18
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc"
4 VERSION="4.5.0"
5 CATEGORY="development"
6 SHORT_DESC="The the GNU Compiler Collection."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="libgomp gmp mpfr gcc-lib-base mpc-library"
9 BUILD_DEPENDS="glibc-dev gawk flex gmp gmp-dev mpfr mpfr-dev mpc-library"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://gcc.gnu.org/"
12 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # Use libiberty.a from binutils.
18 sed -i 's/install_to_$(INSTALL_DEST) //' \
19 $PACKAGE-$VERSION/libiberty/Makefile.in || exit 1
20 mkdir -p gcc-build && cd gcc-build
21 ../$PACKAGE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
22 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
23 --enable-languages=c,c++,objc,fortran --enable-shared --with-system-zlib \
24 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
25 --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu &&
26 make -j 4 bootstrap &&
27 # Make install in the source tree to help creating derivated pkgs
28 # and keep $_pkg variable set for genpkg.
29 make -j 4 DESTDIR=$src/_pkg install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/share
36 cp -a $_pkg/usr/bin $fs/usr
37 # Copy all libs. Remove libgcc_s.so and libstdc++.so
38 # they goes in gcc-lib-base-$VERSION package.
39 cp -a $_pkg/usr/lib $fs/usr
40 rm $fs/usr/lib/libgcc_s.so*
41 rm $fs/usr/lib/libstdc++.so*
42 rm $fs/usr/lib/libgomp.so*
43 # Include files.
44 cp -a $_pkg/usr/include $fs/usr
45 # Gfortran goes in gfortran-$VERSION package.
46 rm -f $fs/usr/bin/*gfortran
47 rm -f $fs/usr/lib/libgfortran*
48 rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
49 rm -rf $fs/usr/lib/gcc/*/$VERSION/f*
50 }
52 # Post install commands for Tazpkg.
53 post_install()
54 {
55 local root
56 root=$1
57 echo "Processing post-install commands..."
58 if [ ! -f "$root/lib/cpp" ]; then
59 ln -s ../usr/bin/cpp $root/lib
60 fi
61 if [ ! -f "$root/usr/bin/cc" ]; then
62 ln -s gcc $root/usr/bin/cc
63 fi
64 }