From d41e61414af84dd9a0536b6b20ea8e5c265e09a9 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 18 Jan 2023 22:16:11 +0100 Subject: [PATCH] libluv: add buildoption to build with lua5.1 --- srcpkgs/libluv/template | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/srcpkgs/libluv/template b/srcpkgs/libluv/template index 5f84537bd4a..07e12ecb7e6 100644 --- a/srcpkgs/libluv/template +++ b/srcpkgs/libluv/template @@ -4,19 +4,28 @@ version=1.43.0.0 revision=1 _distver="${version%.*}-${version##*.}" build_style=cmake -configure_args="-DLUA_BUILD_TYPE=System -DBUILD_MODULE=OFF -DBUILD_SHARED_LIBS=ON" -makedepends="libuv-devel LuaJIT-devel" -depends="libuv LuaJIT" +configure_args="-DLUA_BUILD_TYPE=System -DBUILD_MODULE=OFF -DBUILD_SHARED_LIBS=ON + -DWITH_LUA_ENGINE=$(vopt_if luajit LuaJIT Lua)" +makedepends="libuv-devel $(vopt_if luajit LuaJIT-devel lua51-devel)" +depends="libuv $(vopt_if luajit LuaJIT lua51)" short_desc="Bare libuv bindings for LuaJIT" maintainer="andry-dev " 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" + https://raw.githubusercontent.com/luvit/luv/${_distver}/libluv.pc.in" checksum="567a6f3dcdcf8a9b54ddc57ffef89d1e950d72832b85ee81c8c83a9d4e0e9de2 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