X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ddacf1cb7a98f6e9a7972879d5aa857bcb5bd6cd..f42626aac1ab4e97559caec52c696063efac318b:/package/lua/patches/020-shared_liblua.patch?ds=inline diff --git a/package/lua/patches/020-shared_liblua.patch b/package/lua/patches/020-shared_liblua.patch index a2f7ebff0..cb7940f7e 100644 --- a/package/lua/patches/020-shared_liblua.patch +++ b/package/lua/patches/020-shared_liblua.patch @@ -1,22 +1,30 @@ -Index: lua-5.1.3/Makefile +Index: lua-5.1.4/Makefile =================================================================== ---- lua-5.1.3.orig/Makefile 2008-05-22 15:57:52.000000000 +0200 -+++ lua-5.1.3/Makefile 2008-05-22 16:02:53.000000000 +0200 -@@ -37,8 +37,8 @@ +--- lua-5.1.4.orig/Makefile 2008-08-24 16:46:37.000000000 +0200 ++++ lua-5.1.4/Makefile 2008-08-24 16:48:42.000000000 +0200 +@@ -42,8 +42,8 @@ # What to install. TO_BIN= lua luac -TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp -TO_LIB= liblua.a +TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp lnum_config.h -+TO_LIB= liblua.a liblua.so liblua.so.$R ++TO_LIB= liblua.a liblua.so.$R TO_MAN= lua.1 luac.1 # Lua version and release. -Index: lua-5.1.3/src/ldo.h +@@ -63,6 +63,7 @@ + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) ++ ln -s liblua.so.$R $(INSTALL_LIB)/liblua.so + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + + ranlib: +Index: lua-5.1.4/src/ldo.h =================================================================== ---- lua-5.1.3.orig/src/ldo.h 2008-05-22 15:57:52.000000000 +0200 -+++ lua-5.1.3/src/ldo.h 2008-05-22 16:02:53.000000000 +0200 +--- lua-5.1.4.orig/src/ldo.h 2008-08-24 16:46:37.000000000 +0200 ++++ lua-5.1.4/src/ldo.h 2008-08-24 16:48:42.000000000 +0200 @@ -46,7 +46,7 @@ LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); @@ -26,10 +34,10 @@ Index: lua-5.1.3/src/ldo.h LUAI_FUNC void luaD_throw (lua_State *L, int errcode); LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); -Index: lua-5.1.3/src/lfunc.h +Index: lua-5.1.4/src/lfunc.h =================================================================== ---- lua-5.1.3.orig/src/lfunc.h 2008-05-22 15:57:52.000000000 +0200 -+++ lua-5.1.3/src/lfunc.h 2008-05-22 16:02:53.000000000 +0200 +--- lua-5.1.4.orig/src/lfunc.h 2008-08-24 16:46:37.000000000 +0200 ++++ lua-5.1.4/src/lfunc.h 2008-08-24 16:48:42.000000000 +0200 @@ -18,7 +18,7 @@ cast(int, sizeof(TValue *)*((n)-1))) @@ -39,10 +47,10 @@ Index: lua-5.1.3/src/lfunc.h LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); LUAI_FUNC UpVal *luaF_newupval (lua_State *L); -Index: lua-5.1.3/src/lmem.h +Index: lua-5.1.4/src/lmem.h =================================================================== ---- lua-5.1.3.orig/src/lmem.h 2008-05-22 15:57:52.000000000 +0200 -+++ lua-5.1.3/src/lmem.h 2008-05-22 16:02:53.000000000 +0200 +--- lua-5.1.4.orig/src/lmem.h 2008-08-24 16:46:37.000000000 +0200 ++++ lua-5.1.4/src/lmem.h 2008-08-24 16:48:42.000000000 +0200 @@ -38,9 +38,9 @@ ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) @@ -55,10 +63,10 @@ Index: lua-5.1.3/src/lmem.h LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elem, int limit, const char *errormsg); -Index: lua-5.1.3/src/lstring.h +Index: lua-5.1.4/src/lstring.h =================================================================== ---- lua-5.1.3.orig/src/lstring.h 2008-05-22 15:57:52.000000000 +0200 -+++ lua-5.1.3/src/lstring.h 2008-05-22 16:02:53.000000000 +0200 +--- lua-5.1.4.orig/src/lstring.h 2008-08-24 16:46:37.000000000 +0200 ++++ lua-5.1.4/src/lstring.h 2008-08-24 16:48:42.000000000 +0200 @@ -25,7 +25,7 @@ LUAI_FUNC void luaS_resize (lua_State *L, int newsize); @@ -68,10 +76,10 @@ Index: lua-5.1.3/src/lstring.h #endif -Index: lua-5.1.3/src/lundump.h +Index: lua-5.1.4/src/lundump.h =================================================================== ---- lua-5.1.3.orig/src/lundump.h 2008-05-22 15:57:52.000000000 +0200 -+++ lua-5.1.3/src/lundump.h 2008-05-22 16:02:53.000000000 +0200 +--- lua-5.1.4.orig/src/lundump.h 2008-08-24 16:46:37.000000000 +0200 ++++ lua-5.1.4/src/lundump.h 2008-08-24 16:48:42.000000000 +0200 @@ -17,7 +17,7 @@ LUAI_FUNC void luaU_header (char* h); @@ -81,10 +89,10 @@ Index: lua-5.1.3/src/lundump.h #ifdef luac_c /* print one chunk; from print.c */ -Index: lua-5.1.3/src/Makefile +Index: lua-5.1.4/src/Makefile =================================================================== ---- lua-5.1.3.orig/src/Makefile 2008-05-22 16:02:53.000000000 +0200 -+++ lua-5.1.3/src/Makefile 2008-05-22 16:18:03.000000000 +0200 +--- lua-5.1.4.orig/src/Makefile 2008-08-24 16:48:20.000000000 +0200 ++++ lua-5.1.4/src/Makefile 2008-08-24 16:48:42.000000000 +0200 @@ -23,6 +23,7 @@ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris @@ -121,7 +129,7 @@ Index: lua-5.1.3/src/Makefile -$(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) +$(LUA_SO): $(CORE_O) $(LIB_O) -+ $(CC) -o $@.$(PKG_VERSION) -shared -soname="$@.$(PKG_VERSION)" $? -nostdlib -lgcc ++ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? + ln -fs $@.$(PKG_VERSION) $@ + +$(LUA_T): $(LUA_O) $(LUA_SO)