wok-undigest view gcc/receipt @ rev 1228

updated glib and glib-dev (2.43.3 -> 2.62.4)
author Hans-G?nter Theisgen
date Wed Sep 09 13:48:24 2020 +0100 (2020-09-09)
parents da0c9f40135c
children
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc"
4 VERSION="4.9.2"
5 CATEGORY="development"
6 SHORT_DESC="The the GNU Compiler Collection."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://gcc.gnu.org/"
11 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
12 TAGS="compiler C"
13 #HOST_ARCH="i486 arm"
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 install
17 # and use it's own copy.
18 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
19 BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev"
21 # Handle cross compilation (native i486/ARM gcc)
22 case "$ARCH" in
23 i?86)
24 ARCH_ARGS="--with-tune=$ARCH"
25 pkgversion="SliTaz"
26 languages="c,c++,objc,fortran" ;;
27 arm*)
28 pkgversion="SliTaz ARM"
29 languages="c,c++" ;;
30 esac
32 # Rules to configure and make the package.
33 compile_rules()
34 {
35 # Package slitaz-toolchain use 'cook --options' when rebuilding
36 # the full SliTaz toolchain.
37 [ "$2" = "--first-pass" ] && opt=$2
38 [ "$3" = "--first-pass" ] && opt=$3
40 # Use libiberty.a from binutils.
41 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
43 case "$ARCH" in
44 i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
45 esac
47 #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
49 mkdir -p ../gcc-build && cd ../gcc-build
51 # This is the default GCC and we want a native build to cross compile after.
52 # SliTaz target i486 host so we need a native i486 build for GCC.
53 case "$opt" in
54 --first-pass)
55 # Used by slitaz-toolchain when rebuilding the full toolchain.
56 echo "cook: configure GCC for: toolchain first pass"
57 $src/configure \
58 --libexecdir=/usr/lib \
59 --disable-nls \
60 --enable-shared \
61 --enable-languages=c,c++ \
62 --disable-libstdcxx-pch \
63 --enable-__cxa_atexit \
64 --enable-clocale=gnu \
65 --enable-threads=posix \
66 --with-tune=i686 \
67 --disable-bootstrap \
68 ${CONFIGURE_ARGS} &&
69 make && make install ;;
70 *)
71 # Used by default to produce a full featured X86 GCC compiler.
72 echo "cook: configure GCC for: final/full build"
73 $src/configure \
74 --libexecdir=/usr/lib \
75 --enable-nls \
76 --enable-languages=${languages} \
77 --enable-shared \
78 --with-system-zlib \
79 --enable-clocale=gnu \
80 --enable-objc-gc \
81 --enable-__cxa_atexit \
82 --enable-lto \
83 --enable-threads=posix \
84 --with-tune=i686 \
85 --disable-bootstrap \
86 --with-pkgversion="$pkgversion" \
87 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
88 make && make install ;;
89 esac
90 }
92 # Rules to gen a SliTaz package suitable for Tazpkg.
93 genpkg_rules()
94 {
95 mkdir -p $fs/usr/share
96 cp -a $install/usr/bin $fs/usr
98 # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in
99 # the gcc-lib-base package.
100 cp -a $install/usr/lib $fs/usr
101 rm -f $fs/usr/lib/libgcc_s.so*
102 rm -f $fs/usr/lib/libstdc++.so*
103 rm -f $fs/usr/lib/libgomp.so*
104 rm -f $fs/usr/lib/libobjc.so*
106 # Include files.
107 cp -a $install/usr/include $fs/usr
109 # Gfortran goes in gfortran package.
110 rm -f $fs/usr/bin/*gfortran
111 rm -f $fs/usr/lib/libgfortran*
112 rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
113 rm -rf $fs/usr/lib/gcc/*/$VERSION/f*
115 # Remove build directory.
116 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
117 rm -rf $WOK/$PACKAGE/$PACKAGE-build
118 }
120 # Post install commands for Tazpkg.
121 post_install()
122 {
123 local root
124 root=$1
125 echo "Processing post-install commands..."
126 if [ ! -f "$root/lib/cpp" ]; then
127 ln -s ../usr/bin/cpp $root/lib
128 fi
129 if [ ! -f "$root/usr/bin/cc" ]; then
130 ln -s gcc $root/usr/bin/cc
131 fi
132 }