wok view gcc/receipt @ rev 4945

Up: xterm (255)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Feb 16 22:34:26 2010 +0100 (2010-02-16)
parents e3b32d101ab8
children 9f19aee613be
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc"
4 VERSION="4.4.1"
5 CATEGORY="development"
6 SHORT_DESC="The the GNU Compiler Collection."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="libgomp gmp mpfr"
9 BUILD_DEPENDS="glibc-dev gawk flex gmp gmp-dev mpfr mpfr-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://gcc.gnu.org/"
12 WGET_URL="http://gcc-uk.internet.bs/releases//$PACKAGE-$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 gcc-build
21 cd gcc-build
22 ../$PACKAGE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
23 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
24 --enable-languages=c,c++,objc,fortran --enable-shared --with-system-zlib \
25 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
26 --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu &&
27 make bootstrap &&
28 # Make install in the source tree to help creating derivated pkgs
29 # and keep $_pkg variable set for genpkg.
30 make DESTDIR=$src/_pkg install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr/share
37 cp -a $_pkg/usr/bin $fs/usr
38 # Copy all libs. Remove libgcc_s.so and libstdc++.so
39 # they goes in gcc-lib-base-$VERSION package.
40 cp -a $_pkg/usr/lib $fs/usr
41 rm $fs/usr/lib/libgcc_s.so*
42 rm $fs/usr/lib/libstdc++.so*
43 rm $fs/usr/lib/libgomp.so*
44 # Include files.
45 cp -a $_pkg/usr/include $fs/usr
46 # Gfortran goes in gfortran-$VERSION package.
47 rm -f $fs/usr/bin/*gfortran
48 rm -f $fs/usr/lib/libgfortran*
49 rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
50 rm -f $fs/usr/lib/gcc/*/$VERSION/f*
51 }
53 # Post install commands for Tazpkg.
54 post_install()
55 {
56 local root
57 root=$1
58 echo "Processing post-install commands..."
59 if [ ! -f "$root/lib/cpp" ]; then
60 ln -s ../usr/bin/cpp $root/lib
61 fi
62 if [ ! -f "$root/usr/bin/cc" ]; then
63 ln -s gcc $root/usr/bin/cc
64 fi
65 }