wok-next annotate gcc49/receipt @ rev 20983
Small updates
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Sep 28 13:48:52 2018 +0300 (2018-09-28) |
parents | 3e3205b3b68f |
children | d5aab818505e |
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@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@20456 | 20 SPLIT="gcc49-lib-base" |
pascal@17845 | 21 |
al@20456 | 22 compile_rules() { |
al@20472 | 23 case $ARCH in |
al@20472 | 24 arm*) ARCH_ARGS="--with-tune=armv6";; |
al@20472 | 25 i?86) ARCH_ARGS="--with-tune=$ARCH";; |
al@20472 | 26 x86_64) ARCH_ARGS="--with-tune=nocona";; |
al@20472 | 27 esac |
pascal@17846 | 28 pkgversion="SliTaz" |
pascal@17846 | 29 languages="c,c++" |
pascal@17845 | 30 |
pascal@19877 | 31 patch -p1 < $stuff/cfns.gperf.u |
pascal@19877 | 32 |
pascal@17845 | 33 # Use libiberty.a from binutils. |
pascal@17845 | 34 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1 |
pascal@17845 | 35 |
pascal@17846 | 36 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in |
pascal@17845 | 37 |
al@20472 | 38 mkdir build |
al@20472 | 39 cd build |
pascal@17845 | 40 |
pascal@17846 | 41 $src/configure \ |
pascal@17846 | 42 --libexecdir=/usr/lib \ |
pascal@17846 | 43 --enable-nls \ |
pascal@17846 | 44 --enable-languages=${languages} \ |
pascal@17846 | 45 --enable-shared \ |
pascal@17846 | 46 --with-system-zlib \ |
pascal@17846 | 47 --enable-clocale=gnu \ |
pascal@17846 | 48 --enable-objc-gc \ |
pascal@17846 | 49 --enable-__cxa_atexit \ |
pascal@17846 | 50 --enable-lto \ |
pascal@17846 | 51 --enable-threads=posix \ |
pascal@17846 | 52 --disable-bootstrap \ |
pascal@17846 | 53 --program-suffix=-49 \ |
pascal@17849 | 54 --libdir=/usr/libgcc49 \ |
pascal@17846 | 55 --with-pkgversion="$pkgversion" \ |
al@20472 | 56 --disable-multilib \ |
al@20472 | 57 $ARCH_ARGS \ |
al@20472 | 58 $CONFIGURE_ARGS && |
pascal@17846 | 59 make && 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 } |