wok-next diff gcc49/receipt @ rev 20459

Combine receipts
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 02 13:45:43 2018 +0200 (2018-03-02)
parents 2e2e559396b5
children 3e3205b3b68f
line diff
     1.1 --- a/gcc49/receipt	Wed Oct 04 14:58:45 2017 +0200
     1.2 +++ b/gcc49/receipt	Fri Mar 02 13:45:43 2018 +0200
     1.3 @@ -1,26 +1,24 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="gcc49"
     1.8 -SOURCE="gcc"
     1.9  VERSION="4.9.2"
    1.10  CATEGORY="development"
    1.11 -SHORT_DESC="The GNU Compiler Collection."
    1.12 +SHORT_DESC="The GNU Compiler Collection"
    1.13  MAINTAINER="pankso@slitaz.org"
    1.14  LICENSE="GPL2"
    1.15 -TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.16  WEB_SITE="http://gcc.gnu.org/"
    1.17 +
    1.18 +TARBALL="gcc-$VERSION.tar.bz2"
    1.19  WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
    1.20  TAGS="compiler C C++"
    1.21  
    1.22  # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
    1.23  # for cookutils that are not used by tazwok/cook-toolchain since it installs
    1.24  # and uses its own copy.
    1.25 -DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
    1.26  BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
    1.27 +SPLIT="gcc49-lib-base"
    1.28  
    1.29 -# Rules to configure and make the package.
    1.30 -compile_rules()
    1.31 -{
    1.32 +compile_rules() {
    1.33  	ARCH_ARGS="--with-tune=$ARCH"
    1.34  	pkgversion="SliTaz"
    1.35  	languages="c,c++"
    1.36 @@ -53,19 +51,33 @@
    1.37  	make && make install
    1.38  }
    1.39  
    1.40 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.41 -genpkg_rules()
    1.42 -{
    1.43 -	mkdir -p  $fs/usr/share
    1.44 -	cp -a $install/usr/bin $fs/usr
    1.45 +genpkg_rules() {
    1.46 +	case $PACKAGE in
    1.47 +		gcc49)
    1.48 +			mkdir -p  $fs/usr/share
    1.49 +			cp -a $install/usr/bin $fs/usr
    1.50  
    1.51 -	# Copy all libs. Do not hide gcc-lib-base.
    1.52 -	cp -a $install/usr/lib* $fs/usr
    1.53 +			# Copy all libs. Do not hide gcc-lib-base.
    1.54 +			cp -a $install/usr/lib* $fs/usr
    1.55  
    1.56 -	# Include files.
    1.57 -	cp -a $install/usr/include $fs/usr
    1.58 +			# Include files.
    1.59 +			cp -a $install/usr/include $fs/usr
    1.60 +			DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
    1.61 +			;;
    1.62 +		gcc49-lib-base)
    1.63 +			mkdir -p $fs/usr/lib
    1.64 +			cp -a $install/usr/libgcc49/libgcc_s.so* $fs/usr/lib
    1.65 +			cp -a $install/usr/libgcc49/libstdc++.so* $fs/usr/lib
    1.66 +			rm -f $fs/usr/lib/*-gdb.py
    1.67 +			CAT="development|GCC base libraries, libgcc_s and libstdc++"
    1.68 +			PROVIDE="gcc-lib-base"
    1.69 +			;;
    1.70 +	esac
    1.71 +}
    1.72  
    1.73 -	# Remove build directory.
    1.74 -	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
    1.75 -	rm -rf $WOK/$PACKAGE/$PACKAGE-build
    1.76 +post_remove_gcc49_lib_base() {
    1.77 +	cd "$1/usr/lib"
    1.78 +	ln -s libstdc++.so.6.*.* libstdc++.so.6
    1.79 +	ln -s libstdc++.so.6.*.* libstdc++.so
    1.80 +	cd - >/dev/null
    1.81  }