wok annotate gcc/receipt @ rev 7974

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