blob: cc520d188281eb874bdfcb6b743a2d6629c978a7 (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2 5.3"
pkgname=lua-cqueues
_pkgname=cqueues
pkgver=20161215
pkgrel=2
pkgdesc="Lua event loop using coroutines"
url="http://25thandclement.com/~william/projects/cqueues.html"
arch="all"
license="MIT"
depends=""
makedepends="libressl-dev m4 bsd-compat-headers"
subpackages=""
for _i in $_luaversions; do
makedepends="$makedepends lua${_i}-dev"
subpackages="$subpackages lua${_i}-$_pkgname:_package"
done
source="cqueues-$pkgver.tar.gz::https://github.com/wahern/cqueues/archive/rel-$pkgver.tar.gz
libressl-2.5.patch
"
builddir="$srcdir/cqueues-rel-$pkgver"
build() {
cd "$builddir"
# Override the HAVE_* tests that depend on GLIBC. grep for "#define HAVE_" on new releases.
export CFLAGS="$CFLAGS -DHAVE_EVENTFD=1 -DHAVE_EPOLL_CREATE1=1 -DHAVE_PIPE2=1"
local lver; for lver in $_luaversions; do
msg "Building for Lua $lver"
make all$lver || return 1
done
}
package() {
mkdir -p "$pkgdir"
}
_package() {
local lver=${subpkgname:3:3}
pkgdesc="$pkgdesc - for Lua $lver"
depends="lua$lver"
install_if="lua$lver $pkgname=$pkgver-r$pkgrel"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-0"
cd "$builddir"
make DESTDIR="$subpkgdir" prefix=/usr install$lver
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
sha512sums="60060acb5b6f6d329b0c31dadddbf6242deeef5c206b3d1279cb04c68dcdf88d163ed423465af9713ca8cc03e19f6fb87589bf9a307f1f178263f0c17c7f8ac1 cqueues-20161215.tar.gz
7371797feaf41ac6f50fd21fde0703afee5d4430bc186a9ac48d47fe3fa818cfc76cb0166fd24243c8796a5ef93db4235d8b67e7f3fd90758fff26bbdb7e4ae8 libressl-2.5.patch"
|