X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=package%2Flua%2Fpatches%2F020-shared_liblua.patch;h=18078ccc1f388b140236d40ab089807432e8c768;hb=a1b087b6817e0d82b92ce55217c77ae7ed36f73e;hp=7942e8760b77d2da28d552e5b6640ddb644cc00c;hpb=bdba5787663bee20325cabd76ed4661ee8c8dd96;p=openwrt.git diff --git a/package/lua/patches/020-shared_liblua.patch b/package/lua/patches/020-shared_liblua.patch index 7942e8760b..18078ccc1f 100644 --- a/package/lua/patches/020-shared_liblua.patch +++ b/package/lua/patches/020-shared_liblua.patch @@ -1,21 +1,27 @@ -diff -ur lua-5.1.3-pt1/Makefile lua-5.1.3-pt2/Makefile ---- lua-5.1.3-pt1/Makefile 2008-04-05 14:23:14.000000000 +0200 -+++ lua-5.1.3-pt2/Makefile 2008-04-05 15:13:38.000000000 +0200 -@@ -37,8 +37,8 @@ +--- a/Makefile ++++ b/Makefile +@@ -42,8 +42,8 @@ PLATS= aix ansi bsd freebsd generic linu # 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. -diff -ur lua-5.1.3-pt1/src/ldo.h lua-5.1.3-pt2/src/ldo.h ---- lua-5.1.3-pt1/src/ldo.h 2008-04-05 14:23:14.000000000 +0200 -+++ lua-5.1.3-pt2/src/ldo.h 2008-04-05 14:25:40.000000000 +0200 -@@ -46,7 +46,7 @@ +@@ -63,6 +63,7 @@ install: dummy + 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: +--- a/src/ldo.h ++++ b/src/ldo.h +@@ -46,7 +46,7 @@ LUAI_FUNC int luaD_pcall (lua_State *L, LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); @@ -24,9 +30,8 @@ diff -ur lua-5.1.3-pt1/src/ldo.h lua-5.1.3-pt2/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); -diff -ur lua-5.1.3-pt1/src/lfunc.h lua-5.1.3-pt2/src/lfunc.h ---- lua-5.1.3-pt1/src/lfunc.h 2008-04-05 14:23:14.000000000 +0200 -+++ lua-5.1.3-pt2/src/lfunc.h 2008-04-05 14:25:40.000000000 +0200 +--- a/src/lfunc.h ++++ b/src/lfunc.h @@ -18,7 +18,7 @@ cast(int, sizeof(TValue *)*((n)-1))) @@ -36,9 +41,8 @@ diff -ur lua-5.1.3-pt1/src/lfunc.h lua-5.1.3-pt2/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); -diff -ur lua-5.1.3-pt1/src/lmem.h lua-5.1.3-pt2/src/lmem.h ---- lua-5.1.3-pt1/src/lmem.h 2008-04-05 14:23:14.000000000 +0200 -+++ lua-5.1.3-pt2/src/lmem.h 2008-04-05 14:25:40.000000000 +0200 +--- a/src/lmem.h ++++ b/src/lmem.h @@ -38,9 +38,9 @@ ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) @@ -51,9 +55,8 @@ diff -ur lua-5.1.3-pt1/src/lmem.h lua-5.1.3-pt2/src/lmem.h LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elem, int limit, const char *errormsg); -diff -ur lua-5.1.3-pt1/src/lstring.h lua-5.1.3-pt2/src/lstring.h ---- lua-5.1.3-pt1/src/lstring.h 2008-04-05 14:23:14.000000000 +0200 -+++ lua-5.1.3-pt2/src/lstring.h 2008-04-05 14:25:40.000000000 +0200 +--- a/src/lstring.h ++++ b/src/lstring.h @@ -25,7 +25,7 @@ LUAI_FUNC void luaS_resize (lua_State *L, int newsize); @@ -63,10 +66,9 @@ diff -ur lua-5.1.3-pt1/src/lstring.h lua-5.1.3-pt2/src/lstring.h #endif -diff -ur lua-5.1.3-pt1/src/lundump.h lua-5.1.3-pt2/src/lundump.h ---- lua-5.1.3-pt1/src/lundump.h 2008-04-05 14:23:14.000000000 +0200 -+++ lua-5.1.3-pt2/src/lundump.h 2008-04-05 14:25:40.000000000 +0200 -@@ -17,7 +17,7 @@ +--- a/src/lundump.h ++++ b/src/lundump.h +@@ -17,7 +17,7 @@ LUAI_FUNC Proto* luaU_undump (lua_State* LUAI_FUNC void luaU_header (char* h); /* dump one chunk; from ldump.c */ @@ -75,10 +77,9 @@ diff -ur lua-5.1.3-pt1/src/lundump.h lua-5.1.3-pt2/src/lundump.h #ifdef luac_c /* print one chunk; from print.c */ -diff -ur lua-5.1.3-pt1/src/Makefile lua-5.1.3-pt2/src/Makefile ---- lua-5.1.3-pt1/src/Makefile 2008-04-05 14:23:31.000000000 +0200 -+++ lua-5.1.3-pt2/src/Makefile 2008-04-05 14:25:40.000000000 +0200 -@@ -23,6 +23,7 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -23,6 +23,7 @@ MYLIBS= PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris LUA_A= liblua.a @@ -86,7 +87,7 @@ diff -ur lua-5.1.3-pt1/src/Makefile lua-5.1.3-pt2/src/Makefile CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ lundump.o lvm.o lzio.o lnum.o -@@ -33,11 +34,12 @@ +@@ -33,11 +34,12 @@ LUA_T= lua LUA_O= lua.o LUAC_T= luac @@ -101,7 +102,7 @@ diff -ur lua-5.1.3-pt1/src/Makefile lua-5.1.3-pt2/src/Makefile default: $(PLAT) -@@ -47,14 +49,23 @@ +@@ -47,14 +49,23 @@ o: $(ALL_O) a: $(ALL_A) @@ -114,9 +115,9 @@ diff -ur lua-5.1.3-pt1/src/Makefile lua-5.1.3-pt2/src/Makefile -$(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) +$(LUA_SO): $(CORE_O) $(LIB_O) -+ $(LD) -o $@.$(PKG_VERSION) -shared -soname="$@.$(PKG_VERSION)" $? ++ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? + ln -fs $@.$(PKG_VERSION) $@ -+ ++ +$(LUA_T): $(LUA_O) $(LUA_SO) + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS) + @@ -128,7 +129,7 @@ diff -ur lua-5.1.3-pt1/src/Makefile lua-5.1.3-pt2/src/Makefile $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) clean: -@@ -96,7 +107,7 @@ +@@ -96,7 +107,7 @@ generic: $(MAKE) all MYCFLAGS= linux: