wok-next view gcc/receipt @ rev 4041

gcc: enable objc language
author Christophe Lincoln <pankso@slitaz.org>
date Tue Sep 08 22:51:07 2009 +0200 (2009-09-08)
parents 45d85b50203a
children ec3c887dc9ff
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 --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 }
48 # Post install commands for Tazpkg.
49 post_install()
50 {
51 local root
52 root=$1
53 echo "Processing post-install commands..."
54 if [ ! -f "$root/lib/cpp" ]; then
55 ln -s ../usr/bin/cpp $root/lib
56 fi
57 if [ ! -f "$root/usr/bin/cc" ]; then
58 ln -s gcc $root/usr/bin/cc
59 fi
60 }