1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Jurica Bradarić <jbradaric@gmail.com>
3 # Contributor: jprjr <john@jrjrtech.com>
5 pkgname=('libluv' 'lua-luv' 'lua51-luv' 'lua52-luv' 'lua53-luv')
9 pkgdesc='Bare libuv bindings for lua'
11 url='https://github.com/luvit/luv'
14 makedepends=('cmake' 'libuv' 'ninja' 'luajit' 'lua>=5.4.0' 'lua<5.5.0' 'lua51' 'lua52' 'lua53')
15 source=("https://github.com/luvit/luv/releases/download/${pkgver//_/-}/luv-${pkgver//_/-}.tar.gz")
16 sha256sums=('3eb5c7bc44f61fbc4148ea30e3221d410263e0ffa285672851fc19debf9e5c30')
19 # build per-lua versions
20 for ver in 5.1 5.2 5.3 5.4; do
21 incdir="/usr/include/lua${ver}"
22 if [ "$ver" = "5.4" ] ; then
26 -Bbuild-lua${ver//./} \
27 -DLUA=/usr/bin/lua${ver} \
28 -DLUA_INCDIR=${incdir} \
29 -DLUADIR=/usr/share/lua/${ver} \
30 -DLIBDIR=/usr/lib/lua/${ver} \
31 -DWITH_SHARED_LIBUV=ON \
32 -DLUA_BUILD_TYPE=System \
33 -DCMAKE_INSTALL_PREFIX=/usr \
35 ninja -C "build-lua${ver//./}"
38 # build shared library version
41 -DWITH_SHARED_LIBUV=ON \
42 -DLUA_BUILD_TYPE=System \
44 -DBUILD_SHARED_LIBS=ON \
45 -DCMAKE_INSTALL_PREFIX=/usr \
52 DESTDIR="${pkgdir}" ninja -C "build" install
56 pkgdesc+=' - Lua module'
58 DESTDIR="${pkgdir}" ninja -C "build-lua54" install
62 pkgdesc+=' - Lua 5.1 module'
64 DESTDIR="${pkgdir}" ninja -C "build-lua51" install
68 pkgdesc+=' - Lua 5.2 module'
70 DESTDIR="${pkgdir}" ninja -C "build-lua52" install
74 pkgdesc+=' - Lua 5.3 module'
76 DESTDIR="${pkgdir}" ninja -C "build-lua53" install
79 # vim:set ts=2 sw=2 et: