[pkg-luarocks,6/6] package/lua: allows host-lua to find installed modules
diff mbox series

Message ID 20190918061915.31250-6-francois.perrad@gadz.org
State New
Headers show
Series
  • [pkg-luarocks,1/6] pkg-luarocks: remove LUAROCKS_RUN_ENV
Related show

Commit Message

Francois Perrad Sept. 18, 2019, 6:19 a.m. UTC
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/lua/lua.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Patch
diff mbox series

diff --git a/package/lua/lua.mk b/package/lua/lua.mk
index 2ff2fdf75..30dbf0d68 100644
--- a/package/lua/lua.mk
+++ b/package/lua/lua.mk
@@ -54,6 +54,12 @@  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