wok-next annotate gcc6/receipt @ rev 21214

updated barnyard2 again (1.9 -> 2.1.13)
author Hans-G?nter Theisgen
date Mon Dec 02 17:31:19 2019 +0100 (2019-12-02)
parents d958fec46c9f
children
rev   line source
al@20616 1 # SliTaz package receipt v2.
al@20616 2
al@20616 3 PACKAGE="gcc6"
al@20616 4 VERSION="6.4.0"
al@20616 5 CATEGORY="development"
al@20616 6 SHORT_DESC="The GNU Compiler Collection"
al@21020 7 MAINTAINER="devel@slitaz.org"
al@20616 8 LICENSE="GPL2"
al@20616 9 WEB_SITE="http://gcc.gnu.org/"
al@20882 10 REPOLOGY="gcc"
al@20616 11
al@20616 12 TARBALL="gcc-$VERSION.tar.xz"
al@20616 13 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
al@20616 14
al@20616 15 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
al@20616 16 # for cookutils that are not used by tazwok/cook-toolchain since it installs
al@20616 17 # and uses its own copy.
al@20616 18 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
al@21020 19 SPLIT="$PACKAGE-lib-base"
al@20616 20
al@20616 21 compile_rules() {
al@20616 22 case $ARCH in
al@20616 23 i?86)
al@20616 24 ARCH_ARGS="--with-tune=$ARCH"
al@20616 25 export CFLAGS="-march=i486 -Os -pipe"
al@20616 26 export CXXFLAGS="$CFLAGS"
al@20616 27 ;;
al@20616 28 x86_64)
al@20616 29 ARCH_ARGS="--with-tune=nocona"
al@20616 30 export CFLAGS="-march=nocona -Os -pipe"
al@20616 31 export CXXFLAGS="$CFLAGS"
al@20616 32 ;;
al@20616 33 esac
al@20616 34
al@20616 35 echo "CFLAGS : $CFLAGS"
al@20616 36 echo "LDFLAGS : $LDFLAGS"
al@20616 37
al@20616 38 pkgversion="SliTaz"
al@20616 39 languages="c,c++"
al@20616 40
al@20616 41 # Use libiberty.a from binutils.
al@20616 42 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
al@20616 43
al@20616 44 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
al@20616 45
al@21020 46 mkdir -p ../gcc-build
al@21020 47 cd ../gcc-build
al@20616 48
al@20616 49 $src/configure \
al@20616 50 --libexecdir=/usr/lib \
al@20616 51 --enable-nls \
al@21020 52 --enable-languages=$languages \
al@20616 53 --enable-shared \
al@20616 54 --with-system-zlib \
al@20616 55 --enable-clocale=gnu \
al@20616 56 --enable-objc-gc \
al@20616 57 --enable-__cxa_atexit \
al@20616 58 --enable-lto \
al@20616 59 --enable-threads=posix \
al@20616 60 --disable-bootstrap \
al@20616 61 --program-suffix=-6 \
al@20616 62 --libdir=/usr/libgcc6 \
al@20616 63 --with-pkgversion="$pkgversion" \
al@20616 64 --disable-multilib \
al@20616 65 $ARCH_ARGS \
al@20616 66 $CONFIGURE_ARGS &&
al@21020 67 make &&
al@21020 68 make install
al@20616 69 }
al@20616 70
al@20616 71 genpkg_rules() {
al@20616 72 case $PACKAGE in
al@20616 73 gcc6)
al@20616 74 mkdir -p $fs/usr/share
al@20616 75 cp -a $install/usr/bin $fs/usr
al@20616 76
al@20616 77 # Copy all libs. Do not hide gcc-lib-base.
al@20616 78 cp -a $install/usr/lib* $fs/usr
al@20616 79
al@20616 80 # Include files.
al@20616 81 cp -a $install/usr/include $fs/usr
al@20616 82
al@20616 83 # Remove build directory.
al@20616 84 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
al@20616 85 rm -rf $WOK/$PACKAGE/$PACKAGE-build
al@20616 86 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
al@20616 87 TAGS="compiler C C++"
al@20616 88 ;;
al@20616 89 gcc6-lib-base)
al@20616 90 mkdir -p $fs/usr/lib
al@20616 91 cp -a $install/usr/libgcc61/libgcc_s.so* $fs/usr/lib
al@20616 92 cp -a $install/usr/libgcc61/libstdc++.so* $fs/usr/lib
al@20616 93 rm -f $fs/usr/lib/*-gdb.py
al@20616 94 CAT="development|base libraries, libgcc_s and libstdc++"
al@20616 95 PROVIDE="gcc-lib-base"
al@20616 96 ;;
al@20616 97 esac
al@20616 98 }
al@20616 99
al@21020 100 post_remove_gcc6_lib_base() {
al@20616 101 cd "$1/usr/lib"
al@20616 102 ln -s libstdc++.so.6.*.* libstdc++.so.6
al@20616 103 ln -s libstdc++.so.6.*.* libstdc++.so
al@20616 104 cd - >/dev/null
al@20616 105 }