summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Niemueller <niemueller@kbsg.rwth-aachen.de>2011-01-29 11:47:31 +0100
committerTim Niemueller <niemueller@kbsg.rwth-aachen.de>2011-01-29 11:47:31 +0100
commit79052831cb953d4667424307fc0c9ccf7d77a0d6 (patch)
treef0719b04bfa507455bc798b941f337bc02670524
parent3310d8d4fde37204b740bc3b2184d8bfbd9b114c (diff)
parentaec7b633ddf2ea07b329e420845f1908a7036b25 (diff)
downloadlua-79052831cb953d4667424307fc0c9ccf7d77a0d6.tar.gz
lua-79052831cb953d4667424307fc0c9ccf7d77a0d6.tar.xz
lua-79052831cb953d4667424307fc0c9ccf7d77a0d6.zip
Merge branch 'master' into f13
Conflicts: .gitignore
-rw-r--r--.gitignore5
-rw-r--r--lua-5.1.4-2.patch195
-rw-r--r--lua-5.1.4-autotoolize.patch24
-rw-r--r--lua-5.1.4-idsize.patch12
-rw-r--r--lua-5.1.4-lunatic.patch11
-rw-r--r--lua.spec18
6 files changed, 252 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index f18efa1..c5ac7a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,6 @@
lua-5.1.4.tar.gz
+lua-5.1.4/
+.build*
+*.src.rpm
+/x86_64/
+/i386/
diff --git a/lua-5.1.4-2.patch b/lua-5.1.4-2.patch
new file mode 100644
index 0000000..ebfe438
--- /dev/null
+++ b/lua-5.1.4-2.patch
@@ -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");
+ }
diff --git a/lua-5.1.4-autotoolize.patch b/lua-5.1.4-autotoolize.patch
index 8aa8812..afcb3fb 100644
--- a/lua-5.1.4-autotoolize.patch
+++ b/lua-5.1.4-autotoolize.patch
@@ -10544,7 +10544,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
@@ -0,0 +1,20444 @@
+#! /bin/sh
+# 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.
+# 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.
+PACKAGE_NAME='Autotoolized Lua'
+PACKAGE_TARNAME='lua-at'
-+PACKAGE_VERSION='5.1.3'
-+PACKAGE_STRING='Autotoolized Lua 5.1.3'
++PACKAGE_VERSION='5.1.4'
++PACKAGE_STRING='Autotoolized Lua 5.1.4'
+PACKAGE_BUGREPORT=''
+
+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.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ 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]...
+
@@ -11562,7 +11562,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
+
+if test -n "$ac_init_help"; then
+ 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
+ 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
+if $ac_init_version; then
+ cat <<\_ACEOF
-+Autotoolized Lua configure 5.1.3
++Autotoolized Lua configure 5.1.4
+generated by GNU Autoconf 2.59
+
+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
+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
+
+ $ $0 $@
@@ -12363,7 +12363,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
+
+# Define the identity of the package.
+ PACKAGE='lua-at'
-+ VERSION='5.1.3'
++ VERSION='5.1.4'
+
+
+cat >>confdefs.h <<_ACEOF
@@ -29932,7 +29932,7 @@ diff -urN lua-5.1.4/configure lua-5.1.4-autotoolize/configure
+} >&5
+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
+
+ 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
+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,
+ 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
@@ -0,0 +1,68 @@
+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_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
@@ -0,0 +1,13 @@
+V= 5.1
-+R= 5.1.3
++R= @VERSION@
+prefix= @prefix@
+exec_prefix=${prefix}
+libdir= @libdir@
diff --git a/lua-5.1.4-idsize.patch b/lua-5.1.4-idsize.patch
new file mode 100644
index 0000000..d457b38
--- /dev/null
+++ b/lua-5.1.4-idsize.patch
@@ -0,0 +1,12 @@
+diff -urN lua-5.1.4/src/luaconf.h.template.in lua-5.1.4.idsize/src/luaconf.h.template.in
+--- lua-5.1.4/src/luaconf.h.template.in 2011-01-28 19:18:03.176584291 +0100
++++ lua-5.1.4.idsize/src/luaconf.h.template.in 2011-01-28 19:19:26.581213131 +0100
+@@ -216,7 +216,7 @@
+ @* of a function in debug information.
+ ** CHANGE it if you want a different size.
+ */
+-#define LUA_IDSIZE 60
++#define LUA_IDSIZE 512
+
+
+ /*
diff --git a/lua-5.1.4-lunatic.patch b/lua-5.1.4-lunatic.patch
new file mode 100644
index 0000000..70315b2
--- /dev/null
+++ b/lua-5.1.4-lunatic.patch
@@ -0,0 +1,11 @@
+--- src/loadlib.c.orig 2010-02-09 16:58:47.000000000 -0600
++++ src/loadlib.c 2010-02-09 16:59:12.000000000 -0600
+@@ -66,7 +66,7 @@
+
+
+ static void *ll_load (lua_State *L, const char *path) {
+- void *lib = dlopen(path, RTLD_NOW);
++ void *lib = dlopen(path, RTLD_NOW|RTLD_GLOBAL);
+ if (lib == NULL) lua_pushstring(L, dlerror());
+ return lib;
+ }
diff --git a/lua.spec b/lua.spec
index 1755e04..683d63a 100644
--- a/lua.spec
+++ b/lua.spec
@@ -1,12 +1,15 @@
Name: lua
Version: 5.1.4
-Release: 4%{?dist}
+Release: 7%{?dist}
Summary: Powerful light-weight programming language
Group: Development/Languages
License: MIT
URL: http://www.lua.org/
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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: readline-devel ncurses-devel
Provides: lua = 5.1
@@ -43,6 +46,9 @@ This package contains the static version of liblua for %{name}.
%prep
%setup -q
%patch0 -p1 -E -z .autoxxx
+%patch1 -p0 -z .lunatic
+%patch2 -p1 -z .idsize
+%patch3 -p0 -d src -z .bugfix2
# fix perms on auto files
chmod u+x autogen.sh config.guess config.sub configure depcomp install-sh missing
@@ -94,6 +100,16 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.a
%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
+- Add patch to increase IDSIZE for more useful error messages
+
+* Sun May 09 2010 Tim Niemueller <tim@niemueller.de> - 5.1.4-5
+- Add patch regarding dlopen flags to support Lunatic (Lua-Python bridge)
+
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild