Files
MINGW-packages/mingw-w64-luajit/003-lua51-modules-paths.patch
Biswapriyo Nath cfab569519 luajit: Fix module search path
This was previously changed in 703c7bae2f commit.
2024-03-11 21:03:03 +05:30

25 lines
1000 B
Diff

diff -bur LuaJIT-2.1.0-beta3-orig/src/luaconf.h LuaJIT-2.1.0-beta3/src/luaconf.h
--- LuaJIT-2.1.0-beta3-orig/src/luaconf.h 2023-01-26 22:15:03.558193500 -0700
+++ LuaJIT-2.1.0-beta3/src/luaconf.h 2023-01-26 22:15:17.283052500 -0700
@@ -18,10 +18,17 @@
** In Windows, any exclamation mark ('!') in the path is replaced by the
** path of the directory of the executable file of the current process.
*/
-#define LUA_LDIR "!\\lua\\"
-#define LUA_CDIR "!\\"
+
+/* Paths for modules expecting non-jit lua5.1 */
+#define LUA_LDIR "!\\..\\share\\lua\\5.1\\"
+#define LUA_CDIR "!\\..\\lib\\lua\\5.1\\"
+
+#define LUAJIT_LDIR "!\\..\\share\\luajit-2.1\\"
+
#define LUA_PATH_DEFAULT \
- ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;"
+ ".\\?.lua;" LUAJIT_LDIR"?.lua;" LUAJIT_LDIR"?\\init.lua;" \
+ LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \
+ LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua"
#define LUA_CPATH_DEFAULT \
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else