Commit 9b288485 authored by Jakub Jirutka's avatar Jakub Jirutka

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

parent 0a947ac6
...@@ -2,21 +2,22 @@ ...@@ -2,21 +2,22 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-toml pkgname=lua-toml
pkgver=1.0 pkgver=1.0
pkgrel=3 pkgrel=4
pkgdesc="TOML decoder/encoder for Lua" pkgdesc="TOML decoder/encoder for Lua"
url="https://github.com/jonstoler/lua-toml" url="https://github.com/jonstoler/lua-toml"
arch="noarch" arch="noarch"
license="Happy" license="Happy"
depends="" depends=""
_checkdepends="lua-busted" checkdepends="lua-busted"
if [ "$CARCH" == "s390x" ] && [ "$CARCH" == "ppc64le" ]; then
checkdepends="$_checkdepends"
else
checkdepends="$_checkdepends luajit"
fi
source="$pkgname-$pkgver.tar.gz::https://github.com/jonstoler/$pkgname/archive/v$pkgver.tar.gz" source="$pkgname-$pkgver.tar.gz::https://github.com/jonstoler/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver" 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" _luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do for _v in $_luaversions; do
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
...@@ -25,15 +26,11 @@ done ...@@ -25,15 +26,11 @@ done
check() { check() {
cd "$builddir" cd "$builddir"
# luajit not avail for selected arches
if printf "$checkdepends\n" | grep -q "luajit"; then local lver; for lver in $_luaversions $_luajit; do
if [ "$CARCH" != "ppc64le" ] && [ "$CARCH" != "s390x" ]; then msg "Testing on lua$lver"
local lver; for lver in $_luaversions jit; do lua$lver /usr/bin/busted || return 1
msg "Testing on lua$lver" done
lua$lver /usr/bin/busted || return 1
done
fi
fi
} }
package() { 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