wok-next view gcc49/receipt @ rev 20459
Combine receipts
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 02 13:45:43 2018 +0200 (2018-03-02) |
parents | 2e2e559396b5 |
children | 3e3205b3b68f |
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="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://gcc.gnu.org/"
11 TARBALL="gcc-$VERSION.tar.bz2"
12 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
13 TAGS="compiler C C++"
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="gcc49-lib-base"
21 compile_rules() {
22 ARCH_ARGS="--with-tune=$ARCH"
23 pkgversion="SliTaz"
24 languages="c,c++"
26 patch -p1 < $stuff/cfns.gperf.u
28 # Use libiberty.a from binutils.
29 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
31 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
33 mkdir -p ../gcc-build && cd ../gcc-build
35 $src/configure \
36 --libexecdir=/usr/lib \
37 --enable-nls \
38 --enable-languages=${languages} \
39 --enable-shared \
40 --with-system-zlib \
41 --enable-clocale=gnu \
42 --enable-objc-gc \
43 --enable-__cxa_atexit \
44 --enable-lto \
45 --enable-threads=posix \
46 --disable-bootstrap \
47 --program-suffix=-49 \
48 --libdir=/usr/libgcc49 \
49 --with-pkgversion="$pkgversion" \
50 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
51 make && make install
52 }
54 genpkg_rules() {
55 case $PACKAGE in
56 gcc49)
57 mkdir -p $fs/usr/share
58 cp -a $install/usr/bin $fs/usr
60 # Copy all libs. Do not hide gcc-lib-base.
61 cp -a $install/usr/lib* $fs/usr
63 # Include files.
64 cp -a $install/usr/include $fs/usr
65 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
66 ;;
67 gcc49-lib-base)
68 mkdir -p $fs/usr/lib
69 cp -a $install/usr/libgcc49/libgcc_s.so* $fs/usr/lib
70 cp -a $install/usr/libgcc49/libstdc++.so* $fs/usr/lib
71 rm -f $fs/usr/lib/*-gdb.py
72 CAT="development|GCC base libraries, libgcc_s and libstdc++"
73 PROVIDE="gcc-lib-base"
74 ;;
75 esac
76 }
78 post_remove_gcc49_lib_base() {
79 cd "$1/usr/lib"
80 ln -s libstdc++.so.6.*.* libstdc++.so.6
81 ln -s libstdc++.so.6.*.* libstdc++.so
82 cd - >/dev/null
83 }