void-packages/srcpkgs/libluv/template

46 lines
1.4 KiB
Bash

# Template file for 'libluv'
pkgname=libluv
version=1.44.2.1
revision=1
_distver="${version%.*}-${version##*.}"
build_style=cmake
configure_args="-DLUA_BUILD_TYPE=System -DBUILD_MODULE=OFF -DBUILD_SHARED_LIBS=ON
-DWITH_LUA_ENGINE=$(vopt_if luajit LuaJIT Lua) -DWITH_SHARED_LIBUV=ON"
makedepends="libuv-devel $(vopt_if luajit LuaJIT-devel lua51-devel)"
depends="$(vopt_if luajit LuaJIT lua51)"
short_desc="Bare libuv bindings for LuaJIT"
maintainer="andry-dev <peketribal2@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/luvit/luv"
distfiles="https://github.com/luvit/luv/releases/download/${_distver}/luv-${_distver}.tar.gz
https://raw.githubusercontent.com/luvit/luv/${_distver}/libluv.pc.in"
checksum="3eb5c7bc44f61fbc4148ea30e3221d410263e0ffa285672851fc19debf9e5c30
be2a4909c724e09a50de42b1caa3c82c1b1afee8b80abf20c6944f1df1c7fd0e"
skip_extraction="libluv.pc.in"
build_options="luajit"
case "$XBPS_TARGET_MACHINE" in
riscv64*) build_options_default="" ;;
*) build_options_default="luajit" ;;
esac
if [ "$CROSS_BUILD" -a "$XBPS_MACHINE" = "x86_64" ]; then
hostmakedepends+=" gcc-multilib"
fi
post_extract() {
cp ${XBPS_SRCDISTDIR}/libluv-${version}/libluv.pc.in ${wrksrc}/libluv.pc.in
}
libluv-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}