wok-4.x annotate gcc/receipt @ rev 5460

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