From 4574ca4cc26c7eb39ee4f1e1b20b63582fcafe95 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 19 Jun 2014 13:10:25 +0200 Subject: [PATCH] Rebase to 5.1.5 (rhbz#1111013) --- .gitignore | 1 + compat-lua.spec | 17 ++-- lua-5.1.4-2.patch | 195 ------------------------------------ lua-5.1.4-autotoolize.patch | 6 +- sources | 2 +- 5 files changed, 14 insertions(+), 207 deletions(-) delete mode 100644 lua-5.1.4-2.patch diff --git a/.gitignore b/.gitignore index 7966dfb..d9b1f91 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /lua-5.1.4.tar.gz +/lua-5.1.5.tar.gz diff --git a/compat-lua.spec b/compat-lua.spec index a29a3a3..e57e0b5 100644 --- a/compat-lua.spec +++ b/compat-lua.spec @@ -1,6 +1,6 @@ Name: compat-lua -Version: 5.1.4 -Release: 6%{?dist} +Version: 5.1.5 +Release: 1%{?dist} Summary: Powerful light-weight programming language (compat version) Group: Development/Languages License: MIT @@ -9,8 +9,7 @@ Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz Patch0: lua-5.1.4-autotoolize.patch Patch1: lua-5.1.4-lunatic.patch Patch2: lua-5.1.4-idsize.patch -Patch3: lua-5.1.4-2.patch -Patch4: lua-5.1.4-pc-compat.patch +Patch3: lua-5.1.4-pc-compat.patch BuildRequires: readline-devel ncurses-devel libtool Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: lua = 5.1 @@ -41,11 +40,10 @@ This package contains development files for compat-lua-libs. %patch0 -p1 -E -z .autoxxx %patch1 -p0 -z .lunatic %patch2 -p1 -z .idsize -%patch3 -p0 -d src -z .bugfix2 -%patch4 -p1 +%patch3 -p1 # fix perms on auto files chmod u+x autogen.sh config.guess config.sub configure depcomp install-sh missing -# Avoid make doing auto-reconf itself, killing our rpath removel in the process +# Avoid make doing auto-reconf itself, killing our rpath removal in the process autoreconf -i -f @@ -61,7 +59,7 @@ sed -i 's/-lreadline -lncurses //g' etc/lua.pc %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install rm $RPM_BUILD_ROOT%{_libdir}/liblua.{a,la} mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/5.1 mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/5.1 @@ -102,6 +100,9 @@ mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig/lua.pc \ %changelog +* Thu Jun 19 2014 Hans de Goede - 5.1.5-1 +- Rebase to 5.1.5 (rhbz#1111013) + * Sat Jun 07 2014 Fedora Release Engineering - 5.1.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/lua-5.1.4-2.patch b/lua-5.1.4-2.patch deleted file mode 100644 index ebfe438..0000000 --- a/lua-5.1.4-2.patch +++ /dev/null @@ -1,195 +0,0 @@ -# patch-lua-5.1.4-2 created 2010-05-14T21:02:40-0300 -# apply to a pristine copy of Lua 5.1.4 with: -# wget http://www.lua.org/ftp/lua-5.1.4.tar.gz -# tar zxf lua-5.1.4.tar.gz -# cd lua-5.1.4/src -# wget http://www.lua.org/ftp/patch-lua-5.1.4-2 -# patch < patch-lua-5.1.4-2 -# use curl -O -R if you don't have wget - ---- lcode.c 2007/12/28 15:32:23 2.25.1.3 -+++ lcode.c 2009/06/15 14:12:25 2.25.1.4 -@@ -1,5 +1,5 @@ - /* --** $Id: lcode.c,v 2.25.1.3 2007/12/28 15:32:23 roberto Exp $ -+** $Id: lcode.c,v 2.25.1.4 2009/06/15 14:12:25 roberto Exp $ - ** Code generator for Lua - ** See Copyright Notice in lua.h - */ -@@ -544,15 +544,18 @@ - pc = NO_JUMP; /* always true; do nothing */ - break; - } -- case VFALSE: { -- pc = luaK_jump(fs); /* always jump */ -- break; -- } - case VJMP: { - invertjump(fs, e); - pc = e->u.s.info; - break; - } -+ case VFALSE: { -+ if (!hasjumps(e)) { -+ pc = luaK_jump(fs); /* always jump */ -+ break; -+ } -+ /* else go through */ -+ } - default: { - pc = jumponcond(fs, e, 0); - break; -@@ -572,14 +575,17 @@ - pc = NO_JUMP; /* always false; do nothing */ - break; - } -- case VTRUE: { -- pc = luaK_jump(fs); /* always jump */ -- break; -- } - case VJMP: { - pc = e->u.s.info; - break; - } -+ case VTRUE: { -+ if (!hasjumps(e)) { -+ pc = luaK_jump(fs); /* always jump */ -+ break; -+ } -+ /* else go through */ -+ } - default: { - pc = jumponcond(fs, e, 1); - break; ---- ldblib.c 2008/01/21 13:11:21 1.104.1.3 -+++ ldblib.c 2009/08/04 18:50:18 1.104.1.4 -@@ -1,5 +1,5 @@ - /* --** $Id: ldblib.c,v 1.104.1.3 2008/01/21 13:11:21 roberto Exp $ -+** $Id: ldblib.c,v 1.104.1.4 2009/08/04 18:50:18 roberto Exp $ - ** Interface from Lua to its debug API - ** See Copyright Notice in lua.h - */ -@@ -45,6 +45,7 @@ - - - static int db_getfenv (lua_State *L) { -+ luaL_checkany(L, 1); - lua_getfenv(L, 1); - return 1; - } ---- liolib.c 2008/01/18 17:47:43 2.73.1.3 -+++ liolib.c 2010/05/14 15:33:51 2.73.1.4 -@@ -1,5 +1,5 @@ - /* --** $Id: liolib.c,v 2.73.1.3 2008/01/18 17:47:43 roberto Exp $ -+** $Id: liolib.c,v 2.73.1.4 2010/05/14 15:33:51 roberto Exp $ - ** Standard I/O (and system) library - ** See Copyright Notice in lua.h - */ -@@ -276,7 +276,10 @@ - lua_pushnumber(L, d); - return 1; - } -- else return 0; /* read fails */ -+ else { -+ lua_pushnil(L); /* "result" to be removed */ -+ return 0; /* read fails */ -+ } - } - - ---- llex.c 2007/12/27 13:02:25 2.20.1.1 -+++ llex.c 2009/11/23 14:58:22 2.20.1.2 -@@ -1,5 +1,5 @@ - /* --** $Id: llex.c,v 2.20.1.1 2007/12/27 13:02:25 roberto Exp $ -+** $Id: llex.c,v 2.20.1.2 2009/11/23 14:58:22 roberto Exp $ - ** Lexical Analyzer - ** See Copyright Notice in lua.h - */ -@@ -118,8 +118,10 @@ - lua_State *L = ls->L; - TString *ts = luaS_newlstr(L, str, l); - TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */ -- if (ttisnil(o)) -+ if (ttisnil(o)) { - setbvalue(o, 1); /* make sure `str' will not be collected */ -+ luaC_checkGC(L); -+ } - return ts; - } - ---- loadlib.c 2008/08/06 13:29:28 1.52.1.3 -+++ loadlib.c 2009/09/09 13:17:16 1.52.1.4 -@@ -1,5 +1,5 @@ - /* --** $Id: loadlib.c,v 1.52.1.3 2008/08/06 13:29:28 roberto Exp $ -+** $Id: loadlib.c,v 1.52.1.4 2009/09/09 13:17:16 roberto Exp $ - ** Dynamic library loader for Lua - ** See Copyright Notice in lua.h - ** -@@ -639,7 +639,7 @@ - lua_pushvalue(L, -1); - lua_replace(L, LUA_ENVIRONINDEX); - /* create `loaders' table */ -- lua_createtable(L, 0, sizeof(loaders)/sizeof(loaders[0]) - 1); -+ lua_createtable(L, sizeof(loaders)/sizeof(loaders[0]) - 1, 0); - /* fill it with pre-defined loaders */ - for (i=0; loaders[i] != NULL; i++) { - lua_pushcfunction(L, loaders[i]); ---- lstrlib.c 2008/07/11 17:27:21 1.132.1.4 -+++ lstrlib.c 2010/05/14 15:34:19 1.132.1.5 -@@ -1,5 +1,5 @@ - /* --** $Id: lstrlib.c,v 1.132.1.4 2008/07/11 17:27:21 roberto Exp $ -+** $Id: lstrlib.c,v 1.132.1.5 2010/05/14 15:34:19 roberto Exp $ - ** Standard library for string operations and pattern-matching - ** See Copyright Notice in lua.h - */ -@@ -754,6 +754,7 @@ - - - static int str_format (lua_State *L) { -+ int top = lua_gettop(L); - int arg = 1; - size_t sfl; - const char *strfrmt = luaL_checklstring(L, arg, &sfl); -@@ -768,7 +769,8 @@ - else { /* format item */ - char form[MAX_FORMAT]; /* to store the format (`%...') */ - char buff[MAX_ITEM]; /* to store the formatted item */ -- arg++; -+ if (++arg > top) -+ luaL_argerror(L, arg, "no value"); - strfrmt = scanformat(L, strfrmt, form); - switch (*strfrmt++) { - case 'c': { ---- lvm.c 2007/12/28 15:32:23 2.63.1.3 -+++ lvm.c 2009/07/01 21:10:33 2.63.1.4 -@@ -1,5 +1,5 @@ - /* --** $Id: lvm.c,v 2.63.1.3 2007/12/28 15:32:23 roberto Exp $ -+** $Id: lvm.c,v 2.63.1.4 2009/07/01 21:10:33 roberto Exp $ - ** Lua virtual machine - ** See Copyright Notice in lua.h - */ -@@ -133,6 +133,7 @@ - - void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) { - int loop; -+ TValue temp; - for (loop = 0; loop < MAXTAGLOOP; loop++) { - const TValue *tm; - if (ttistable(t)) { /* `t' is a table? */ -@@ -152,7 +153,9 @@ - callTM(L, tm, t, key, val); - return; - } -- t = tm; /* else repeat with `tm' */ -+ /* else repeat with `tm' */ -+ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */ -+ t = &temp; - } - luaG_runerror(L, "loop in settable"); - } diff --git a/lua-5.1.4-autotoolize.patch b/lua-5.1.4-autotoolize.patch index afcb3fb..c8bef6b 100644 --- a/lua-5.1.4-autotoolize.patch +++ b/lua-5.1.4-autotoolize.patch @@ -31990,7 +31990,7 @@ diff -urN lua-5.1.4/etc/lua.pc lua-5.1.4-autotoolize/etc/lua.pc -# grep '^V=' ../Makefile -V= 5.1 -# grep '^R=' ../Makefile --R= 5.1.4 +-R= 5.1.5 - -# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' -prefix= /usr/local @@ -39874,7 +39874,7 @@ diff -urN lua-5.1.4/Makefile lua-5.1.4-autotoolize/Makefile - -# Lua version and release. -V= 5.1 --R= 5.1.4 +-R= 5.1.5 - -all: $(PLAT) - @@ -42520,7 +42520,7 @@ diff -urN lua-5.1.4/src/Makefile lua-5.1.4-autotoolize/src/Makefile -a: $(ALL_A) - -$(LUA_A): $(CORE_O) $(LIB_O) -- $(AR) $@ $? +- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files - $(RANLIB) $@ - -$(LUA_T): $(LUA_O) $(LUA_A) diff --git a/sources b/sources index 9e11e02..7257c5e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d0870f2de55d59c1c8419f36e8fac150 lua-5.1.4.tar.gz +2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz