b7056fd47c67f849c4ad72830d8a60d64e6072d7
[openwrt/openwrt.git] / package / utils / lua / patches-host / 001-include-version-number.patch
1 From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Fri, 21 Jun 2019 14:08:38 +0200
4 Subject: [PATCH] include version number
5
6 Including it allows multiple lua versions to coexist.
7
8 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
9 ---
10
11 diff --git a/Makefile b/Makefile
12 --- a/Makefile
13 +++ b/Makefile
14 @@ -41,10 +41,10 @@ RANLIB= ranlib
15 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
16
17 # What to install.
18 -TO_BIN= lua luac
19 +TO_BIN= lua$V luac$V
20 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
21 TO_LIB= liblua.a
22 -TO_MAN= lua.1 luac.1
23 +TO_MAN= lua$V.1 luac$V.1
24
25 # Lua version and release.
26 V= 5.1
27 diff --git a/doc/lua.1 b/doc/lua5.1.1
28 rename from doc/lua.1
29 rename to doc/lua5.1.1
30 diff --git a/doc/luac.1 b/doc/luac5.1.1
31 rename from doc/luac.1
32 rename to doc/luac5.1.1
33 diff --git a/src/Makefile b/src/Makefile
34 --- a/src/Makefile
35 +++ b/src/Makefile
36 @@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
37 LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
38 lstrlib.o loadlib.o linit.o
39
40 -LUA_T= lua
41 +LUA_T= lua$V
42 LUA_O= lua.o
43
44 -LUAC_T= luac
45 +LUAC_T= luac$V
46 LUAC_O= luac.o print.o
47
48 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)