aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-toml
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-30 12:26:04 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-03-30 12:32:44 +0200
commit9b2884858f13baf39ce64c927690711c988c46fa (patch)
treeefa98eff5e1e0632e098fc031ad508b9ee46e71a /community/lua-toml
parent0a947ac60a3d4040a0aa3136bdd1d264875b3d92 (diff)
downloadaports-9b2884858f13baf39ce64c927690711c988c46fa.tar.bz2
aports-9b2884858f13baf39ce64c927690711c988c46fa.tar.xz
community/lua-toml: clean the mess with luajit condition
Diffstat (limited to 'community/lua-toml')
-rw-r--r--community/lua-toml/APKBUILD29
1 files changed, 13 insertions, 16 deletions
diff --git a/community/lua-toml/APKBUILD b/community/lua-toml/APKBUILD
index ec3e32484a..e70451e2c2 100644
--- a/community/lua-toml/APKBUILD
+++ b/community/lua-toml/APKBUILD
@@ -2,21 +2,22 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-toml
pkgver=1.0
-pkgrel=3
+pkgrel=4
pkgdesc="TOML decoder/encoder for Lua"
url="https://github.com/jonstoler/lua-toml"
arch="noarch"
license="Happy"
depends=""
-_checkdepends="lua-busted"
-if [ "$CARCH" == "s390x" ] && [ "$CARCH" == "ppc64le" ]; then
- checkdepends="$_checkdepends"
-else
- checkdepends="$_checkdepends luajit"
-fi
+checkdepends="lua-busted"
source="$pkgname-$pkgver.tar.gz::https://github.com/jonstoler/$pkgname/archive/v$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
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
@@ -25,15 +26,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 /usr/bin/busted || return 1
- done
- fi
- fi
+
+ local lver; for lver in $_luaversions $_luajit; do
+ msg "Testing on lua$lver"
+ lua$lver /usr/bin/busted || return 1
+ done
}
package() {