wok-next view gcc54/receipt @ rev 20457

Tiny edits
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 02 11:13:24 2018 +0200 (2018-03-02)
parents c3a368c0cddb
children 3e3205b3b68f
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="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"
14 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
15 # for cookutils that are not used by tazwok/cook-toolchain since it installs
16 # and uses its own copy.
17 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
18 SPLIT="gcc54-lib-base"
20 compile_rules() {
21 ARCH_ARGS="--with-tune=$ARCH"
22 pkgversion="SliTaz"
23 languages="c,c++"
25 # Use libiberty.a from binutils.
26 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
28 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
30 mkdir -p ../gcc-build && cd ../gcc-build
32 $src/configure \
33 --libexecdir=/usr/lib \
34 --enable-nls \
35 --enable-languages=${languages} \
36 --enable-shared \
37 --with-system-zlib \
38 --enable-clocale=gnu \
39 --enable-objc-gc \
40 --enable-__cxa_atexit \
41 --enable-lto \
42 --enable-threads=posix \
43 --disable-bootstrap \
44 --program-suffix=-54 \
45 --libdir=/usr/libgcc54 \
46 --with-pkgversion="$pkgversion" \
47 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
48 make && make install
49 }
51 genpkg_rules() {
52 case $PACKAGE in
53 gcc54)
54 mkdir -p $fs/usr/share
55 cp -a $install/usr/bin $fs/usr
57 # Copy all libs. Do not hide gcc-lib-base.
58 cp -a $install/usr/lib* $fs/usr
60 # Include files.
61 cp -a $install/usr/include $fs/usr
63 # Remove build directory.
64 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
65 rm -rf $WOK/$PACKAGE/$PACKAGE-build
66 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
67 TAGS="compiler C C++"
68 ;;
69 gcc54-lib-base)
70 mkdir -p $fs/usr/lib
71 cp -a $install/usr/libgcc54/libgcc_s.so* $fs/usr/lib
72 cp -a $install/usr/libgcc54/libstdc++.so* $fs/usr/lib
73 rm -f $fs/usr/lib/*-gdb.py
74 CAT="development|base libraries, libgcc_s and libstdc++"
75 PROVIDE="gcc-lib-base"
76 ;;
77 esac
78 }
80 post_remove_gcc54_lib_base() {
81 cd "$1/usr/lib"
82 ln -s libstdc++.so.6.*.* libstdc++.so.6
83 ln -s libstdc++.so.6.*.* libstdc++.so
84 cd - >/dev/null
85 }