wok-current view gcc49/receipt @ rev 25713

Up abiword (3.0.5), libwmf (0.2.13), fix wv url
author Stanislas Leduc <shann@slitaz.org>
date Fri Jun 14 11:35:21 2024 +0000 (2 months ago)
parents 1336870a9462
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 - $GNU_MIRROR/$SOURCE 2>/dev/null | \
25 sed '/gcc-4\.9/!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 with gcc >= 6
41 patch -p1 < $stuff/build_with_gcc6.patch
42 # Patch to build with gcc >= 8
43 # see https://aur.archlinux.org/packages/gcc49
44 # see https://patchwork.ozlabs.org/project/gcc/patch/alpine.DEB.2.20.1706271356170.15648@digraph.polyomino.org.uk
45 patch -p1 < $stuff/build_with_gcc8.patch
46 patch -p1 < $stuff/build_with_gcc8-1.patch
47 patch -p1 < $stuff/build_with_glibc-2.28.patch
49 mkdir -p ../gcc-build && cd ../gcc-build
51 $src/configure \
52 --libexecdir=/usr/lib \
53 --enable-nls \
54 --enable-languages=${languages} \
55 --enable-shared \
56 --with-system-zlib \
57 --enable-clocale=gnu \
58 --enable-objc-gc \
59 --enable-__cxa_atexit \
60 --enable-lto \
61 --enable-threads=posix \
62 --disable-bootstrap \
63 --program-suffix=-49 \
64 --libdir=/usr/libgcc49 \
65 --with-pkgversion="$pkgversion" \
66 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
67 make && make install
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 mkdir -p $fs/usr/share
74 cp -a $install/usr/bin $fs/usr
76 # Copy all libs. Do not hide gcc-lib-base.
77 cp -a $install/usr/lib* $fs/usr
79 # Include files.
80 cp -a $install/usr/include $fs/usr
82 # Remove build directory.
83 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
84 rm -rf $WOK/$PACKAGE/$PACKAGE-build
85 }