# HG changeset patch # User Christophe Lincoln # Date 1398256633 -7200 # Node ID 60be9a317fc6eee681fd2294614579808b89d129 # Parent ccb0dea76bf8a923aa2c9e332f3e759c91438b3e ARM: add mercurial with a fancy compile hack \o/ diff -r ccb0dea76bf8 -r 60be9a317fc6 mercurial/receipt --- a/mercurial/receipt Wed Apr 23 14:28:29 2014 +0200 +++ b/mercurial/receipt Wed Apr 23 14:37:13 2014 +0200 @@ -10,6 +10,7 @@ WEB_SITE="http://mercurial.selenic.com/" WGET_URL="http://www.selenic.com/mercurial/release/$TARBALL" CONFIG_FILES="/etc/mercurial/hgweb.config" +HOST_ARCH="arm" DEPENDS="python patch libssl" BUILD_DEPENDS="python-dev patch openssl-dev" @@ -17,9 +18,21 @@ # Rules to configure and make the package. compile_rules() { - python setup.py install --root="$DESTDIR" --optimize=1 - mkdir -p $DESTDIR/usr/share/examples/mercurial - cp -a $src/hgweb.cgi $DESTDIR/usr/share/examples/mercurial + # Cross compilation hack + case "$ARCH" in + arm*) + mv /usr/bin/i486-slitaz-linux-gcc /tmp && + ln -s /cross/${ARCH}/tools/bin/arm-slitaz-linux-gnueabi-gcc \ + /usr/bin/i486-slitaz-linux-gcc ;; + esac && + python setup.py install --root="$DESTDIR" --optimize=1 && + mkdir -p $DESTDIR/usr/share/examples/mercurial && + cp -a $src/hgweb.cgi $DESTDIR/usr/share/examples/mercurial && + case "$ARCH" in + arm*) + rm /usr/bin/i486-slitaz-linux-gcc && + mv /tmp/i486-slitaz-linux-gcc /usr/bin ;; + esac } # Rules to gen a SliTaz package suitable for Tazpkg.