wok-next view 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 source
1 diff -ur lua-5.1.4/etc/lua.pc lua-5.1.4-new/etc/lua.pc
2 --- lua-5.1.4/etc/lua.pc 2008-08-08 14:46:11.000000000 +0200
3 +++ lua-5.1.4-new/etc/lua.pc 2012-02-23 18:25:34.000000000 +0100
4 @@ -9,6 +9,6 @@
6 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
7 -prefix= /usr/local
8 +prefix= /usr
9 INSTALL_BIN= ${prefix}/bin
10 INSTALL_INC= ${prefix}/include
11 INSTALL_LIB= ${prefix}/lib
12 diff -ur lua-5.1.4/src/luaconf.h lua-5.1.4-new/src/luaconf.h
13 --- lua-5.1.4/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100
14 +++ lua-5.1.4-new/src/luaconf.h 2012-02-23 18:25:34.000000000 +0100
15 @@ -94,7 +94,7 @@
16 ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
18 #else
19 -#define LUA_ROOT "/usr/local/"
20 +#define LUA_ROOT "/usr/"
21 #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
22 #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
23 #define LUA_PATH_DEFAULT \
24 diff -ur lua-5.1.4/src/Makefile lua-5.1.4-new/src/Makefile
25 --- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100
26 +++ lua-5.1.4-new/src/Makefile 2012-02-23 18:26:43.000000000 +0100
27 @@ -24,6 +24,7 @@
28 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
30 LUA_A= liblua.a
31 +LUA_SO= liblua.so
32 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
33 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
34 lundump.o lvm.o lzio.o
35 @@ -37,7 +38,7 @@
36 LUAC_O= luac.o print.o
38 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
39 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
40 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
41 ALL_A= $(LUA_A)
43 default: $(PLAT)
44 @@ -52,6 +53,11 @@
45 $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
46 $(RANLIB) $@
48 +$(LUA_SO): $(CORE_O) $(LIB_O)
49 + $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
50 + ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
51 + ln -sf $(LUA_SO).$(R) $(LUA_SO)
52 +
53 $(LUA_T): $(LUA_O) $(LUA_A)
54 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
56 --- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200
57 +++ lua-5.1.4-new/Makefile 2012-02-23 19:06:32.000000000 +0100
58 @@ -53,7 +53,7 @@
59 all: $(PLAT)
61 $(PLATS) clean:
62 - cd src && $(MAKE) $@
63 + cd src && $(MAKE) $@ V=$(V) R=$(R)
65 test: dummy
66 src/lua test/hello.lua