wok-next view gcc6/receipt @ rev 20636
Fix "can't execute '/usr/bin/update-mime-database': No such file or directory"
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Apr 27 15:12:17 2018 +0300 (2018-04-27) |
parents | |
children | d958fec46c9f |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gcc6"
4 VERSION="6.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.xz"
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="gcc6-lib-base"
20 compile_rules() {
21 case $ARCH in
22 arm*)
23 ARCH_ARGS="--with-tune=armv6"
24 ;;
25 i?86)
26 ARCH_ARGS="--with-tune=$ARCH"
27 export CFLAGS="-march=i486 -Os -pipe"
28 export CXXFLAGS="$CFLAGS"
29 ;;
30 x86_64)
31 ARCH_ARGS="--with-tune=nocona"
32 export CFLAGS="-march=nocona -Os -pipe"
33 export CXXFLAGS="$CFLAGS"
34 ;;
35 esac
37 echo "CFLAGS : $CFLAGS"
38 echo "LDFLAGS : $LDFLAGS"
40 pkgversion="SliTaz"
41 languages="c,c++"
43 # Use libiberty.a from binutils.
44 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
46 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
48 mkdir -p ../gcc-build && cd ../gcc-build
50 $src/configure \
51 --libexecdir=/usr/lib \
52 --enable-nls \
53 --enable-languages=${languages} \
54 --enable-shared \
55 --with-system-zlib \
56 --enable-clocale=gnu \
57 --enable-objc-gc \
58 --enable-__cxa_atexit \
59 --enable-lto \
60 --enable-threads=posix \
61 --disable-bootstrap \
62 --program-suffix=-6 \
63 --libdir=/usr/libgcc6 \
64 --with-pkgversion="$pkgversion" \
65 --disable-multilib \
66 $ARCH_ARGS \
67 $CONFIGURE_ARGS &&
68 make && make install
69 }
71 genpkg_rules() {
72 case $PACKAGE in
73 gcc6)
74 mkdir -p $fs/usr/share
75 cp -a $install/usr/bin $fs/usr
77 # Copy all libs. Do not hide gcc-lib-base.
78 cp -a $install/usr/lib* $fs/usr
80 # Include files.
81 cp -a $install/usr/include $fs/usr
83 # Remove build directory.
84 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
85 rm -rf $WOK/$PACKAGE/$PACKAGE-build
86 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
87 TAGS="compiler C C++"
88 ;;
89 gcc6-lib-base)
90 mkdir -p $fs/usr/lib
91 cp -a $install/usr/libgcc61/libgcc_s.so* $fs/usr/lib
92 cp -a $install/usr/libgcc61/libstdc++.so* $fs/usr/lib
93 rm -f $fs/usr/lib/*-gdb.py
94 CAT="development|base libraries, libgcc_s and libstdc++"
95 PROVIDE="gcc-lib-base"
96 ;;
97 esac
98 }
100 post_remove_gcc61_lib_base() {
101 cd "$1/usr/lib"
102 ln -s libstdc++.so.6.*.* libstdc++.so.6
103 ln -s libstdc++.so.6.*.* libstdc++.so
104 cd - >/dev/null
105 }