wok-6.x rev 12815

bzip2: cross compile for ARM
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 21 01:35:07 2012 +0200 (2012-05-21)
parents aca236067685
children 601c59dca5bf
files bzip2-dev/receipt bzip2/receipt bzlib/receipt
line diff
     1.1 --- a/bzip2-dev/receipt	Sun May 20 23:22:04 2012 +0200
     1.2 +++ b/bzip2-dev/receipt	Mon May 21 01:35:07 2012 +0200
     1.3 @@ -5,9 +5,11 @@
     1.4  CATEGORY="development"
     1.5  SHORT_DESC="High-quality data compressor dev files."
     1.6  MAINTAINER="pankso@slitaz.org"
     1.7 -DEPENDS="bzip2"
     1.8  WANTED="bzip2"
     1.9  WEB_SITE="http://www.bzip.org/"
    1.10 +HOST_ARCH="i486 arm"
    1.11 +
    1.12 +DEPENDS="bzip2"
    1.13  
    1.14  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.15  genpkg_rules()
     2.1 --- a/bzip2/receipt	Sun May 20 23:22:04 2012 +0200
     2.2 +++ b/bzip2/receipt	Mon May 21 01:35:07 2012 +0200
     2.3 @@ -8,24 +8,34 @@
     2.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     2.5  WEB_SITE="http://www.bzip.org/"
     2.6  WGET_URL="http://www.bzip.org/$VERSION/$TARBALL"
     2.7 +TAGS="compression archive"
     2.8 +HOST_ARCH="i486 arm"
     2.9 +
    2.10  DEPENDS="bzlib"
    2.11 -BUILD_DEPENDS="gcc"
    2.12 -TAGS="compression archive"
    2.13 -
    2.14 -# Rules to compile & install the temporary toolchain.
    2.15 -cook_tmp_toolchain()
    2.16 -{
    2.17 -	cd $src
    2.18 -	make &&	make PREFIX=/tools install
    2.19 -}
    2.20 +BUILD_DEPENDS=""
    2.21  
    2.22  # Rules to configure and make the package.
    2.23  compile_rules()
    2.24  {
    2.25  	cd $src
    2.26 -	make -f Makefile-libbz2_so &&
    2.27 -	make clean &&
    2.28 -	make
    2.29 +	# Disable the tests since they won't work on a multi-architecture build
    2.30 +	cp Makefile Makefile.orig
    2.31 +	sed -e "/^all:/s/ test//" Makefile.orig > Makefile
    2.32 +	# No configure script, we must used CC, AR and RANLIB set by cook.
    2.33 +	case "$ARCH" in
    2.34 +		arm)
    2.35 +			make -f Makefile-libbz2_so CC=${CC} AR=${AR} RANLIB=${RANLIB} &&
    2.36 +			make clean && make CC=${CC} AR=${AR} RANLIB=${RANLIB} ;;
    2.37 +		*)
    2.38 +			make -f Makefile-libbz2_so &&
    2.39 +			make clean && make ;;
    2.40 +	esac
    2.41 +}
    2.42 +
    2.43 +# Just to be sure when cross-compiling.
    2.44 +testsuite()
    2.45 +{
    2.46 +	readelf -h $src/bzip2-shared
    2.47  }
    2.48  
    2.49  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.50 @@ -42,12 +52,10 @@
    2.51  # Remove Busybox symlinks before installing
    2.52  pre_install()
    2.53  {
    2.54 -  local root
    2.55 -  root=$1
    2.56 -  echo "Processing post-install commands..."
    2.57 -  rm -f $root/usr/bin/bunzip2
    2.58 -  rm -f $root/usr/bin/bzcat
    2.59 -#  rm -f $root/usr/bin/bzip2
    2.60 +	echo "Processing post-install commands..."
    2.61 +	rm -f $root/usr/bin/bunzip2
    2.62 +	rm -f $root/usr/bin/bzcat
    2.63 +	#rm -f $root/usr/bin/bzip2
    2.64  }
    2.65  
    2.66  # Restore Busybox symlinks upon removal
    2.67 @@ -55,5 +63,5 @@
    2.68  {
    2.69  	ln -s /bin/busybox /usr/bin/bunzip2
    2.70  	ln -s /bin/busybox /usr/bin/bzcat
    2.71 -#	ln -s /bin/busybox /usr/bin/bzip2
    2.72 +	#ln -s /bin/busybox /usr/bin/bzip2
    2.73  }
     3.1 --- a/bzlib/receipt	Sun May 20 23:22:04 2012 +0200
     3.2 +++ b/bzlib/receipt	Mon May 21 01:35:07 2012 +0200
     3.3 @@ -4,10 +4,12 @@
     3.4  VERSION="1.0.6"
     3.5  CATEGORY="utilities"
     3.6  SHORT_DESC="High-quality data compressor libraries."
     3.7 -DEPENDS="glibc-base"
     3.8  MAINTAINER="pascal.bellard@slitaz.org"
     3.9  WEB_SITE="http://www.bzip.org/"
    3.10  WANTED="bzip2"
    3.11 +HOST_ARCH="i486 arm"
    3.12 +
    3.13 +DEPENDS="glibc-base"
    3.14  
    3.15  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.16  genpkg_rules()