wok annotate gcc49/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (2022-05-21)
parents 95758c7d1a56
children d79ed38ace18
rev   line source
pascal@17845 1 # SliTaz package receipt.
pascal@17845 2
pascal@17845 3 PACKAGE="gcc49"
pascal@17845 4 SOURCE="gcc"
pascal@17845 5 VERSION="4.9.2"
pascal@17845 6 CATEGORY="development"
erkan@19462 7 SHORT_DESC="The GNU Compiler Collection."
pascal@17845 8 MAINTAINER="pankso@slitaz.org"
pascal@17845 9 LICENSE="GPL2"
pascal@17845 10 TARBALL="$SOURCE-$VERSION.tar.bz2"
pascal@17845 11 WEB_SITE="http://gcc.gnu.org/"
pascal@17845 12 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
pascal@17846 13 TAGS="compiler C C++"
pascal@17845 14
pascal@17845 15 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
erkan@19462 16 # for cookutils that are not used by tazwok/cook-toolchain since it installs
erkan@19462 17 # and uses its own copy.
pascal@17845 18 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
pascal@17845 19 BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev"
pascal@17845 20
pascal@24694 21 # What is the latest version available today?
pascal@24694 22 current_version()
pascal@24694 23 {
pascal@24694 24 wget -O - $GNU_MIRROR/$SOURCE 2>/dev/null | \
pascal@24694 25 sed '/gcc-4\.9/!d;s|.*gcc-||;s|.t.*||;s|/.*||' | sort -Vr | sed q
pascal@24694 26 }
pascal@24694 27
pascal@17845 28 # Rules to configure and make the package.
pascal@17845 29 compile_rules()
pascal@17845 30 {
pascal@17846 31 ARCH_ARGS="--with-tune=$ARCH"
pascal@17846 32 pkgversion="SliTaz"
pascal@17846 33 languages="c,c++"
pascal@17845 34
pascal@17845 35 # Use libiberty.a from binutils.
pascal@17845 36 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
pascal@17845 37
pascal@17846 38 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
pascal@17845 39
pascal@17845 40 mkdir -p ../gcc-build && cd ../gcc-build
pascal@17845 41
pascal@17846 42 $src/configure \
pascal@17846 43 --libexecdir=/usr/lib \
pascal@17846 44 --enable-nls \
pascal@17846 45 --enable-languages=${languages} \
pascal@17846 46 --enable-shared \
pascal@17846 47 --with-system-zlib \
pascal@17846 48 --enable-clocale=gnu \
pascal@17846 49 --enable-objc-gc \
pascal@17846 50 --enable-__cxa_atexit \
pascal@17846 51 --enable-lto \
pascal@17846 52 --enable-threads=posix \
pascal@17846 53 --disable-bootstrap \
pascal@17846 54 --program-suffix=-49 \
pascal@17849 55 --libdir=/usr/libgcc49 \
pascal@17846 56 --with-pkgversion="$pkgversion" \
pascal@17846 57 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
pascal@17846 58 make && make install
pascal@17845 59 }
pascal@17845 60
pascal@17845 61 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@17845 62 genpkg_rules()
pascal@17845 63 {
pascal@17845 64 mkdir -p $fs/usr/share
pascal@17845 65 cp -a $install/usr/bin $fs/usr
pascal@17845 66
pascal@17847 67 # Copy all libs. Do not hide gcc-lib-base.
pascal@17849 68 cp -a $install/usr/lib* $fs/usr
pascal@17845 69
pascal@17845 70 # Include files.
pascal@17845 71 cp -a $install/usr/include $fs/usr
pascal@17845 72
pascal@17845 73 # Remove build directory.
pascal@17845 74 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
pascal@17845 75 rm -rf $WOK/$PACKAGE/$PACKAGE-build
pascal@17845 76 }