blob: e7fdd3aad43c3a1272cfee42165bb5afca75322a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-copas
_pkgname=copas
pkgver=2.0.2
_pkgver=${pkgver//./_}
pkgrel=1
pkgdesc="Coroutine Oriented Portable Asynchronous Services for Lua"
url="http://keplerproject.github.io/copas/"
arch="noarch"
license="MIT"
depends="lua-socket"
checkdepends="lua5.1-coxpcall lua-sec"
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$_pkgver.tar.gz
disable-https-tests.patch
ipv4-only.patch"
builddir="$srcdir/$_pkgname-$_pkgver"
# luajit is not available on s390x
# XXX: tests/largetransfer.lua segfaults on ppc64le LuaJIT
# on aarch64: luajit: bad light userdata pointer
case "$CARCH" in
s390x | ppc64le | aarch64) _luajit="";;
*) checkdepends="$checkdepends luajit" _luajit="jit";;
esac
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
subpackages="$subpackages lua$_v-$_pkgname:_subpackage"
checkdepends="$checkdepends lua$_v"
done
check() {
cd "$builddir"
local lver; for lver in $_luaversions $_luajit; do
msg "Testing on lua$lver"
make test LUA=lua$lver
done
}
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc $lver"
depends="lua$lver ${depends//lua-/lua$lver-}"
[ "$lver" = 5.1 ] && depends="$depends lua5.1-coxpcall"
install_if="lua$lver $pkgname=$pkgver-r$pkgrel"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-1"
cd "$builddir"
make LUA_DIR="$subpkgdir/usr/share/lua/$lver" install
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
sha512sums="dd83a513fbddb2f0164c3573b417623f5cc556413c4937be7e362f4c1667bad83391143e1bf609480726730ce488c4080e810f2ce12a98a7abb5293993c10182 lua-copas-2.0.2.tar.gz
eebded0a9accbc6b0a5ecd3c45e06710bf4b3279605b443fe3bfff40d9d9d23bdc0c508fb42506d14faa69a3c4cee0b8bef80ab8b721eac6d5aeab2aaa8c41e7 disable-https-tests.patch
4fb2b65f41869b9729cc4672eebbfb2745a2d01af1cd54341b8306f57510f98e118eac77c77a980f4c8e8b181b6fda150061dc39819269e9ee64bf07656dfd54 ipv4-only.patch"
|