wok-next view gcc61/receipt @ rev 21469

updated tinc (1.0.25 -> 1.0.36)
author Hans-G?nter Theisgen
date Wed May 13 07:41:00 2020 +0100 (2020-05-13)
parents d958fec46c9f
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gcc61"
4 VERSION="6.1.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)
24 ARCH_ARGS="--with-tune=$ARCH"
25 export CFLAGS="-march=i486 -Os -pipe"
26 export CXXFLAGS="$CFLAGS"
27 ;;
28 x86_64)
29 ARCH_ARGS="--with-tune=nocona"
30 export CFLAGS="-march=nocona -Os -pipe"
31 export CXXFLAGS="$CFLAGS"
32 ;;
33 esac
35 echo "CFLAGS : $CFLAGS"
36 echo "LDFLAGS : $LDFLAGS"
38 pkgversion="SliTaz"
39 languages="c,c++"
41 # Use libiberty.a from binutils.
42 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
44 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
46 mkdir -p ../gcc-build && cd ../gcc-build
48 $src/configure \
49 --libexecdir=/usr/lib \
50 --enable-nls \
51 --enable-languages=$languages \
52 --enable-shared \
53 --with-system-zlib \
54 --enable-clocale=gnu \
55 --enable-objc-gc \
56 --enable-__cxa_atexit \
57 --enable-lto \
58 --enable-threads=posix \
59 --disable-bootstrap \
60 --program-suffix=-61 \
61 --libdir=/usr/libgcc61 \
62 --with-pkgversion="$pkgversion" \
63 --disable-multilib \
64 $ARCH_ARGS \
65 $CONFIGURE_ARGS &&
66 make &&
67 make install
68 }
70 genpkg_rules() {
71 case $PACKAGE in
72 gcc61)
73 mkdir -p $fs/usr/share
74 cp -a $install/usr/bin $fs/usr
76 # Copy all libs. Do not hide gcc-lib-base.
77 cp -a $install/usr/lib* $fs/usr
79 # Include files.
80 cp -a $install/usr/include $fs/usr
82 # Remove build directory.
83 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
84 rm -rf $WOK/$PACKAGE/$PACKAGE-build
85 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
86 TAGS="compiler C C++"
87 ;;
88 gcc61-lib-base)
89 mkdir -p $fs/usr/lib
90 cp -a $install/usr/libgcc61/libgcc_s.so* $fs/usr/lib
91 cp -a $install/usr/libgcc61/libstdc++.so* $fs/usr/lib
92 rm -f $fs/usr/lib/*-gdb.py
93 CAT="development|base libraries, libgcc_s and libstdc++"
94 PROVIDE="gcc-lib-base"
95 ;;
96 esac
97 }
99 post_remove_gcc61_lib_base() {
100 cd "$1/usr/lib"
101 ln -s libstdc++.so.6.*.* libstdc++.so.6
102 ln -s libstdc++.so.6.*.* libstdc++.so
103 cd - >/dev/null
104 }