wok-undigest rev 1241

added recipe for gcc83
author Hans-G?nter Theisgen
date Sat Aug 06 17:40:20 2022 +0100 (21 months ago)
parents 6bf11a4e072c
children 7510d110862e
files gcc83/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gcc83/receipt	Sat Aug 06 17:40:20 2022 +0100
     1.3 @@ -0,0 +1,80 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="gcc83"
     1.7 +SOURCE="gcc"
     1.8 +VERSION="8.3.0"
     1.9 +CATEGORY="development"
    1.10 +TAGS="compiler C C++"
    1.11 +SHORT_DESC="The GNU Compiler Collection."
    1.12 +MAINTAINER="pankso@slitaz.org"
    1.13 +LICENSE="GPL2"
    1.14 +WEB_SITE="https://gcc.gnu.org/"
    1.15 +
    1.16 +TARBALL="$SOURCE-$VERSION.tar.xz"
    1.17 +WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
    1.18 +
    1.19 +# We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
    1.20 +# for cookutils that are not used by tazwok/cook-toolchain since it installs
    1.21 +# and uses its own copy.
    1.22 +DEPENDS="binutils elfutils gcc-lib-base libgomp libobjc mpc-library"
    1.23 +BUILD_DEPENDS="elfutils-dev gmp-dev mpc-library mpfr-dev"
    1.24 +
    1.25 +# What is the latest version available today?
    1.26 +current_version()
    1.27 +{
    1.28 +	wget -O - $GNU_MIRROR/$SOURCE 2>/dev/null | \
    1.29 +	sed '/gcc-8\.3/!d;s|.*gcc-||;s|.t.*||;s|/.*||' | sort -Vr | sed q
    1.30 +}
    1.31 +
    1.32 +# Rules to configure and make the package.
    1.33 +compile_rules()
    1.34 +{
    1.35 +	ARCH_ARGS="--with-tune=$ARCH"
    1.36 +	pkgversion="SliTaz"
    1.37 +	languages="c,c++"
    1.38 +
    1.39 +	# Use libiberty.a from binutils.
    1.40 +	sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
    1.41 +
    1.42 +	sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
    1.43 +
    1.44 +	mkdir -p ../gcc-build && cd ../gcc-build
    1.45 +
    1.46 +	sed -i 's|\(add-gnu-debuglink.*\);|\1 2> /dev/null;|' \
    1.47 +		$src/libbacktrace/configure*
    1.48 +	$src/configure \
    1.49 +		--libexecdir=/usr/lib \
    1.50 +		--enable-nls \
    1.51 +		--enable-languages=${languages} \
    1.52 +		--enable-shared \
    1.53 +		--with-system-zlib \
    1.54 +		--enable-clocale=gnu \
    1.55 +		--enable-objc-gc \
    1.56 +		--enable-__cxa_atexit \
    1.57 +		--enable-lto \
    1.58 +		--enable-threads=posix \
    1.59 +		--disable-bootstrap \
    1.60 +		--program-suffix=-${PACKAGE#gcc} \
    1.61 +		--libdir=/usr/libgcc${PACKAGE#gcc} \
    1.62 +		--with-pkgversion="$pkgversion" \
    1.63 +		${CONFIGURE_ARGS} ${ARCH_ARGS} &&
    1.64 +	make -j 1 &&
    1.65 +	make install
    1.66 +}
    1.67 +
    1.68 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.69 +genpkg_rules()
    1.70 +{
    1.71 +	mkdir -p  $fs/usr/share
    1.72 +	cp -a $install/usr/bin $fs/usr
    1.73 +
    1.74 +	# Copy all libs. Do not hide gcc-lib-base.
    1.75 +	cp -a $install/usr/lib* $fs/usr
    1.76 +
    1.77 +	# Include files.
    1.78 +	cp -a $install/usr/include $fs/usr
    1.79 +
    1.80 +	# Remove build directory.
    1.81 +	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
    1.82 +	rm -rf $WOK/$PACKAGE/$PACKAGE-build
    1.83 +}