Update autotoolize patch, include Lua bugfix patch
This commit is contained in:
parent
c6e0c4483b
commit
aec7b633dd
195
lua-5.1.4-2.patch
Normal file
195
lua-5.1.4-2.patch
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
# 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");
|
||||||
|
}
|
@ -10544,7 +10544,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
@@ -0,0 +1,20444 @@
|
@@ -0,0 +1,20444 @@
|
||||||
+#! /bin/sh
|
+#! /bin/sh
|
||||||
+# Guess values for system-dependent variables and create Makefiles.
|
+# Guess values for system-dependent variables and create Makefiles.
|
||||||
+# Generated by GNU Autoconf 2.59 for Autotoolized Lua 5.1.3.
|
+# Generated by GNU Autoconf 2.59 for Autotoolized Lua 5.1.4.
|
||||||
+#
|
+#
|
||||||
+# Copyright (C) 2003 Free Software Foundation, Inc.
|
+# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
+# This configure script is free software; the Free Software Foundation
|
+# This configure script is free software; the Free Software Foundation
|
||||||
@ -10965,8 +10965,8 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+# Identity of this package.
|
+# Identity of this package.
|
||||||
+PACKAGE_NAME='Autotoolized Lua'
|
+PACKAGE_NAME='Autotoolized Lua'
|
||||||
+PACKAGE_TARNAME='lua-at'
|
+PACKAGE_TARNAME='lua-at'
|
||||||
+PACKAGE_VERSION='5.1.3'
|
+PACKAGE_VERSION='5.1.4'
|
||||||
+PACKAGE_STRING='Autotoolized Lua 5.1.3'
|
+PACKAGE_STRING='Autotoolized Lua 5.1.4'
|
||||||
+PACKAGE_BUGREPORT=''
|
+PACKAGE_BUGREPORT=''
|
||||||
+
|
+
|
||||||
+ac_unique_file="src/lapi.c"
|
+ac_unique_file="src/lapi.c"
|
||||||
@ -11496,7 +11496,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+ # Omit some internal or obsolete options to make the list less imposing.
|
+ # Omit some internal or obsolete options to make the list less imposing.
|
||||||
+ # This message is too long to be a string in the A/UX 3.1 sh.
|
+ # This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
+ cat <<_ACEOF
|
+ cat <<_ACEOF
|
||||||
+\`configure' configures Autotoolized Lua 5.1.3 to adapt to many kinds of systems.
|
+\`configure' configures Autotoolized Lua 5.1.4 to adapt to many kinds of systems.
|
||||||
+
|
+
|
||||||
+Usage: $0 [OPTION]... [VAR=VALUE]...
|
+Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
+
|
+
|
||||||
@ -11562,7 +11562,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+
|
+
|
||||||
+if test -n "$ac_init_help"; then
|
+if test -n "$ac_init_help"; then
|
||||||
+ case $ac_init_help in
|
+ case $ac_init_help in
|
||||||
+ short | recursive ) echo "Configuration of Autotoolized Lua 5.1.3:";;
|
+ short | recursive ) echo "Configuration of Autotoolized Lua 5.1.4:";;
|
||||||
+ esac
|
+ esac
|
||||||
+ cat <<\_ACEOF
|
+ cat <<\_ACEOF
|
||||||
+
|
+
|
||||||
@ -11701,7 +11701,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+test -n "$ac_init_help" && exit 0
|
+test -n "$ac_init_help" && exit 0
|
||||||
+if $ac_init_version; then
|
+if $ac_init_version; then
|
||||||
+ cat <<\_ACEOF
|
+ cat <<\_ACEOF
|
||||||
+Autotoolized Lua configure 5.1.3
|
+Autotoolized Lua configure 5.1.4
|
||||||
+generated by GNU Autoconf 2.59
|
+generated by GNU Autoconf 2.59
|
||||||
+
|
+
|
||||||
+Copyright (C) 2003 Free Software Foundation, Inc.
|
+Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
@ -11715,7 +11715,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+This file contains any messages produced by compilers while
|
+This file contains any messages produced by compilers while
|
||||||
+running configure, to aid debugging if configure makes a mistake.
|
+running configure, to aid debugging if configure makes a mistake.
|
||||||
+
|
+
|
||||||
+It was created by Autotoolized Lua $as_me 5.1.3, which was
|
+It was created by Autotoolized Lua $as_me 5.1.4, which was
|
||||||
+generated by GNU Autoconf 2.59. Invocation command line was
|
+generated by GNU Autoconf 2.59. Invocation command line was
|
||||||
+
|
+
|
||||||
+ $ $0 $@
|
+ $ $0 $@
|
||||||
@ -12363,7 +12363,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+
|
+
|
||||||
+# Define the identity of the package.
|
+# Define the identity of the package.
|
||||||
+ PACKAGE='lua-at'
|
+ PACKAGE='lua-at'
|
||||||
+ VERSION='5.1.3'
|
+ VERSION='5.1.4'
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+cat >>confdefs.h <<_ACEOF
|
+cat >>confdefs.h <<_ACEOF
|
||||||
@ -29932,7 +29932,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+} >&5
|
+} >&5
|
||||||
+cat >&5 <<_CSEOF
|
+cat >&5 <<_CSEOF
|
||||||
+
|
+
|
||||||
+This file was extended by Autotoolized Lua $as_me 5.1.3, which was
|
+This file was extended by Autotoolized Lua $as_me 5.1.4, which was
|
||||||
+generated by GNU Autoconf 2.59. Invocation command line was
|
+generated by GNU Autoconf 2.59. Invocation command line was
|
||||||
+
|
+
|
||||||
+ CONFIG_FILES = $CONFIG_FILES
|
+ CONFIG_FILES = $CONFIG_FILES
|
||||||
@ -29995,7 +29995,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
|
|||||||
+
|
+
|
||||||
+cat >>$CONFIG_STATUS <<_ACEOF
|
+cat >>$CONFIG_STATUS <<_ACEOF
|
||||||
+ac_cs_version="\\
|
+ac_cs_version="\\
|
||||||
+Autotoolized Lua config.status 5.1.3
|
+Autotoolized Lua config.status 5.1.4
|
||||||
+configured by $0, generated by GNU Autoconf 2.59,
|
+configured by $0, generated by GNU Autoconf 2.59,
|
||||||
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||||
+
|
+
|
||||||
@ -30991,7 +30991,7 @@ diff -urN lua-5.1.4/configure.ac lua-5.1.4-autotoolize/configure.ac
|
|||||||
+++ lua-5.1.4-autotoolize/configure.ac 2008-09-03 13:18:37.000000000 +0200
|
+++ lua-5.1.4-autotoolize/configure.ac 2008-09-03 13:18:37.000000000 +0200
|
||||||
@@ -0,0 +1,68 @@
|
@@ -0,0 +1,68 @@
|
||||||
+AC_PREREQ(2.59)
|
+AC_PREREQ(2.59)
|
||||||
+AC_INIT([Autotoolized Lua], [5.1.3], [], [lua-at])
|
+AC_INIT([Autotoolized Lua], [5.1.4], [], [lua-at])
|
||||||
+
|
+
|
||||||
+AC_CONFIG_HEADERS([config.h])
|
+AC_CONFIG_HEADERS([config.h])
|
||||||
+AC_CONFIG_SRCDIR([src/lapi.c])
|
+AC_CONFIG_SRCDIR([src/lapi.c])
|
||||||
@ -32019,7 +32019,7 @@ diff -urN lua-5.1.4/etc/lua.pc.in lua-5.1.4-autotoolize/etc/lua.pc.in
|
|||||||
+++ lua-5.1.4-autotoolize/etc/lua.pc.in 2008-09-03 13:18:23.000000000 +0200
|
+++ lua-5.1.4-autotoolize/etc/lua.pc.in 2008-09-03 13:18:23.000000000 +0200
|
||||||
@@ -0,0 +1,13 @@
|
@@ -0,0 +1,13 @@
|
||||||
+V= 5.1
|
+V= 5.1
|
||||||
+R= 5.1.3
|
+R= @VERSION@
|
||||||
+prefix= @prefix@
|
+prefix= @prefix@
|
||||||
+exec_prefix=${prefix}
|
+exec_prefix=${prefix}
|
||||||
+libdir= @libdir@
|
+libdir= @libdir@
|
||||||
|
8
lua.spec
8
lua.spec
@ -1,6 +1,6 @@
|
|||||||
Name: lua
|
Name: lua
|
||||||
Version: 5.1.4
|
Version: 5.1.4
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: Powerful light-weight programming language
|
Summary: Powerful light-weight programming language
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -9,6 +9,7 @@ Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz
|
|||||||
Patch0: lua-5.1.4-autotoolize.patch
|
Patch0: lua-5.1.4-autotoolize.patch
|
||||||
Patch1: lua-5.1.4-lunatic.patch
|
Patch1: lua-5.1.4-lunatic.patch
|
||||||
Patch2: lua-5.1.4-idsize.patch
|
Patch2: lua-5.1.4-idsize.patch
|
||||||
|
Patch3: lua-5.1.4-2.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: readline-devel ncurses-devel
|
BuildRequires: readline-devel ncurses-devel
|
||||||
Provides: lua = 5.1
|
Provides: lua = 5.1
|
||||||
@ -47,6 +48,7 @@ This package contains the static version of liblua for %{name}.
|
|||||||
%patch0 -p1 -E -z .autoxxx
|
%patch0 -p1 -E -z .autoxxx
|
||||||
%patch1 -p0 -z .lunatic
|
%patch1 -p0 -z .lunatic
|
||||||
%patch2 -p1 -z .idsize
|
%patch2 -p1 -z .idsize
|
||||||
|
%patch3 -p0 -d src -z .bugfix2
|
||||||
# fix perms on auto files
|
# fix perms on auto files
|
||||||
chmod u+x autogen.sh config.guess config.sub configure depcomp install-sh missing
|
chmod u+x autogen.sh config.guess config.sub configure depcomp install-sh missing
|
||||||
|
|
||||||
@ -98,6 +100,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/*.a
|
%{_libdir}/*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 28 2011 Tim Niemueller <tim@niemueller.de> - 5.1.4-7
|
||||||
|
- Add patch to from lua.org with smaller bugfixes
|
||||||
|
- sed -i -e 's/5\.1\.3/5.1.4/g' on autotoolize patch, bug #641144
|
||||||
|
|
||||||
* Fri Jan 28 2011 Tim Niemueller <tim@niemueller.de> - 5.1.4-6
|
* Fri Jan 28 2011 Tim Niemueller <tim@niemueller.de> - 5.1.4-6
|
||||||
- Add patch to increase IDSIZE for more useful error messages
|
- Add patch to increase IDSIZE for more useful error messages
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user