wok view gcc49/receipt @ rev 25609

Update some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 20 14:03:05 2023 +0000 (10 months ago)
parents 52649f27a0da
children
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc49"
4 SOURCE="gcc"
5 VERSION="4.9.2"
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 - https://ftp.gnu.org/gnu/$SOURCE/ 2>/dev/null | \
25 wget -O - https://ftp.gnu.org/gnu/gcc/ 2>/dev/null | \
26 sed '/gcc-4\.9/!d;s|.*gcc-||;s|.t.*||;s|/.*||' | sort -Vr | sed q
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 ARCH_ARGS="--with-tune=$ARCH"
33 pkgversion="SliTaz"
34 languages="c,c++"
36 # Use libiberty.a from binutils.
37 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
39 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
41 mkdir -p ../gcc-build && cd ../gcc-build
43 $src/configure \
44 --libexecdir=/usr/lib \
45 --enable-nls \
46 --enable-languages=${languages} \
47 --enable-shared \
48 --with-system-zlib \
49 --enable-clocale=gnu \
50 --enable-objc-gc \
51 --enable-__cxa_atexit \
52 --enable-lto \
53 --enable-threads=posix \
54 --disable-bootstrap \
55 --program-suffix=-49 \
56 --libdir=/usr/libgcc49 \
57 --with-pkgversion="$pkgversion" \
58 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
59 make && make install
60 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 mkdir -p $fs/usr/share
66 cp -a $install/usr/bin $fs/usr
68 # Copy all libs. Do not hide gcc-lib-base.
69 cp -a $install/usr/lib* $fs/usr
71 # Include files.
72 cp -a $install/usr/include $fs/usr
74 # Remove build directory.
75 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
76 rm -rf $WOK/$PACKAGE/$PACKAGE-build
77 }