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