new bblfs: dev-lua/luv-1.50.0.1
This commit is contained in:
49
dev-lua/luv-1.50.0.1.PKGBUILD
Normal file
49
dev-lua/luv-1.50.0.1.PKGBUILD
Normal file
@@ -0,0 +1,49 @@
|
||||
pkgname=luv
|
||||
pkgver=1.50.0.1
|
||||
_ver=${pkgver%.*}-${pkgver##*.}
|
||||
pkgdesc="Bare libuv bindings for lua"
|
||||
homepage="https://github.com/luvit/luv"
|
||||
depends=("libuv" "luajit")
|
||||
license=("MIT" "Apache-2.0")
|
||||
_lua_compat_pv=0.10
|
||||
sources=("${pkgname}-${pkgver}.tar.gz"
|
||||
"${pkgname}-lua-compat-${_lua_compat_pv}.tar.gz"
|
||||
)
|
||||
urls=("https://github.com/luvit/${pkgname}/archive/${_ver}.tar.gz"
|
||||
"https://github.com/keplerproject/lua-compat-5.3/archive/v${_lua_compat_pv}.tar.gz"
|
||||
)
|
||||
sha512sums=("97550dfef5809bef4096ec467fa3bdd06aa96ac8df49f855d301368950a194f292d164f1510cad4a00def637560a40dcb1ce586b124ff2dd5c8ad2d413bf4b29"
|
||||
"f7f39085f4f6b16095f41e635b4c5477b3dab5e42b5b65a9d522941a3807ea521d4a27a77293a3c9d0ecea78a1f6c2a2497394b2d220f4d7d65e23510563d46d"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
tar -xf ${distdir}/${sources[0]} --strip-components=1
|
||||
tar -xf ${distdir}/${sources[1]}
|
||||
}
|
||||
|
||||
src_build() {
|
||||
local lua_compat_dir="${srcdir}/lua-compat-5.3-${_lua_compat_pv}"
|
||||
local cmake_args=(
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_MODULE=OFF
|
||||
-DLUA_BUILD_TYPE=System
|
||||
-DLUA_COMPAT53_DIR="${lua_compat_dir}"
|
||||
-DWITH_SHARED_LIBUV=ON
|
||||
-DWITH_LUA_ENGINE=LuaJIT
|
||||
)
|
||||
cmake -B build "${cmake_args[@]}"
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
src_check() {
|
||||
ln -s "build/libluv.so" "./luv.so"
|
||||
luajit "tests/run.lua" || true
|
||||
}
|
||||
|
||||
src_install() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
# vim:ft=sh syn=sh et sw=2:
|
||||
Reference in New Issue
Block a user