wok-current view gcc63/receipt @ rev 25685

Add checkspace / fetchall feature for tazpkg
author Stanislas Leduc <shann@slitaz.org>
date Thu Mar 14 20:28:39 2024 +0000 (8 months ago)
parents 52649f27a0da
children
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc63"
4 SOURCE="gcc"
5 VERSION="6.3.0"
6 CATEGORY="development"
7 SHORT_DESC="The GNU Compiler Collection."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="GPL2"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://gcc.gnu.org/"
12 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
13 TAGS="compiler C C++"
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 # What is the latest version available today?
22 current_version()
23 {
24 wget -O - $GNU_MIRROR/$SOURCE 2>/dev/null | \
25 sed '/gcc-6\.3/!d;s|.*gcc-||;s|.t.*||;s|/.*||' | sort -Vr | sed q
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 ARCH_ARGS="--with-tune=$ARCH"
32 pkgversion="SliTaz"
33 languages="c,c++"
35 # Use libiberty.a from binutils.
36 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
38 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
40 # Patch to build gcc 6.3.0 with gcc >= 8.x
41 patch -p1 < $stuff/fix-build-with-gcc8-1.patch
42 patch -p1 < $stuff/fix-build-with-gcc8-2.patch
43 patch -p1 < $stuff/fix-build-with-gcc8-3.patch
45 # Patch to build with glibc 2.28
46 patch -p1 < $stuff/fix-build-with-glibc-2.28.patch
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=-63 \
63 --libdir=/usr/libgcc63 \
64 --with-pkgversion="$pkgversion" \
65 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
66 make && make install
67 }
69 # Rules to gen a SliTaz package suitable for Tazpkg.
70 genpkg_rules()
71 {
72 mkdir -p $fs/usr/share
73 cp -a $install/usr/bin $fs/usr
75 # Copy all libs. Do not hide gcc-lib-base.
76 cp -a $install/usr/lib* $fs/usr
78 # Include files.
79 cp -a $install/usr/include $fs/usr
81 # Remove build directory.
82 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
83 rm -rf $WOK/$PACKAGE/$PACKAGE-build
84 }