aports/community/lua-copas/APKBUILD
Jakub Jirutka f96e27cf35 community/lua-copas: remove luajit on ppc64le
luajit is not available on ppc64le.
2023-04-23 18:59:24 +00:00

70 lines
1.9 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-copas
_rockname=copas
pkgver=4.7.0
_pkgver=${pkgver//./_}
pkgrel=0
pkgdesc="Coroutine Oriented Portable Asynchronous Services for Lua"
url="https://lunarmodules.github.io/copas/"
arch="noarch"
license="MIT"
depends="
lua-binaryheap
lua-coxpcall
lua-socket
lua-timerwheel
"
checkdepends="lua-sec"
source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_rockname/archive/v$_pkgver.tar.gz
ipv4-only.patch
"
builddir="$srcdir/$_rockname-$_pkgver"
case "$CARCH" in
ppc64le) _luajit="";;
*) checkdepends="$checkdepends luajit"; _luajit="jit";;
esac
_luaversions="5.1 5.2 5.3 5.4"
for _v in $_luaversions; do
checkdepends="$checkdepends lua$_v"
# for backward compatibility (Alpine <3.18)
provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel"
done
prepare() {
default_prepare
# FIXME: Theses tests fail, most likely due to lua-socket >=3.0, see
# https://github.com/lunarmodules/copas/issues/159.
# I don't know if it affects only tests or copas is broken now. :(
sed -i \
-e '/tests\/largetransfer.lua/d' \
-e '/tests\/starve.lua/d' \
-e '/tests\/tls-sni.lua/d' \
Makefile
}
check() {
local lver; for lver in $_luaversions $_luajit; do
msg "Testing on lua$lver"
make test LUA=lua$lver
done
}
package() {
local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"
cd "$builddir"
make LUA_DIR="$pkgdir/usr/share/lua/common" install
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
sha512sums="
f18457e72731ca740dc5e90f2c6299e9e9e7cd2af80a003100cb0a8d464028878ee1d4ce1cc1093f0048a04f4ed59b8755f88a5f0cc88bca21439c9687263ba5 lua-copas-4.7.0.tar.gz
20acb34bc3cd0e974d2b7c9e54ade4e29cfa3e5dd7d52351bb0e06760301dc354c964c450080d61df2ebb3577e9407caea24582fbd9d2576485ae4aad7bafcf7 ipv4-only.patch
"