wok-next annotate gcc54/receipt @ rev 20882

Check Repology info from a* to g* packages
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jul 10 20:08:05 2018 +0300 (2018-07-10)
parents 3e3205b3b68f
children d5aab818505e
rev   line source
al@20456 1 # SliTaz package receipt v2.
devl547@19328 2
devl547@19328 3 PACKAGE="gcc54"
devl547@19328 4 VERSION="5.4.0"
devl547@19328 5 CATEGORY="development"
al@20456 6 SHORT_DESC="The GNU Compiler Collection"
devl547@19328 7 MAINTAINER="pankso@slitaz.org"
devl547@19328 8 LICENSE="GPL2"
devl547@19328 9 WEB_SITE="http://gcc.gnu.org/"
al@20882 10 REPOLOGY="gcc"
al@20456 11
al@20456 12 TARBALL="gcc-$VERSION.tar.bz2"
devl547@19328 13 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
devl547@19328 14
devl547@19328 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="gcc54-lib-base"
devl547@19328 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
al@20472 27
devl547@19328 28 pkgversion="SliTaz"
devl547@19328 29 languages="c,c++"
devl547@19328 30
devl547@19328 31 # Use libiberty.a from binutils.
devl547@19328 32 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
devl547@19328 33
devl547@19328 34 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
devl547@19328 35
devl547@19328 36 mkdir -p ../gcc-build && cd ../gcc-build
devl547@19328 37
devl547@19328 38 $src/configure \
devl547@19328 39 --libexecdir=/usr/lib \
devl547@19328 40 --enable-nls \
devl547@19328 41 --enable-languages=${languages} \
devl547@19328 42 --enable-shared \
devl547@19328 43 --with-system-zlib \
devl547@19328 44 --enable-clocale=gnu \
devl547@19328 45 --enable-objc-gc \
devl547@19328 46 --enable-__cxa_atexit \
devl547@19328 47 --enable-lto \
devl547@19328 48 --enable-threads=posix \
devl547@19328 49 --disable-bootstrap \
devl547@19328 50 --program-suffix=-54 \
devl547@19328 51 --libdir=/usr/libgcc54 \
devl547@19328 52 --with-pkgversion="$pkgversion" \
al@20472 53 --disable-multilib \
al@20472 54 $ARCH_ARGS \
al@20472 55 $CONFIGURE_ARGS &&
devl547@19328 56 make && make install
devl547@19328 57 }
devl547@19328 58
al@20456 59 genpkg_rules() {
al@20456 60 case $PACKAGE in
al@20456 61 gcc54)
al@20456 62 mkdir -p $fs/usr/share
al@20456 63 cp -a $install/usr/bin $fs/usr
devl547@19328 64
al@20456 65 # Copy all libs. Do not hide gcc-lib-base.
al@20456 66 cp -a $install/usr/lib* $fs/usr
devl547@19328 67
al@20456 68 # Include files.
al@20456 69 cp -a $install/usr/include $fs/usr
devl547@19328 70
al@20456 71 # Remove build directory.
al@20456 72 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
al@20456 73 rm -rf $WOK/$PACKAGE/$PACKAGE-build
al@20456 74 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
al@20456 75 TAGS="compiler C C++"
al@20456 76 ;;
al@20456 77 gcc54-lib-base)
al@20456 78 mkdir -p $fs/usr/lib
al@20456 79 cp -a $install/usr/libgcc54/libgcc_s.so* $fs/usr/lib
al@20456 80 cp -a $install/usr/libgcc54/libstdc++.so* $fs/usr/lib
al@20456 81 rm -f $fs/usr/lib/*-gdb.py
al@20456 82 CAT="development|base libraries, libgcc_s and libstdc++"
al@20456 83 PROVIDE="gcc-lib-base"
al@20456 84 ;;
al@20456 85 esac
devl547@19328 86 }
al@20456 87
al@20457 88 post_remove_gcc54_lib_base() {
al@20456 89 cd "$1/usr/lib"
al@20456 90 ln -s libstdc++.so.6.*.* libstdc++.so.6
al@20456 91 ln -s libstdc++.so.6.*.* libstdc++.so
al@20456 92 cd - >/dev/null
al@20456 93 }