wok-next view lua5.1/stuff/patches/lua5.1.5.patch @ rev 20791

Up gnome-games, and add/update all the required dependencies
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Jun 10 01:56:40 2018 +0300 (2018-06-10)
parents
children
line source
1 --- a/Makefile
2 +++ b/Makefile
3 @@ -9,11 +9,11 @@
5 # Where to install. The installation starts in the src and doc directories,
6 # so take care if INSTALL_TOP is not an absolute path.
7 -INSTALL_TOP= /usr/local
8 +INSTALL_TOP= $(DESTDIR)/usr
9 INSTALL_BIN= $(INSTALL_TOP)/bin
10 -INSTALL_INC= $(INSTALL_TOP)/include
11 +INSTALL_INC= $(INSTALL_TOP)/include/lua/$V
12 INSTALL_LIB= $(INSTALL_TOP)/lib
13 -INSTALL_MAN= $(INSTALL_TOP)/man/man1
14 +INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
15 #
16 # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
17 # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
18 @@ -24,7 +24,7 @@
19 # may have to run ranlib on the installed liblua.a (do "make ranlib").
20 INSTALL= install -p
21 INSTALL_EXEC= $(INSTALL) -m 0755
22 -INSTALL_DATA= $(INSTALL) -m 0644
23 +INSTALL_DATA= cp -d
24 #
25 # If you don't have install you can use cp instead.
26 # INSTALL= cp -p
27 @@ -41,9 +41,9 @@
28 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
30 # What to install.
31 -TO_BIN= lua luac
32 +TO_BIN= lua$V luac$V
33 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
34 -TO_LIB= liblua.a
35 +TO_LIB= liblua$V.a liblua$V.so liblua$V.so.$V liblua$V.so.$R
36 TO_MAN= lua.1 luac.1
38 # Lua version and release.
39 @@ -53,7 +53,7 @@
40 all: $(PLAT)
42 $(PLATS) clean:
43 - cd src && $(MAKE) $@
44 + cd src && $(MAKE) $@ V=$(V) R=$(R)
46 test: dummy
47 src/lua test/hello.lua
48 Only in source/: lua5.1-5.1.5/done.lua5.1.5.patch
49 --- a/etc/lua.pc
50 +++ b/etc/lua.pc
51 @@ -8,24 +8,24 @@
52 R= 5.1.5
54 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
55 -prefix= /usr/local
56 +prefix= /usr
57 INSTALL_BIN= ${prefix}/bin
58 -INSTALL_INC= ${prefix}/include
59 -INSTALL_LIB= ${prefix}/lib
60 +INSTALL_INC= ${prefix}/include/lua/${V}
61 +INSTALL_LIB= ${prefix}/lib/lua/${V}
62 INSTALL_MAN= ${prefix}/man/man1
63 INSTALL_LMOD= ${prefix}/share/lua/${V}
64 INSTALL_CMOD= ${prefix}/lib/lua/${V}
66 # canonical vars
67 exec_prefix=${prefix}
68 -libdir=${exec_prefix}/lib
69 -includedir=${prefix}/include
70 +libdir=${exec_prefix}/lib/lua/${V}
71 +includedir=${prefix}/include/lua/${V}
73 Name: Lua
74 Description: An Extensible Extension Language
75 Version: ${R}
76 Requires:
77 -Libs: -L${libdir} -llua -lm
78 +Libs: -L${libdir} -llua${V} -lm
79 Cflags: -I${includedir}
81 # (end of lua.pc)
82 --- a/src/Makefile
83 +++ b/src/Makefile
84 @@ -8,7 +8,8 @@
85 PLAT= none
87 CC= gcc
88 -CFLAGS= -O2 -Wall $(MYCFLAGS)
89 +CFLAGS ?= -O2 -Wall
90 +CFLAGS += $(MYCFLAGS)
91 AR= ar rcu
92 RANLIB= ranlib
93 RM= rm -f
94 @@ -22,21 +23,22 @@
96 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
98 -LUA_A= liblua.a
99 +LUA_A= liblua$(V).a
100 +LUA_SO= liblua$(V).so
101 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
102 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
103 lundump.o lvm.o lzio.o
104 LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
105 lstrlib.o loadlib.o linit.o
107 -LUA_T= lua
108 +LUA_T= lua$(V)
109 LUA_O= lua.o
111 -LUAC_T= luac
112 +LUAC_T= luac$(V)
113 LUAC_O= luac.o print.o
115 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
116 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
117 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
118 ALL_A= $(LUA_A)
120 default: $(PLAT)
121 @@ -50,6 +52,11 @@
122 $(LUA_A): $(CORE_O) $(LIB_O)
123 $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
124 $(RANLIB) $@
125 +
126 +$(LUA_SO): $(CORE_O) $(LIB_O)
127 + $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
128 + ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
129 + ln -sf $(LUA_SO).$(R) $(LUA_SO)
131 $(LUA_T): $(LUA_O) $(LUA_A)
132 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
133 --- a/src/luaconf.h
134 +++ b/src/luaconf.h
135 @@ -94,7 +94,7 @@
136 ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
138 #else
139 -#define LUA_ROOT "/usr/local/"
140 +#define LUA_ROOT "/usr/"
141 #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
142 #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
143 #define LUA_PATH_DEFAULT \