wok-6.x rev 15990

lua: add to ARM arch
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 02 13:49:46 2014 +0100 (2014-03-02)
parents 6f52e7b054e2
children ad0940dfc5c8
files lua-dev/receipt lua/receipt
line diff
     1.1 --- a/lua-dev/receipt	Sun Mar 02 13:16:22 2014 +0100
     1.2 +++ b/lua-dev/receipt	Sun Mar 02 13:49:46 2014 +0100
     1.3 @@ -8,6 +8,7 @@
     1.4  MAINTAINER="pankso@slitaz.org"
     1.5  LICENSE="MIT"
     1.6  WEB_SITE="http://www.lua.org/"
     1.7 +HOST_ARCH="i486 arm"
     1.8  
     1.9  DEPENDS="pkg-config"
    1.10  
     2.1 --- a/lua/receipt	Sun Mar 02 13:16:22 2014 +0100
     2.2 +++ b/lua/receipt	Sun Mar 02 13:49:46 2014 +0100
     2.3 @@ -9,6 +9,7 @@
     2.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     2.5  WEB_SITE="http://www.lua.org/"
     2.6  WGET_URL="http://www.lua.org/ftp/$TARBALL"
     2.7 +HOST_ARCH="i486 arm"
     2.8  
     2.9  DEPENDS="readline ncurses"
    2.10  BUILD_DEPENDS="readline-dev"
    2.11 @@ -16,10 +17,14 @@
    2.12  # Rules to configure and make the package.
    2.13  compile_rules()
    2.14  {
    2.15 -	cd $src
    2.16  	sed -i "s#/usr/local/#/usr/#" src/luaconf.h
    2.17 -	sed -i s"/-O2/-Os -march=$ARCH/" src/Makefile
    2.18 -	make linux &&
    2.19 +	case "$ARCH" in
    2.20 +		arm)
    2.21 +			make CC=${HOST_SYSTEM}-gcc posix ;;
    2.22 +		i486)
    2.23 +			sed -i s"/-O2/-Os -march=$ARCH/" src/Makefile
    2.24 +			make linux ;;
    2.25 +	esac &&
    2.26  	# lua.pc
    2.27  	make pc > lua.pc &&
    2.28  	sed -i "s#/local##g" lua.pc &&
    2.29 @@ -34,3 +39,8 @@
    2.30  	mkdir -p $fs/usr/bin
    2.31  	cp -a $install/usr/bin $fs/usr
    2.32  }
    2.33 +
    2.34 +testsuite()
    2.35 +{
    2.36 +	readelf -h $install/usr/bin/lua
    2.37 +}