wok-next rev 12831

elfutils: cross-compile for ARM
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 22 16:24:28 2012 +0200 (2012-05-22)
parents fd8053e3df39
children 78f92a2255c1
files elfutils-dev/receipt elfutils/receipt
line diff
     1.1 --- a/elfutils-dev/receipt	Tue May 22 15:17:22 2012 +0200
     1.2 +++ b/elfutils-dev/receipt	Tue May 22 16:24:28 2012 +0200
     1.3 @@ -8,11 +8,12 @@
     1.4  DEPENDS="elfutils"
     1.5  WEB_SITE="https://fedorahosted.org/elfutils/"
     1.6  WANTED="elfutils"
     1.7 +HOST_ARCH="i486 arm"
     1.8  
     1.9  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.10  genpkg_rules()
    1.11  {
    1.12  	mkdir -p $fs/usr/lib
    1.13 -	cp -a $_pkg/usr/lib/*a $fs/usr/lib
    1.14 -	cp -a $_pkg/usr/include $fs/usr
    1.15 +	cp -a $install/usr/lib/*a $fs/usr/lib
    1.16 +	cp -a $install/usr/include $fs/usr
    1.17  }
     2.1 --- a/elfutils/receipt	Tue May 22 15:17:22 2012 +0200
     2.2 +++ b/elfutils/receipt	Tue May 22 16:24:28 2012 +0200
     2.3 @@ -7,22 +7,28 @@
     2.4  MAINTAINER="pascal.bellard@slitaz.org"
     2.5  TARBALL="$PACKAGE-$VERSION.tar.bz2"
     2.6  WEB_SITE="https://fedorahosted.org/elfutils/"
     2.7 -# Note : use http mirror because https can't be access at elfutils compilation time
     2.8 -# when cooking from scratch.
     2.9 -#WGET_URL="http://cvs.fedoraproject.org/repo/pkgs/elfutils/$TARBALL/3dcfb28fa339090a1d29a9e148cce469/$TARBALL"
    2.10 -#WGET_URL="http://gentoo.webm.ru/distfiles/$TARBALL"
    2.11  WGET_URL="https://fedorahosted.org/releases/e/l/$PACKAGE/$VERSION/$TARBALL"
    2.12 +HOST_ARCH="i486 arm"
    2.13  
    2.14  DEPENDS="glibc-base"
    2.15  BUILD_DEPENDS="wget bzip2-dev liblzma-dev"
    2.16  
    2.17 +# Handle multiarch compilation
    2.18 +case "$ARCH" in
    2.19 +	arm) BUILD_DEPENDS="bzip2-dev xz" ;;
    2.20 +esac
    2.21 +
    2.22  # Rules to configure and make the package.
    2.23  compile_rules()
    2.24  {
    2.25  	cd $src
    2.26  	sed -i 's/run-strip-reloc.sh//' tests/Makefile* # Need cc -g !
    2.27  	./configure $CONFIGURE_ARGS &&
    2.28 -	make && make check && make install
    2.29 +	# Disable check/tests when cross-compiling
    2.30 +	case "$ARCH" in
    2.31 +		arm) make && make install ;;
    2.32 +		*) make && make check && make install ;;
    2.33 +	esac
    2.34  }
    2.35  
    2.36  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.37 @@ -30,8 +36,8 @@
    2.38  {
    2.39  	mkdir -p $fs/usr/lib $fs/usr/bin
    2.40  	for i in elfcmp findtextrel unstrip; do
    2.41 -		cp -a $_pkg/usr/bin/$i $fs/usr/bin
    2.42 +		cp -a $install/usr/bin/$i $fs/usr/bin
    2.43  	done
    2.44 -	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
    2.45 -	cp -a $_pkg/usr/lib/elfutils $fs/usr/lib
    2.46 +	cp -a $install/usr/lib/*.so* $fs/usr/lib
    2.47 +	cp -a $install/usr/lib/elfutils $fs/usr/lib
    2.48  }