-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathluapp.patch
More file actions
122 lines (109 loc) · 4.1 KB
/
luapp.patch
File metadata and controls
122 lines (109 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
diff -Naur lua-5.3.6.orig/Makefile lua-5.3.6/Makefile
--- lua-5.3.6.orig/Makefile 2020-07-13 19:38:27.000000000 +0100
+++ lua-5.3.6/Makefile 2025-09-15 15:06:17.538363754 +0100
@@ -12,11 +12,11 @@
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
INSTALL_TOP= /usr/local
INSTALL_BIN= $(INSTALL_TOP)/bin
-INSTALL_INC= $(INSTALL_TOP)/include
+INSTALL_INC= $(INSTALL_TOP)/include/luapp/$V
INSTALL_LIB= $(INSTALL_TOP)/lib
INSTALL_MAN= $(INSTALL_TOP)/man/man1
-INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+INSTALL_LMOD= $(INSTALL_TOP)/share/luapp/$V
+INSTALL_CMOD= $(INSTALL_TOP)/lib/luapp/$V
# How to install. If your install program does not support "-p", then
# you may have to run ranlib on the installed liblua.a.
@@ -38,16 +38,16 @@
# Convenience platforms targets.
PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
-# What to install.
-TO_BIN= lua luac
-TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
-TO_MAN= lua.1 luac.1
-
# Lua version and release.
V= 5.3
R= $V.6
+# What to install.
+TO_BIN= luapp$V luacpp$V
+TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
+TO_LIB= libluapp$V.a
+TO_MAN= lua.1 luac.1
+
# Targets start here.
all: $(PLAT)
diff -Naur lua-5.3.6.orig/src/luaconf.h lua-5.3.6/src/luaconf.h
--- lua-5.3.6.orig/src/luaconf.h 2020-09-14 16:34:01.000000000 +0100
+++ lua-5.3.6/src/luaconf.h 2025-09-15 15:06:17.538363754 +0100
@@ -185,9 +185,9 @@
** In Windows, any exclamation mark ('!') in the path is replaced by the
** path of the directory of the executable file of the current process.
*/
-#define LUA_LDIR "!\\lua\\"
+#define LUA_LDIR "!\\luapp\\"
#define LUA_CDIR "!\\"
-#define LUA_SHRDIR "!\\..\\share\\lua\\" LUA_VDIR "\\"
+#define LUA_SHRDIR "!\\..\\share\\luapp\\" LUA_VDIR "\\"
#define LUA_PATH_DEFAULT \
LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua;" \
@@ -195,14 +195,14 @@
".\\?.lua;" ".\\?\\init.lua"
#define LUA_CPATH_DEFAULT \
LUA_CDIR"?.dll;" \
- LUA_CDIR"..\\lib\\lua\\" LUA_VDIR "\\?.dll;" \
+ LUA_CDIR"..\\lib\\luapp\\" LUA_VDIR "\\?.dll;" \
LUA_CDIR"loadall.dll;" ".\\?.dll"
#else /* }{ */
#define LUA_ROOT "/usr/local/"
-#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
-#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
+#define LUA_LDIR LUA_ROOT "share/luapp/" LUA_VDIR "/"
+#define LUA_CDIR LUA_ROOT "lib/luapp/" LUA_VDIR "/"
#define LUA_PATH_DEFAULT \
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
diff -Naur lua-5.3.6.orig/src/lua.h lua-5.3.6/src/lua.h
--- lua-5.3.6.orig/src/lua.h 2020-09-14 16:34:01.000000000 +0100
+++ lua-5.3.6/src/lua.h 2025-09-15 15:06:17.538363754 +0100
@@ -20,7 +20,7 @@
#define LUA_VERSION_NUM 503
#define LUA_VERSION_RELEASE "6"
-#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
+#define LUA_VERSION "Lua for C++ " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE
#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2020 Lua.org, PUC-Rio"
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
diff -Naur lua-5.3.6.orig/src/Makefile lua-5.3.6/src/Makefile
--- lua-5.3.6.orig/src/Makefile 2020-07-13 19:38:14.000000000 +0100
+++ lua-5.3.6/src/Makefile 2025-09-15 15:06:17.538363754 +0100
@@ -6,6 +6,10 @@
# Your platform. See PLATS for possible values.
PLAT= none
+# Lua version and release.
+V= 5.3
+R= $V.5
+
CC= gcc -std=gnu99
CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
@@ -28,7 +32,7 @@
PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
-LUA_A= liblua.a
+LUA_A= libluapp$V.a
CORE_O= lapi.o lcode.o lctype.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
@@ -36,10 +40,10 @@
lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
-LUA_T= lua
+LUA_T= luapp$V
LUA_O= lua.o
-LUAC_T= luac
+LUAC_T= luacpp$V
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)