wok-next view gcc54/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
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gcc54"
4 VERSION="5.4.0"
5 CATEGORY="development"
6 SHORT_DESC="The GNU Compiler Collection"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://gcc.gnu.org/"
10 REPOLOGY="gcc"
12 TARBALL="gcc-$VERSION.tar.bz2"
13 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
15 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
16 # for cookutils that are not used by tazwok/cook-toolchain since it installs
17 # and uses its own copy.
18 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
19 SPLIT="$PACKAGE-lib-base"
21 compile_rules() {
22 case $ARCH in
23 i?86) ARCH_ARGS="--with-tune=$ARCH";;
24 x86_64) ARCH_ARGS="--with-tune=nocona";;
25 esac
27 pkgversion="SliTaz"
28 languages="c,c++"
30 # Use libiberty.a from binutils.
31 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
33 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
35 mkdir -p ../gcc-build && cd ../gcc-build
37 $src/configure \
38 --libexecdir=/usr/lib \
39 --enable-nls \
40 --enable-languages=$languages \
41 --enable-shared \
42 --with-system-zlib \
43 --enable-clocale=gnu \
44 --enable-objc-gc \
45 --enable-__cxa_atexit \
46 --enable-lto \
47 --enable-threads=posix \
48 --disable-bootstrap \
49 --program-suffix=-54 \
50 --libdir=/usr/libgcc54 \
51 --with-pkgversion="$pkgversion" \
52 --disable-multilib \
53 $ARCH_ARGS \
54 $CONFIGURE_ARGS &&
55 make &&
56 make install
57 }
59 genpkg_rules() {
60 case $PACKAGE in
61 gcc54)
62 mkdir -p $fs/usr/share
63 cp -a $install/usr/bin $fs/usr
65 # Copy all libs. Do not hide gcc-lib-base.
66 cp -a $install/usr/lib* $fs/usr
68 # Include files.
69 cp -a $install/usr/include $fs/usr
71 # Remove build directory.
72 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
73 rm -rf $WOK/$PACKAGE/$PACKAGE-build
74 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
75 TAGS="compiler C C++"
76 ;;
77 gcc54-lib-base)
78 mkdir -p $fs/usr/lib
79 cp -a $install/usr/libgcc54/libgcc_s.so* $fs/usr/lib
80 cp -a $install/usr/libgcc54/libstdc++.so* $fs/usr/lib
81 rm -f $fs/usr/lib/*-gdb.py
82 CAT="development|base libraries, libgcc_s and libstdc++"
83 PROVIDE="gcc-lib-base"
84 ;;
85 esac
86 }
88 post_remove_gcc54_lib_base() {
89 cd "$1/usr/lib"
90 ln -s libstdc++.so.6.*.* libstdc++.so.6
91 ln -s libstdc++.so.6.*.* libstdc++.so
92 cd - >/dev/null
93 }