New version 5.3.3

New library major 5.3
This commit is contained in:
Andrey Bondrov 2016-09-29 11:42:29 +10:00
parent 04be9a2bf6
commit a5f3e25ee7
9 changed files with 90 additions and 47 deletions

View file

@ -1,2 +1,2 @@
sources:
lua-5.2.3.tar.gz: 926b7907bc8d274e063d42804666b40a3f3c124c
lua-5.3.3.tar.gz: a0341bc3d1415b814cc738b2ec01ae56045d64ef

View file

@ -1,23 +0,0 @@
--- lua-5.2.0/src/luaconf.h 2011-12-06 17:58:36.000000000 +0100
+++ lua-5.2.0/src/luaconf.h.modules 2012-06-02 13:27:58.554648459 +0200
@@ -100,14 +100,17 @@
#else /* }{ */
#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
+#define LUA_CDIR64 LUA_ROOT "lib64/lua/" LUA_VDIR
#define LUA_PATH_DEFAULT \
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua"
+ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
+ LUA_CDIR64"?.lua;" LUA_CDIR64"?/init.lua;" "./?.lua"
#define LUA_CPATH_DEFAULT \
- LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
+ LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" \
+ LUA_CDIR64"?.so;" LUA_CDIR64"loadall.so;" "./?.so"
#endif /* } */

View file

@ -1,8 +1,9 @@
--- lua-5.2.0/src/Makefile 2011-09-19 14:45:14.000000000 +0200
+++ lua-5.2.0/src/Makefile.dynlib 2012-06-02 12:36:54.854704843 +0200
diff -urN lua-5.3.3/src/Makefile lua-5.3.3-patched/src/Makefile
--- lua-5.3.3/src/Makefile 2015-05-27 21:10:11.000000000 +1000
+++ lua-5.3.3-patched/src/Makefile 2016-09-29 11:32:43.061756321 +1000
@@ -28,6 +28,7 @@
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
+LUA_SO= liblua.so.$(V)
LUA_A= liblua.a

View file

@ -0,0 +1,24 @@
diff -urN lua-5.3.3/src/luaconf.h lua-5.3.3-patched/src/luaconf.h
--- lua-5.3.3/src/luaconf.h 2016-05-02 06:06:09.000000000 +1000
+++ lua-5.3.3-patched/src/luaconf.h 2016-09-29 11:37:19.848748990 +1000
@@ -188,15 +188,18 @@
#else /* }{ */
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
+#define LUA_CDIR64 LUA_ROOT "lib64/lua/" LUA_VDIR "/"
#define LUA_PATH_DEFAULT \
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
+ LUA_CDIR64"?.lua;" LUA_CDIR64"?/init.lua;" \
"./?.lua;" "./?/init.lua"
#define LUA_CPATH_DEFAULT \
- LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
+ LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" \
+ LUA_CDIR64"?.so;" LUA_CDIR64"loadall.so;" "./?.so"
#endif /* } */

View file

@ -0,0 +1,25 @@
diff -up lua-5.3.3/src/lparser.c.crashfix lua-5.3.3/src/lparser.c
--- lua-5.3.3/src/lparser.c.crashfix 2016-07-25 16:00:14.206121141 -0400
+++ lua-5.3.3/src/lparser.c 2016-07-25 16:00:51.910865872 -0400
@@ -323,6 +323,8 @@ static void adjust_assign (LexState *ls,
luaK_nil(fs, reg, extra);
}
}
+ if (nexps > nvars)
+ ls->fs->freereg -= nexps - nvars; /* remove extra values */
}
@@ -1160,11 +1162,8 @@ static void assignment (LexState *ls, st
int nexps;
checknext(ls, '=');
nexps = explist(ls, &e);
- if (nexps != nvars) {
+ if (nexps != nvars)
adjust_assign(ls, nvars, nexps, &e);
- if (nexps > nvars)
- ls->fs->freereg -= nexps - nvars; /* remove extra values */
- }
else {
luaK_setoneret(ls->fs, &e); /* close last expression */
luaK_storevar(ls->fs, &lh->v, &e);

View file

@ -0,0 +1,13 @@
diff -up lua-5.3.3/src/loslib.c.readpast lua-5.3.3/src/loslib.c
--- lua-5.3.3/src/loslib.c.readpast 2016-07-25 16:04:13.916465061 -0400
+++ lua-5.3.3/src/loslib.c 2016-07-25 16:04:19.756423878 -0400
@@ -260,7 +260,8 @@ static int getfield (lua_State *L, const
static const char *checkoption (lua_State *L, const char *conv, char *buff) {
const char *option;
int oplen = 1;
- for (option = LUA_STRFTIMEOPTIONS; *option != '\0'; option += oplen) {
+ int convlen = (int)strlen(conv);
+ for (option = LUA_STRFTIMEOPTIONS; *option != '\0' && oplen <= convlen; option += oplen) {
if (*option == '|') /* next block? */
oplen++; /* next length */
else if (memcmp(conv, option, oplen) == 0) { /* match? */

View file

@ -1,4 +1,4 @@
%define major 5.2
%define major 5.3
%define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d
%define staticname %mklibname %{name} -d -s
@ -6,19 +6,21 @@
Summary: Powerful, light-weight programming language
Name: lua
Version: 5.2.3
Release: 6
Version: 5.3.3
Release: 1
License: MIT
Group: Development/Other
Url: http://www.lua.org/
Source0: http://www.lua.org/ftp/%{name}-%{version}.tar.gz
Source1: lua.pc
Patch0: lua-5.2.1-dynlib.patch
Patch1: lua-5.2.0-modules_path.patch
Patch2: lua52-compat-old-versions.patch
Provides: lua%{major} = %{EVRD}
Patch0: lua-5.3.3-dynlib.patch
Patch1: lua-5.3.3-modules_path.patch
Patch2: lua53-compat-old-versions.patch
Patch3: lua-5.3.3-upstream-bug-1.patch
Patch4: lua-5.3.3-upstream-bug-2.patch
BuildRequires: readline-devel
BuildRequires: pkgconfig(ncurses)
Provides: lua%{major} = %{EVRD}
%description
Lua is a programming language originally designed for extending applications,

View file

@ -1,13 +0,0 @@
diff --git a/src/luaconf.h b/src/luaconf.h
index b7988ef..da78791 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -242,6 +242,8 @@
** ===================================================================
*/
+#define LUA_COMPAT_ALL
+
/*
@@ LUA_COMPAT_ALL controls all compatibility options.
** You can define it to get all options, or change specific options

View file

@ -0,0 +1,14 @@
diff -urN lua-5.3.3/src/luaconf.h lua-5.3.3-patched/src/luaconf.h
--- lua-5.3.3/src/luaconf.h 2016-05-02 06:06:09.000000000 +1000
+++ lua-5.3.3-patched/src/luaconf.h 2016-09-29 11:39:35.367745401 +1000
@@ -249,6 +249,10 @@
#define LUAMOD_API LUALIB_API
+#define LUA_COMPAT_ALL
+#define LUA_COMPAT_5_1
+#define LUA_COMPAT_5_2
+
/*
@@ LUAI_FUNC is a mark for all extern functions that are not to be
** exported to outside modules.