blob: 9bbae9d380b9f7cbc4bd5a3e37ad1b31fab5beaf (
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
65
66
67
68
69
70
71
72
73
74
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2 5.3"
pkgname=lua-cqueues
pkgver=20150610
_commitid=f3139446d79374ecb0e89c61df97efc983df5a1f
pkgrel=0
pkgdesc="Lua event loop using coroutines"
url="http://25thandclement.com/~william/projects/cqueues.html"
arch="all"
license="MIT"
depends=""
depends_dev=""
subpackages=""
makedepends="$depends_dev openssl-dev m4 bsd-compat-headers"
install=""
source="cqueues-$pkgver.tar.gz::https://github.com/wahern/cqueues/archive/$_commitid.tar.gz
"
for _i in $_luaversions; do
makedepends="$makedepends lua${_i}-dev"
subpackages="$subpackages lua${_i}-cqueues:_split_${_i/./}"
done
_builddir="$srcdir"/cqueues-$_commitid
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
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"
for _i in $_luaversions; do
msg "Build for Lua $_i"
make all${_i} || return 1
done
}
package() {
cd "$_builddir"
for _i in $_luaversions; do
msg "Install for Lua $_i"
make DESTDIR="$pkgdir" prefix=/usr install${_i} || return 1
done
rm -f "$pkgdir"/usr/lib/*.la
}
_split() {
local d= _ver=$1
pkgdesc="$pkgdesc - for Lua $_ver"
depends=
install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
mkdir -p "$subpkgdir"/$d
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1
fi
done
}
for _i in $_luaversions; do
eval "_split_${_i/./}() { _split $_i; }"
done
md5sums="dd2c3ad39f5dffa0d4e9860169193cf5 cqueues-20150610.tar.gz"
sha256sums="ec3bf74e82b13231169735a4a5dacaf1c14c7411f3c3e91a4431a476d4eb9b6c cqueues-20150610.tar.gz"
sha512sums="f7ebdd7dfae3855cb242e9d58517cc0a6a75e4d9dd161b4e860d18843ad9927ade7c80efe327c956323cfa04fdea7c39bdccb74c28138088777bc01b85966201 cqueues-20150610.tar.gz"
|