wok-next diff lua51/stuff/patches/lua-5.1.5-shared_library-1.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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lua51/stuff/patches/lua-5.1.5-shared_library-1.patch Wed Jan 30 23:34:32 2019 +0200 1.3 @@ -0,0 +1,66 @@ 1.4 +diff -ur lua-5.1.4/etc/lua.pc lua-5.1.4-new/etc/lua.pc 1.5 +--- lua-5.1.4/etc/lua.pc 2008-08-08 14:46:11.000000000 +0200 1.6 ++++ lua-5.1.4-new/etc/lua.pc 2012-02-23 18:25:34.000000000 +0100 1.7 +@@ -9,6 +9,6 @@ 1.8 + 1.9 + # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' 1.10 +-prefix= /usr/local 1.11 ++prefix= /usr 1.12 + INSTALL_BIN= ${prefix}/bin 1.13 + INSTALL_INC= ${prefix}/include 1.14 + INSTALL_LIB= ${prefix}/lib 1.15 +diff -ur lua-5.1.4/src/luaconf.h lua-5.1.4-new/src/luaconf.h 1.16 +--- lua-5.1.4/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100 1.17 ++++ lua-5.1.4-new/src/luaconf.h 2012-02-23 18:25:34.000000000 +0100 1.18 +@@ -94,7 +94,7 @@ 1.19 + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" 1.20 + 1.21 + #else 1.22 +-#define LUA_ROOT "/usr/local/" 1.23 ++#define LUA_ROOT "/usr/" 1.24 + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" 1.25 + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" 1.26 + #define LUA_PATH_DEFAULT \ 1.27 +diff -ur lua-5.1.4/src/Makefile lua-5.1.4-new/src/Makefile 1.28 +--- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100 1.29 ++++ lua-5.1.4-new/src/Makefile 2012-02-23 18:26:43.000000000 +0100 1.30 +@@ -24,6 +24,7 @@ 1.31 + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris 1.32 + 1.33 + LUA_A= liblua.a 1.34 ++LUA_SO= liblua.so 1.35 + CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ 1.36 + lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ 1.37 + lundump.o lvm.o lzio.o 1.38 +@@ -37,7 +38,7 @@ 1.39 + LUAC_O= luac.o print.o 1.40 + 1.41 + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) 1.42 +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) 1.43 ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) 1.44 + ALL_A= $(LUA_A) 1.45 + 1.46 + default: $(PLAT) 1.47 +@@ -52,6 +53,11 @@ 1.48 + $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files 1.49 + $(RANLIB) $@ 1.50 + 1.51 ++$(LUA_SO): $(CORE_O) $(LIB_O) 1.52 ++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) 1.53 ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) 1.54 ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) 1.55 ++ 1.56 + $(LUA_T): $(LUA_O) $(LUA_A) 1.57 + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) 1.58 + 1.59 +--- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200 1.60 ++++ lua-5.1.4-new/Makefile 2012-02-23 19:06:32.000000000 +0100 1.61 +@@ -53,7 +53,7 @@ 1.62 + all: $(PLAT) 1.63 + 1.64 + $(PLATS) clean: 1.65 +- cd src && $(MAKE) $@ 1.66 ++ cd src && $(MAKE) $@ V=$(V) R=$(R) 1.67 + 1.68 + test: dummy 1.69 + src/lua test/hello.lua