wok-next annotate gcc49/receipt @ rev 20671

qemu, qemu-light: define prefix
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri May 11 14:51:17 2018 +0300 (2018-05-11)
parents c3a368c0cddb
children d958fec46c9f
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"
pascal@17845 7 MAINTAINER="pankso@slitaz.org"
pascal@17845 8 LICENSE="GPL2"
pascal@17845 9 WEB_SITE="http://gcc.gnu.org/"
al@20456 10
al@20456 11 TARBALL="gcc-$VERSION.tar.bz2"
pascal@17845 12 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
pascal@17846 13 TAGS="compiler C C++"
pascal@17845 14
pascal@17845 15 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
erkan@19462 16 # for cookutils that are not used by tazwok/cook-toolchain since it installs
erkan@19462 17 # and uses its own copy.
pascal@19877 18 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
al@20456 19 SPLIT="gcc49-lib-base"
pascal@17845 20
al@20456 21 compile_rules() {
al@20472 22 case $ARCH in
al@20472 23 arm*) ARCH_ARGS="--with-tune=armv6";;
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 \
pascal@17846 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 &&
pascal@17846 58 make && make install
pascal@17845 59 }
pascal@17845 60
al@20456 61 genpkg_rules() {
al@20456 62 case $PACKAGE in
al@20456 63 gcc49)
al@20456 64 mkdir -p $fs/usr/share
al@20456 65 cp -a $install/usr/bin $fs/usr
pascal@17845 66
al@20456 67 # Copy all libs. Do not hide gcc-lib-base.
al@20456 68 cp -a $install/usr/lib* $fs/usr
pascal@17845 69
al@20456 70 # Include files.
al@20456 71 cp -a $install/usr/include $fs/usr
al@20456 72 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
al@20456 73 ;;
al@20456 74 gcc49-lib-base)
al@20456 75 mkdir -p $fs/usr/lib
al@20456 76 cp -a $install/usr/libgcc49/libgcc_s.so* $fs/usr/lib
al@20456 77 cp -a $install/usr/libgcc49/libstdc++.so* $fs/usr/lib
al@20456 78 rm -f $fs/usr/lib/*-gdb.py
al@20456 79 CAT="development|GCC base libraries, libgcc_s and libstdc++"
al@20456 80 PROVIDE="gcc-lib-base"
al@20456 81 ;;
al@20456 82 esac
al@20456 83 }
pascal@17845 84
al@20456 85 post_remove_gcc49_lib_base() {
al@20456 86 cd "$1/usr/lib"
al@20456 87 ln -s libstdc++.so.6.*.* libstdc++.so.6
al@20456 88 ln -s libstdc++.so.6.*.* libstdc++.so
al@20456 89 cd - >/dev/null
pascal@17845 90 }