Commit 1a7d38e1 authored by Jakub Jirutka's avatar Jakub Jirutka

community/lua-fun: clean the mess with luajit condition

parent 499f771e
......@@ -3,17 +3,23 @@
pkgname=lua-fun
_pkgname=luafun
pkgver=0.1.3
pkgrel=4
pkgrel=5
pkgdesc="Functional programming library"
url="http://rtsisyk.github.io/luafun/"
arch="noarch"
license="MIT"
depends=""
makedepends=""
[ "$CARCH" == "s390x" ] && [ "$CARCH" == "ppc64le" ] && checkdepends="" || checkdepends="luajit"
checkdepends=""
source="$pkgname-$pkgver.tar.gz::https://github.com/rtsisyk/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
# luajit is not available for selected arches
case "$CARCH" in
ppc64le | s390x) _luajit="";;
*) checkdepends="$checkdepends luajit" _luajit="jit";;
esac
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
......@@ -22,15 +28,11 @@ done
check() {
cd "$builddir"
# luajit not avail for selected arches
if printf "$checkdepends\n" | grep -q "luajit"; then
if [ "$CARCH" != "ppc64le" ] && [ "$CARCH" != "s390x" ]; then
local lver; for lver in $_luaversions jit; do
msg "Testing on Lua $lver"
lua$lver tests/runtest tests/*.lua || return 1
done
fi
fi
local lver; for lver in $_luaversions $_luajit; do
msg "Testing on Lua $lver"
lua$lver tests/runtest tests/*.lua || return 1
done
}
package() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment