From: Francois Perrad Date: Sun, 22 Mar 2020 08:07:06 +0000 (+0100) Subject: package/lua: allow host-lua to find installed modules X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4be3fd6fdb73085a35e89c2c1218c1e0b1e74a79;p=buildroot.git package/lua: allow host-lua to find installed modules We need to set LUA_ROOT to allow the host-lua interpreter to find installed modules. Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- diff --git a/package/lua/lua.mk b/package/lua/lua.mk index 2ff2fdf754..ce75af6b02 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -54,6 +54,11 @@ endef LUA_POST_PATCH_HOOKS += LUA_32BITS_LUACONF endif +define HOST_LUA_LUACONF + $(SED) 's|#define LUA_ROOT.*|#define LUA_ROOT "$(HOST_DIR)/usr/"|' $(@D)/src/luaconf.h +endef +HOST_LUA_POST_PATCH_HOOKS += HOST_LUA_LUACONF + HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX ifeq ($(BR2_PACKAGE_LUA_5_3),y) HOST_LUA_CFLAGS += -DLUA_COMPAT_5_2