wok view gcc/receipt @ rev 6881

Up: ffplay to 0.6.1.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Oct 20 23:49:58 2010 +0000 (2010-10-20)
parents 6b5b70397945
children 4dfa82341af1
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 \
26 --enable-lto \
27 --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu &&
28 make -j 4 bootstrap &&
29 # Make install in the source tree to help creating derivated pkgs
30 # and keep $_pkg variable set for genpkg.
31 make -j 4 DESTDIR=$src/_pkg install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/share
38 cp -a $_pkg/usr/bin $fs/usr
39 # Copy all libs. Remove libgcc_s.so and libstdc++.so
40 # they goes in gcc-lib-base-$VERSION package.
41 cp -a $_pkg/usr/lib $fs/usr
42 rm $fs/usr/lib/libgcc_s.so*
43 rm $fs/usr/lib/libstdc++.so*
44 rm $fs/usr/lib/libgomp.so*
45 # Include files.
46 cp -a $_pkg/usr/include $fs/usr
47 # Gfortran goes in gfortran-$VERSION package.
48 rm -f $fs/usr/bin/*gfortran
49 rm -f $fs/usr/lib/libgfortran*
50 rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
51 rm -rf $fs/usr/lib/gcc/*/$VERSION/f*
52 }
54 # Post install commands for Tazpkg.
55 post_install()
56 {
57 local root
58 root=$1
59 echo "Processing post-install commands..."
60 if [ ! -f "$root/lib/cpp" ]; then
61 ln -s ../usr/bin/cpp $root/lib
62 fi
63 if [ ! -f "$root/usr/bin/cc" ]; then
64 ln -s gcc $root/usr/bin/cc
65 fi
66 }