wok-current view gcc/receipt @ rev 24684
updated jansson and jansson-dev (2.12 -> 2.14)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Mar 12 10:51:35 2022 +0100 (2022-03-12) |
parents | 95e974a939f1 |
children | 7d24d697015f |
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 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
16 BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev"
18 # Handle cross compilation (native i486/ARM gcc)
19 case "$ARCH" in
20 i?86)
21 ARCH_ARGS="--with-tune=$ARCH"
22 pkgversion="SliTaz"
23 languages="c,c++,objc,fortran" ;;
24 arm*)
25 pkgversion="SliTaz ARM"
26 languages="c,c++" ;;
27 esac
29 # What is the latest version available today?
30 current_version()
31 {
32 wget -O - 'https://gcc.gnu.org/git/?p=gcc.git;a=summary' 2>/dev/null | \
33 sed '/ release/!d;s|.*GCC ||;s| release.*||' | sort -Vr | sed q
34 }
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 # Package slitaz-toolchain use 'cook --options' when rebuilding
40 # the full SliTaz toolchain.
41 [ "$2" = "--first-pass" ] && opt=$2
42 [ "$3" = "--first-pass" ] && opt=$3
44 # Use libiberty.a from binutils.
45 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
47 case "$ARCH" in
48 i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
49 esac
51 #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
53 mkdir -p ../gcc-build && cd ../gcc-build
55 # This is the default GCC and we want a native build to cross compile after.
56 # SliTaz target i486 host so we need a native i486 build for GCC.
57 case "$opt" in
58 --first-pass)
59 # Used by slitaz-toolchain when rebuilding the full toolchain.
60 echo "cook: configure GCC for: toolchain first pass"
61 $src/configure \
62 --libexecdir=/usr/lib \
63 --disable-nls \
64 --enable-shared \
65 --enable-languages=c,c++ \
66 --disable-libstdcxx-pch \
67 --enable-__cxa_atexit \
68 --enable-clocale=gnu \
69 --enable-threads=posix \
70 --disable-bootstrap \
71 ${CONFIGURE_ARGS} &&
72 make && make install ;;
73 *)
74 # Used by default to produce a full featured X86 GCC compiler.
75 echo "cook: configure GCC for: final/full build"
76 $src/configure \
77 --libexecdir=/usr/lib \
78 --enable-nls \
79 --enable-languages=${languages} \
80 --enable-shared \
81 --with-system-zlib \
82 --enable-clocale=gnu \
83 --enable-objc-gc \
84 --enable-__cxa_atexit \
85 --enable-lto \
86 --enable-threads=posix \
87 --disable-bootstrap \
88 --with-pkgversion="$pkgversion" \
89 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
90 make && make install ;;
91 esac
92 }
94 # Rules to gen a SliTaz package suitable for Tazpkg.
95 genpkg_rules()
96 {
97 mkdir -p $fs/usr/share
98 cp -a $install/usr/bin $fs/usr
100 # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in
101 # the gcc-lib-base package.
102 cp -a $install/usr/lib $fs/usr
103 rm -f $fs/usr/lib/libgcc_s.so*
104 rm -f $fs/usr/lib/libstdc++.so*
105 rm -f $fs/usr/lib/libgomp.so*
106 rm -f $fs/usr/lib/libobjc.so*
108 # Include files.
109 cp -a $install/usr/include $fs/usr
111 # Gfortran goes in gfortran package.
112 rm -f $fs/usr/bin/*gfortran
113 rm -f $fs/usr/lib/libgfortran*
114 rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
115 rm -rf $fs/usr/lib/gcc/*/$VERSION/f*
117 # Remove build directory.
118 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
119 rm -rf $WOK/$PACKAGE/$PACKAGE-build
120 }
122 # Post install commands for Tazpkg.
123 post_install()
124 {
125 [ -f "$1/lib/cpp" ] ||
126 ln -s ../usr/bin/cpp "$1/lib"
127 [ -f "$1/usr/bin/cc" ] ||
128 ln -s gcc "$1/usr/bin/cc"
129 }