wok-next view lua53/stuff/patches/lua-5.3-module_paths.patch @ rev 21150

All the sorts of Lua 5
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jan 30 23:34:32 2019 +0200 (2019-01-30)
parents
children
line source
1 diff --git a/src/luaconf.h b/src/luaconf.h
2 index fd28d21..4c65295 100644
3 --- a/src/luaconf.h
4 +++ b/src/luaconf.h
5 @@ -203,12 +201,25 @@
6 #define LUA_ROOT "/usr/local/"
7 #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
8 #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
9 +
10 +#define LUA_VENDOR_ROOT "/usr/"
11 +/* Path for version-specific Lua modules. */
12 +#define LUA_VENDOR_LDIR LUA_VENDOR_ROOT "share/lua/" LUA_VDIR "/"
13 +/* Path for Lua modules that are compatible with Lua 5.1 and newer. */
14 +#define LUA_VENDOR_COMMON_LDIR LUA_VENDOR_ROOT "share/lua/common/"
15 +#define LUA_VENDOR_CDIR LUA_VENDOR_ROOT "lib/lua/" LUA_VDIR "/"
16 +
17 #define LUA_PATH_DEFAULT \
18 LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
19 LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
20 + LUA_VENDOR_LDIR"?.lua;" LUA_VENDOR_LDIR"?/init.lua;" \
21 + LUA_VENDOR_CDIR"?.lua;" LUA_VENDOR_CDIR"?/init.lua;" \
22 + LUA_VENDOR_COMMON_LDIR"?.lua;" LUA_VENDOR_COMMON_LDIR"?/init.lua;" \
23 "./?.lua;" "./?/init.lua"
24 #define LUA_CPATH_DEFAULT \
25 - LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
26 + LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" \
27 + LUA_VENDOR_CDIR"?.so;" LUA_VENDOR_CDIR"loadall.so;" \
28 + "./?.so"
29 #endif /* } */