diff options
-rw-r--r-- | src/Makefile | 3 | ||||
-rw-r--r-- | src/lfs.patch | 11 | ||||
-rw-r--r-- | src/lutf8libjit.patch | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile index 09234c3b..f2b8c229 100644 --- a/src/Makefile +++ b/src/Makefile @@ -422,8 +422,9 @@ lua: lua.patch | $(lua_tgz) lualibs: lua/src/lib/lpeg lua/src/lib/lfs lua/src/lib/lspawn lua/src/lib/lpeg: | $(lpeg_tgz) mkdir -p $@ && tar xzf $| -C $@ && mv $@/*/*.c $@/*/*.h $(dir $@) -lua/src/lib/lfs: | $(lfs_zip) +lua/src/lib/lfs: lfs.patch | $(lfs_zip) mkdir -p $@ && unzip -d $@ $| && mv $@/*/src/*.c $@/*/src/*.h $(dir $@) + patch -d $(dir $@) -N -p1 < $< lua/src/lib/lspawn: | $(lspawn_zip) mkdir -p $@ && unzip -d $@ $| && mv $@/*/*.c $(dir $@) lua/src/lib/lutf8lib.c: lutf8libjit.patch diff --git a/src/lfs.patch b/src/lfs.patch new file mode 100644 index 00000000..85391e65 --- /dev/null +++ b/src/lfs.patch @@ -0,0 +1,11 @@ +--- lfs.c 2015-04-18 10:36:56.458722799 -0400 ++++ lib/lfs.c 2015-04-18 10:37:06.806736918 -0400 +@@ -78,7 +78,7 @@ + #endif + + #if LUA_VERSION_NUM < 502 +-# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l)) ++# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,LFS_LIBNAME,l)) + #endif + + /* Define 'strerror' for systems that do not implement it */ diff --git a/src/lutf8libjit.patch b/src/lutf8libjit.patch index 72a09840..4aa347d6 100644 --- a/src/lutf8libjit.patch +++ b/src/lutf8libjit.patch @@ -7,7 +7,7 @@ -LUAMOD_API int luaopen_utf8 (lua_State *L) { - luaL_newlib(L, funcs); +int luaopen_utf8 (lua_State *L) { -+ lua_newtable(L), luaL_register(L, NULL, funcs); ++ lua_newtable(L), luaL_register(L, "utf8", funcs); + lua_pushvalue(L, -1), lua_setglobal(L, "utf8"); lua_pushliteral(L, UTF8PATT); lua_setfield(L, -2, "charpattern"); |