wok-current rev 16491

ARM: add mercurial with a fancy compile hack \o/
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 23 14:37:13 2014 +0200 (2014-04-23)
parents ccb0dea76bf8
children abc3060c2af2
files mercurial/receipt
line diff
     1.1 --- a/mercurial/receipt	Wed Apr 23 14:28:29 2014 +0200
     1.2 +++ b/mercurial/receipt	Wed Apr 23 14:37:13 2014 +0200
     1.3 @@ -10,6 +10,7 @@
     1.4  WEB_SITE="http://mercurial.selenic.com/"
     1.5  WGET_URL="http://www.selenic.com/mercurial/release/$TARBALL"
     1.6  CONFIG_FILES="/etc/mercurial/hgweb.config"
     1.7 +HOST_ARCH="arm"
     1.8  
     1.9  DEPENDS="python patch libssl"
    1.10  BUILD_DEPENDS="python-dev patch openssl-dev"
    1.11 @@ -17,9 +18,21 @@
    1.12  # Rules to configure and make the package.
    1.13  compile_rules()
    1.14  {
    1.15 -	python setup.py install --root="$DESTDIR" --optimize=1
    1.16 -	mkdir -p $DESTDIR/usr/share/examples/mercurial
    1.17 -	cp -a $src/hgweb.cgi $DESTDIR/usr/share/examples/mercurial
    1.18 +	# Cross compilation hack
    1.19 +	case "$ARCH" in
    1.20 +		arm*)
    1.21 +			mv /usr/bin/i486-slitaz-linux-gcc /tmp &&
    1.22 +			ln -s /cross/${ARCH}/tools/bin/arm-slitaz-linux-gnueabi-gcc \
    1.23 +				/usr/bin/i486-slitaz-linux-gcc ;;
    1.24 +	esac &&
    1.25 +	python setup.py install --root="$DESTDIR" --optimize=1 &&
    1.26 +	mkdir -p $DESTDIR/usr/share/examples/mercurial &&
    1.27 +	cp -a $src/hgweb.cgi $DESTDIR/usr/share/examples/mercurial &&
    1.28 +	case "$ARCH" in
    1.29 +		arm*) 
    1.30 +			rm /usr/bin/i486-slitaz-linux-gcc &&
    1.31 +			mv /tmp/i486-slitaz-linux-gcc /usr/bin ;;
    1.32 +	esac
    1.33  }
    1.34  
    1.35  # Rules to gen a SliTaz package suitable for Tazpkg.