wok-next view gcc49/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="gcc49"
4 VERSION="4.9.2"
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"
14 TAGS="compiler C C++"
16 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
17 # for cookutils that are not used by tazwok/cook-toolchain since it installs
18 # and uses its own copy.
19 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
20 SPLIT="$PACKAGE-lib-base"
22 compile_rules() {
23 case $ARCH in
24 i?86) ARCH_ARGS="--with-tune=$ARCH";;
25 x86_64) ARCH_ARGS="--with-tune=nocona";;
26 esac
27 pkgversion="SliTaz"
28 languages="c,c++"
30 patch -p1 < $stuff/cfns.gperf.u
32 # Use libiberty.a from binutils.
33 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
35 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
37 mkdir build
38 cd build
40 $src/configure \
41 --libexecdir=/usr/lib \
42 --enable-nls \
43 --enable-languages=$languages \
44 --enable-shared \
45 --with-system-zlib \
46 --enable-clocale=gnu \
47 --enable-objc-gc \
48 --enable-__cxa_atexit \
49 --enable-lto \
50 --enable-threads=posix \
51 --disable-bootstrap \
52 --program-suffix=-49 \
53 --libdir=/usr/libgcc49 \
54 --with-pkgversion="$pkgversion" \
55 --disable-multilib \
56 $ARCH_ARGS \
57 $CONFIGURE_ARGS &&
58 make &&
59 make install
60 }
62 genpkg_rules() {
63 case $PACKAGE in
64 gcc49)
65 mkdir -p $fs/usr/share
66 cp -a $install/usr/bin $fs/usr
68 # Copy all libs. Do not hide gcc-lib-base.
69 cp -a $install/usr/lib* $fs/usr
71 # Include files.
72 cp -a $install/usr/include $fs/usr
73 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
74 ;;
75 gcc49-lib-base)
76 mkdir -p $fs/usr/lib
77 cp -a $install/usr/libgcc49/libgcc_s.so* $fs/usr/lib
78 cp -a $install/usr/libgcc49/libstdc++.so* $fs/usr/lib
79 rm -f $fs/usr/lib/*-gdb.py
80 CAT="development|GCC base libraries, libgcc_s and libstdc++"
81 PROVIDE="gcc-lib-base"
82 ;;
83 esac
84 }
86 post_remove_gcc49_lib_base() {
87 cd "$1/usr/lib"
88 ln -s libstdc++.so.6.*.* libstdc++.so.6
89 ln -s libstdc++.so.6.*.* libstdc++.so
90 cd - >/dev/null
91 }