# HG changeset patch # User Christophe Lincoln # Date 1337556907 -7200 # Node ID 09524cdf6ae823e47d0b36a91c419d1945223d5f # Parent aca2360676852c3015339e1820295f1a09caef63 bzip2: cross compile for ARM diff -r aca236067685 -r 09524cdf6ae8 bzip2-dev/receipt --- a/bzip2-dev/receipt Sun May 20 23:22:04 2012 +0200 +++ b/bzip2-dev/receipt Mon May 21 01:35:07 2012 +0200 @@ -5,9 +5,11 @@ CATEGORY="development" SHORT_DESC="High-quality data compressor dev files." MAINTAINER="pankso@slitaz.org" -DEPENDS="bzip2" WANTED="bzip2" WEB_SITE="http://www.bzip.org/" +HOST_ARCH="i486 arm" + +DEPENDS="bzip2" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() diff -r aca236067685 -r 09524cdf6ae8 bzip2/receipt --- a/bzip2/receipt Sun May 20 23:22:04 2012 +0200 +++ b/bzip2/receipt Mon May 21 01:35:07 2012 +0200 @@ -8,24 +8,34 @@ TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="http://www.bzip.org/" WGET_URL="http://www.bzip.org/$VERSION/$TARBALL" +TAGS="compression archive" +HOST_ARCH="i486 arm" + DEPENDS="bzlib" -BUILD_DEPENDS="gcc" -TAGS="compression archive" - -# Rules to compile & install the temporary toolchain. -cook_tmp_toolchain() -{ - cd $src - make && make PREFIX=/tools install -} +BUILD_DEPENDS="" # Rules to configure and make the package. compile_rules() { cd $src - make -f Makefile-libbz2_so && - make clean && - make + # Disable the tests since they won't work on a multi-architecture build + cp Makefile Makefile.orig + sed -e "/^all:/s/ test//" Makefile.orig > Makefile + # No configure script, we must used CC, AR and RANLIB set by cook. + case "$ARCH" in + arm) + make -f Makefile-libbz2_so CC=${CC} AR=${AR} RANLIB=${RANLIB} && + make clean && make CC=${CC} AR=${AR} RANLIB=${RANLIB} ;; + *) + make -f Makefile-libbz2_so && + make clean && make ;; + esac +} + +# Just to be sure when cross-compiling. +testsuite() +{ + readelf -h $src/bzip2-shared } # Rules to gen a SliTaz package suitable for Tazpkg. @@ -42,12 +52,10 @@ # Remove Busybox symlinks before installing pre_install() { - local root - root=$1 - echo "Processing post-install commands..." - rm -f $root/usr/bin/bunzip2 - rm -f $root/usr/bin/bzcat -# rm -f $root/usr/bin/bzip2 + echo "Processing post-install commands..." + rm -f $root/usr/bin/bunzip2 + rm -f $root/usr/bin/bzcat + #rm -f $root/usr/bin/bzip2 } # Restore Busybox symlinks upon removal @@ -55,5 +63,5 @@ { ln -s /bin/busybox /usr/bin/bunzip2 ln -s /bin/busybox /usr/bin/bzcat -# ln -s /bin/busybox /usr/bin/bzip2 + #ln -s /bin/busybox /usr/bin/bzip2 } diff -r aca236067685 -r 09524cdf6ae8 bzlib/receipt --- a/bzlib/receipt Sun May 20 23:22:04 2012 +0200 +++ b/bzlib/receipt Mon May 21 01:35:07 2012 +0200 @@ -4,10 +4,12 @@ VERSION="1.0.6" CATEGORY="utilities" SHORT_DESC="High-quality data compressor libraries." -DEPENDS="glibc-base" MAINTAINER="pascal.bellard@slitaz.org" WEB_SITE="http://www.bzip.org/" WANTED="bzip2" +HOST_ARCH="i486 arm" + +DEPENDS="glibc-base" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules()