wok-next annotate gcc49/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents d958fec46c9f
children
rev   line source
al@20456 1 # SliTaz package receipt v2.
pascal@17845 2
pascal@17845 3 PACKAGE="gcc49"
pascal@17845 4 VERSION="4.9.2"
pascal@17845 5 CATEGORY="development"
al@20456 6 SHORT_DESC="The GNU Compiler Collection"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@17845 8 LICENSE="GPL2"
pascal@17845 9 WEB_SITE="http://gcc.gnu.org/"
al@20882 10 REPOLOGY="gcc"
al@20456 11
al@20456 12 TARBALL="gcc-$VERSION.tar.bz2"
pascal@17845 13 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
pascal@17846 14 TAGS="compiler C C++"
pascal@17845 15
pascal@17845 16 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
erkan@19462 17 # for cookutils that are not used by tazwok/cook-toolchain since it installs
erkan@19462 18 # and uses its own copy.
pascal@19877 19 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
al@21020 20 SPLIT="$PACKAGE-lib-base"
pascal@17845 21
al@20456 22 compile_rules() {
al@20472 23 case $ARCH in
al@20472 24 i?86) ARCH_ARGS="--with-tune=$ARCH";;
al@20472 25 x86_64) ARCH_ARGS="--with-tune=nocona";;
al@20472 26 esac
pascal@17846 27 pkgversion="SliTaz"
pascal@17846 28 languages="c,c++"
pascal@17845 29
pascal@19877 30 patch -p1 < $stuff/cfns.gperf.u
pascal@19877 31
pascal@17845 32 # Use libiberty.a from binutils.
pascal@17845 33 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
pascal@17845 34
pascal@17846 35 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
pascal@17845 36
al@20472 37 mkdir build
al@20472 38 cd build
pascal@17845 39
pascal@17846 40 $src/configure \
pascal@17846 41 --libexecdir=/usr/lib \
pascal@17846 42 --enable-nls \
al@21020 43 --enable-languages=$languages \
pascal@17846 44 --enable-shared \
pascal@17846 45 --with-system-zlib \
pascal@17846 46 --enable-clocale=gnu \
pascal@17846 47 --enable-objc-gc \
pascal@17846 48 --enable-__cxa_atexit \
pascal@17846 49 --enable-lto \
pascal@17846 50 --enable-threads=posix \
pascal@17846 51 --disable-bootstrap \
pascal@17846 52 --program-suffix=-49 \
pascal@17849 53 --libdir=/usr/libgcc49 \
pascal@17846 54 --with-pkgversion="$pkgversion" \
al@20472 55 --disable-multilib \
al@20472 56 $ARCH_ARGS \
al@20472 57 $CONFIGURE_ARGS &&
al@21020 58 make &&
al@21020 59 make install
pascal@17845 60 }
pascal@17845 61
al@20456 62 genpkg_rules() {
al@20456 63 case $PACKAGE in
al@20456 64 gcc49)
al@20456 65 mkdir -p $fs/usr/share
al@20456 66 cp -a $install/usr/bin $fs/usr
pascal@17845 67
al@20456 68 # Copy all libs. Do not hide gcc-lib-base.
al@20456 69 cp -a $install/usr/lib* $fs/usr
pascal@17845 70
al@20456 71 # Include files.
al@20456 72 cp -a $install/usr/include $fs/usr
al@20456 73 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
al@20456 74 ;;
al@20456 75 gcc49-lib-base)
al@20456 76 mkdir -p $fs/usr/lib
al@20456 77 cp -a $install/usr/libgcc49/libgcc_s.so* $fs/usr/lib
al@20456 78 cp -a $install/usr/libgcc49/libstdc++.so* $fs/usr/lib
al@20456 79 rm -f $fs/usr/lib/*-gdb.py
al@20456 80 CAT="development|GCC base libraries, libgcc_s and libstdc++"
al@20456 81 PROVIDE="gcc-lib-base"
al@20456 82 ;;
al@20456 83 esac
al@20456 84 }
pascal@17845 85
al@20456 86 post_remove_gcc49_lib_base() {
al@20456 87 cd "$1/usr/lib"
al@20456 88 ln -s libstdc++.so.6.*.* libstdc++.so.6
al@20456 89 ln -s libstdc++.so.6.*.* libstdc++.so
al@20456 90 cd - >/dev/null
pascal@17845 91 }