Files
MINGW-packages/mingw-w64-lua53/searchpath.patch
Biswapriyo Nath b66448deeb lua53: Fix incorrect module search path
This removes paths which are duplicate and with double slashes.
Also the module search path is now same as in Linux environment.
The paths can be retrieved using these two lua code

print("package.path: "..package.path)
print("package.cpath: "..package.cpath)

The removed paths as like this

* package path:
    C:\msys64\ucrt64\bin\..\share\lua\5.3\\?.lua;
    C:\msys64\ucrt64\bin\..\share\lua\5.3\\?\init.lua;

* package cpath:
    C:\msys64\ucrt64\bin\..\lib\lua\5.3\..\lib\lua\5.3\\?.dll
2023-05-25 09:10:36 +05:30

23 lines
881 B
Diff

--- lua-5.3.3/src/luaconf.h.orig 2016-05-01 16:06:09.000000000 -0400
+++ lua-5.3.3/src/luaconf.h 2016-10-06 08:03:00.436714600 -0400
@@ -185,17 +185,14 @@
** 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 "!\\"
-#define LUA_SHRDIR "!\\..\\share\\lua\\" LUA_VDIR "\\"
+#define LUA_LDIR "!\\..\\share\\lua\\" LUA_VDIR "\\"
+#define LUA_CDIR "!\\..\\lib\\lua\\" LUA_VDIR "\\"
#define LUA_PATH_DEFAULT \
LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua;" \
- LUA_SHRDIR"?.lua;" LUA_SHRDIR"?\\init.lua;" \
".\\?.lua;" ".\\?\\init.lua"
#define LUA_CPATH_DEFAULT \
LUA_CDIR"?.dll;" \
- LUA_CDIR"..\\lib\\lua\\" LUA_VDIR "\\?.dll;" \
LUA_CDIR"loadall.dll;" ".\\?.dll"
#else /* }{ */