wok view gcc/receipt @ rev 23382

updated perl-number-compare (0.01 -> 0.03)
author Hans-G?nter Theisgen
date Tue Mar 31 14:53:05 2020 +0100 (2020-03-31)
parents 95758c7d1a56
children 95e974a939f1
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc"
4 VERSION="4.6.3"
5 CATEGORY="development"
6 SHORT_DESC="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 installs
17 # and uses its 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 --disable-bootstrap \
67 ${CONFIGURE_ARGS} &&
68 make && make install ;;
69 *)
70 # Used by default to produce a full featured X86 GCC compiler.
71 echo "cook: configure GCC for: final/full build"
72 $src/configure \
73 --libexecdir=/usr/lib \
74 --enable-nls \
75 --enable-languages=${languages} \
76 --enable-shared \
77 --with-system-zlib \
78 --enable-clocale=gnu \
79 --enable-objc-gc \
80 --enable-__cxa_atexit \
81 --enable-lto \
82 --enable-threads=posix \
83 --disable-bootstrap \
84 --with-pkgversion="$pkgversion" \
85 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
86 make && make install ;;
87 esac
88 }
90 # Rules to gen a SliTaz package suitable for Tazpkg.
91 genpkg_rules()
92 {
93 mkdir -p $fs/usr/share
94 cp -a $install/usr/bin $fs/usr
96 # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in
97 # the gcc-lib-base package.
98 cp -a $install/usr/lib $fs/usr
99 rm -f $fs/usr/lib/libgcc_s.so*
100 rm -f $fs/usr/lib/libstdc++.so*
101 rm -f $fs/usr/lib/libgomp.so*
102 rm -f $fs/usr/lib/libobjc.so*
104 # Include files.
105 cp -a $install/usr/include $fs/usr
107 # Gfortran goes in gfortran package.
108 rm -f $fs/usr/bin/*gfortran
109 rm -f $fs/usr/lib/libgfortran*
110 rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
111 rm -rf $fs/usr/lib/gcc/*/$VERSION/f*
113 # Remove build directory.
114 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
115 rm -rf $WOK/$PACKAGE/$PACKAGE-build
116 }
118 # Post install commands for Tazpkg.
119 post_install()
120 {
121 [ -f "$1/lib/cpp" ] ||
122 ln -s ../usr/bin/cpp "$1/lib"
123 [ -f "$1/usr/bin/cc" ] ||
124 ln -s gcc "$1/usr/bin/cc"
125 }