wok-stable view gcc/receipt @ rev 5982
nut: fix genpkg
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Aug 13 21:34:30 2010 +0200 (2010-08-13) |
parents | b51da6965de2 |
children | 6b5b70397945 |
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc"
4 VERSION="4.5.1"
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 elfutils"
9 BUILD_DEPENDS="glibc-dev gawk flex gmp gmp-dev mpfr mpfr-dev mpc-library \
10 elfutils elfutils-dev"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WEB_SITE="http://gcc.gnu.org/"
13 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 # Use libiberty.a from binutils.
19 sed -i 's/install_to_$(INSTALL_DEST) //' \
20 $PACKAGE-$VERSION/libiberty/Makefile.in || exit 1
21 mkdir -p gcc-build && 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 --enable-lto \
26 --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu &&
27 make -j 4 bootstrap &&
28 # Make install in the source tree to help creating derivated pkgs
29 # and keep $_pkg variable set for genpkg.
30 make -j 4 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 -rf $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 }