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 <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Francois Perrad 2020-03-22 09:07:06 +01:00 committed by Thomas Petazzoni
parent b98e8e6f50
commit 4be3fd6fdb

View File

@ -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