The package rpms/tolua++.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/tolua++.git/commit/?id=8d28c88063...
https://src.fedoraproject.org/cgit/rpms/tolua++.git/commit/?id=7f0cc30c85...
https://src.fedoraproject.org/cgit/rpms/tolua++.git/commit/?id=9f65d6d680...
https://src.fedoraproject.org/cgit/rpms/tolua++.git/commit/?id=df6fe3aea7...
https://src.fedoraproject.org/cgit/rpms/tolua++.git/commit/?id=f850051213....
Change:
+%ifarch x86_64
-%ifarch %{ix86}
-%ifarch x86_64
-ExcludeArch: ppc
+ExcludeArch: ppc
Thanks.
Full change:
============
commit 55feda1d07998b464ebf932c5aee6c325a3749ab
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri Oct 11 14:34:04 2019 +0200
Fix FTBFS (rhbz#1676145)
diff --git a/tolua++-1.0.93-scons304.patch b/tolua++-1.0.93-scons304.patch
new file mode 100644
index 0000000..65ab43f
--- /dev/null
+++ b/tolua++-1.0.93-scons304.patch
@@ -0,0 +1,21 @@
+diff -up tolua++-1.0.93/SConstruct~ tolua++-1.0.93/SConstruct
+--- tolua++-1.0.93/SConstruct~ 2008-04-21 02:05:35.000000000 +0200
++++ tolua++-1.0.93/SConstruct 2019-02-18 12:35:13.025336296 +0100
+@@ -16,7 +16,7 @@ elif 'msvc' in env['TOOLS']:
+ else:
+ options_file = "posix"
+
+-opts = Options(["config_"+options_file+".py", "custom.py",
"custom_"+options_file+".py"], ARGUMENTS)
++opts = Variables(["config_"+options_file+".py",
"custom.py", "custom_"+options_file+".py"], ARGUMENTS)
+ opts.Add('CC', 'The C compiler.')
+ opts.Add('CXX', 'The C++ compiler (for the tests)')
+ opts.Add('CCFLAGS', 'Flags for the compiler.', ['-O2',
'-Wall'])
+@@ -65,7 +65,7 @@ def pkg_scan_dep(self, target, source):
+ ## TODO: detectar si el archivo existe antes de abrirlo asi nomas
+ pkg = open(source, "rt")
+
+- for linea in pkg.xreadlines():
++ for linea in pkg:
+ dep = re.search("^[\t\w]*\$[cphl]file\s*\"([^\"]+)\"",
linea)
+ if dep:
+ self.Depends(target, '#' + dep.groups()[0]);
diff --git a/tolua++.spec b/tolua++.spec
index 7f90af3..4337f1c 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,15 +2,16 @@
Name: tolua++
Version: 1.0.93
-Release: 26%{?dist}
+Release: 27%{?dist}
Summary: A tool to integrate C/C++ code with Lua
License: MIT
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.93-no-buildin-bytecode.patch
Patch1: tolua++-1.0.93-lua52.patch
+Patch2: tolua++-1.0.93-scons304.patch
BuildRequires: gcc-c++
-BuildRequires: scons
+BuildRequires: python3-scons
BuildRequires: lua-devel >= 5.3
%description
@@ -28,9 +29,7 @@ Development files for tolua++
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%autosetup -p1
sed -i 's/\r//' doc/%{name}.html
@@ -70,6 +69,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Fri Oct 11 2019 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-27
+- Fix FTBFS (rhbz#1676145)
+
* Sat Jul 27 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-26
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit 909b7ab49ff4cea19d2e4dcaa42427cd3c64cbb0
Author: Tomas Hrcka <thrcka(a)redhat.com>
Date: Fri Oct 11 12:18:45 2019 +0200
Revert "tolua++ fails to build from source:
https://bugzilla.redhat.com/show_bug.cgi?id=1676145"
This reverts commit 58a488dace321ad747f43eead897ff374951d9fb.
Unretirement request:
https://pagure.io/releng/issue/8895
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2c3ec59
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+tolua++-1.0.93.tar.bz2
diff --git a/dead.package b/dead.package
deleted file mode 100644
index 445976c..0000000
--- a/dead.package
+++ /dev/null
@@ -1 +0,0 @@
-tolua++ fails to build from source:
https://bugzilla.redhat.com/show_bug.cgi?id=1676145
diff --git a/sources b/sources
new file mode 100644
index 0000000..8e91745
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+100aa6907b8108582080b37d79c0afd7 tolua++-1.0.93.tar.bz2
diff --git a/tolua++-1.0.93-lua52.patch b/tolua++-1.0.93-lua52.patch
new file mode 100644
index 0000000..9f3c741
--- /dev/null
+++ b/tolua++-1.0.93-lua52.patch
@@ -0,0 +1,553 @@
+diff -urN tolua++-1.0.93/config_linux.py tolua++-1.0.93.lua52/config_linux.py
+--- tolua++-1.0.93/config_linux.py 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93.lua52/config_linux.py 2014-09-30 18:42:00.850195336 +0200
+@@ -4,7 +4,7 @@
+
+ # Compiler flags (based on Debian's installation of lua)
+ #LINKFLAGS = ['-g']
+-CCFLAGS = ['-I/usr/include/lua50', '-O2', '-ansi',
'-Wall']
++CCFLAGS = ['-O2', '-ansi', '-Wall']
+ #CCFLAGS = ['-I/usr/include/lua50', '-g']
+
+ # this is the default directory for installation. Files will be installed on
+@@ -18,5 +18,5 @@
+ prefix = '/usr/local'
+
+ # libraries (based on Debian's installation of lua)
+-LIBS = ['lua50', 'lualib50', 'dl', 'm']
++LIBS = ['lua', 'dl', 'm']
+
+diff -urN tolua++-1.0.93/custom.py tolua++-1.0.93.lua52/custom.py
+--- tolua++-1.0.93/custom.py 1970-01-01 01:00:00.000000000 +0100
++++ tolua++-1.0.93.lua52/custom.py 2014-10-01 11:52:32.217957188 +0200
+@@ -0,0 +1,9 @@
++CCFLAGS = ['-O2', '-ansi']
++#LIBPATH = ['/usr/local/lib']
++LIBS = ['lua', 'dl', 'm']
++prefix = '/usr'
++build_dev=1
++tolua_bin = 'tolua++'
++tolua_lib = 'tolua++-5.2'
++TOLUAPP = 'tolua++'
++
+diff -urN tolua++-1.0.93/SConstruct tolua++-1.0.93.lua52/SConstruct
+--- tolua++-1.0.93/SConstruct 2008-04-21 02:05:35.000000000 +0200
++++ tolua++-1.0.93.lua52/SConstruct 2014-10-01 13:51:40.837513339 +0200
+@@ -82,6 +82,8 @@
+ header = target[:-2] + '.h'
+ pheader = Dir('.').path + '/' + header
+
++ print("Generating ", target, " from ", source)
++
+ tolua = ""
+ if bootstrap:
+ if os.name == 'nt':
+diff -urN tolua++-1.0.93/src/bin/lua/all.lua tolua++-1.0.93.lua52/src/bin/lua/all.lua
+--- tolua++-1.0.93/src/bin/lua/all.lua 2007-07-03 08:03:38.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/lua/all.lua 2014-10-01 16:30:26.057393850 +0200
+@@ -1,8 +1,8 @@
+ dofile(path.."compat-5.1.lua")
+ dofile(path.."compat.lua")
+-dofile(path.."basic.lua")
+ dofile(path.."feature.lua")
+ dofile(path.."verbatim.lua")
++dofile(path.."basic.lua")
+ dofile(path.."code.lua")
+ dofile(path.."typedef.lua")
+ dofile(path.."container.lua")
+diff -urN tolua++-1.0.93/src/bin/lua/basic.lua
tolua++-1.0.93.lua52/src/bin/lua/basic.lua
+--- tolua++-1.0.93/src/bin/lua/basic.lua 2008-11-11 19:14:49.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/basic.lua 2014-10-01 16:30:26.112391980 +0200
+@@ -75,8 +75,8 @@
+ end
+
+ function applyrenaming (s)
+- for i=1,getn(_renaming) do
+- local m,n = gsub(s,_renaming[i].old,_renaming[i].new)
++ for i,v in ipairs(_renaming) do
++ local m,n = gsub(s,v.old,v.new)
+ if n ~= 0 then
+ return m
+ end
+@@ -252,7 +252,8 @@
+ -- concatenate all parameters, following output rules
+ function concatparam (line, ...)
+ local i=1
+- while i<=arg.n do
++ local arg={...}
++ while i<=#arg do
+ if _cont and not strfind(_cont,'[%(,"]') and
+ strfind(arg[i],"^[%a_~]") then
+ line = line .. ' '
+@@ -263,7 +264,7 @@
+ end
+ i = i+1
+ end
+- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
++ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
+ _cont=nil line = line .. '\n'
+ end
+ return line
+@@ -272,7 +273,8 @@
+ -- output line
+ function output (...)
+ local i=1
+- while i<=arg.n do
++ local arg = {...}
++ while i<=#arg do
+ if _cont and not strfind(_cont,'[%(,"]') and
+ strfind(arg[i],"^[%a_~]") then
+ write(' ')
+@@ -283,7 +285,7 @@
+ end
+ i = i+1
+ end
+- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
++ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
+ _cont=nil write('\n')
+ end
+ end
+@@ -373,9 +375,10 @@
+
+ end
+
++
+ -- called to output an error message
+ function output_error_hook(...)
+- return string.format(...)
++ return string.format(table.unpack{...})
+ end
+
+ -- custom pushers
+diff -urN tolua++-1.0.93/src/bin/lua/class.lua
tolua++-1.0.93.lua52/src/bin/lua/class.lua
+--- tolua++-1.0.93/src/bin/lua/class.lua 2007-11-28 06:31:35.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/class.lua 2014-10-01 16:30:26.129391402 +0200
+@@ -92,7 +92,7 @@
+ self.btype = typevar(self.base)
+ self.ctype = 'const '..self.type
+ if self.extra_bases then
+- for i=1,table.getn(self.extra_bases) do
++ for i=1,#self.extra_bases do
+ self.extra_bases[i] = typevar(self.extra_bases[i])
+ end
+ end
+@@ -138,9 +138,9 @@
+ -- Expects the name, the base (array) and the body of the class.
+ function Class (n,p,b)
+
+- if table.getn(p) > 1 then
++ if #p > 1 then
+ b = string.sub(b, 1, -2)
+- for i=2,table.getn(p),1 do
++ for i=2,#p,1 do
+ b = b.."\n tolua_inherits "..p[i].."
__"..p[i].."__;\n"
+ end
+ b = b.."\n}"
+diff -urN tolua++-1.0.93/src/bin/lua/clean.lua
tolua++-1.0.93.lua52/src/bin/lua/clean.lua
+--- tolua++-1.0.93/src/bin/lua/clean.lua 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/clean.lua 2014-10-01 16:30:26.133391266 +0200
+@@ -19,14 +19,14 @@
+ }
+
+ function mask (s)
+- for i = 1,getn(MASK) do
++ for i = 1,#MASK do
+ s = gsub(s,MASK[i][2],MASK[i][1])
+ end
+ return s
+ end
+
+ function unmask (s)
+- for i = 1,getn(MASK) do
++ for i = 1,#MASK do
+ s = gsub(s,MASK[i][1],MASK[i][2])
+ end
+ return s
+diff -urN tolua++-1.0.93/src/bin/lua/compat-5.1.lua
tolua++-1.0.93.lua52/src/bin/lua/compat-5.1.lua
+--- tolua++-1.0.93/src/bin/lua/compat-5.1.lua 2007-07-03 08:03:38.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/lua/compat-5.1.lua 2014-10-01 16:30:26.169390042 +0200
+@@ -25,10 +25,10 @@
+ end
+ end
+
+- local f = load(getfile, path)
++ local f, errmsg = load(getfile, path)
+ if not f then
+
+- error("error loading file "..path)
++ error("error loading file "..path ..": " .. errmsg)
+ end
+ return f()
+ end
+diff -urN tolua++-1.0.93/src/bin/lua/compat.lua
tolua++-1.0.93.lua52/src/bin/lua/compat.lua
+--- tolua++-1.0.93/src/bin/lua/compat.lua 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/compat.lua 2014-10-01 16:30:26.173389906 +0200
+@@ -40,15 +40,13 @@
+ end
+ end
+
+-function dostring(s) return do_(loadstring(s)) end
++function dostring(s) return do_(load(s)) end
+ -- function dofile(s) return do_(loadfile(s)) end
+
+ -------------------------------------------------------------------
+ -- Table library
+ local tab = table
+-foreach = tab.foreach
+-foreachi = tab.foreachi
+-getn = tab.getn
++getn = function (tab) return #tab end
+ tinsert = tab.insert
+ tremove = tab.remove
+ sort = tab.sort
+@@ -78,7 +76,7 @@
+ frexp = math.frexp
+ ldexp = math.ldexp
+ log = math.log
+-log10 = math.log10
++log10 = function(val) return math.log(10, val) end
+ max = math.max
+ min = math.min
+ mod = math.mod
+@@ -177,17 +175,19 @@
+
+ function read (...)
+ local f = _INPUT
++ local arg = {...}
+ if rawtype(arg[1]) == 'userdata' then
+ f = tab.remove(arg, 1)
+ end
+- return f:read(unpack(arg))
++ return f:read(table.unpack(arg))
+ end
+
+ function write (...)
+ local f = _OUTPUT
++ local arg = {...}
+ if rawtype(arg[1]) == 'userdata' then
+ f = tab.remove(arg, 1)
+ end
+- return f:write(unpack(arg))
++ return f:write(table.unpack(arg))
+ end
+
+diff -urN tolua++-1.0.93/src/bin/lua/declaration.lua
tolua++-1.0.93.lua52/src/bin/lua/declaration.lua
+--- tolua++-1.0.93/src/bin/lua/declaration.lua 2008-07-18 07:27:24.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/lua/declaration.lua 2014-10-01 16:30:26.309385281 +0200
+@@ -137,7 +137,7 @@
+ if b then
+
+ m = split_c_tokens(string.sub(m, 2, -2), ",")
+- for i=1, table.getn(m) do
++ for i=1, #m do
+ m[i] = string.gsub(m[i],"%s*([%*&])", "%1")
+ if not isbasic(m[i]) then
+ if not isenum(m[i]) then _, m[i] = applytypedef("", m[i]) end
+@@ -522,7 +522,7 @@
+ end
+
+ -- check the form: mod type* name
+- local s1 = gsub(s,"(%b\[\])",function (n) return
gsub(n,'%*','\1') end)
++ local s1 = gsub(s,"(%b%[%])",function (n) return
gsub(n,'%*','\1') end)
+ t = split_c_tokens(s1,'%*')
+ if t.n == 2 then
+ t[2] = gsub(t[2],'\1','%*') -- restore * in dimension expression
+diff -urN tolua++-1.0.93/src/bin/lua/feature.lua
tolua++-1.0.93.lua52/src/bin/lua/feature.lua
+--- tolua++-1.0.93/src/bin/lua/feature.lua 2007-10-30 02:58:17.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/feature.lua 2014-10-01 16:30:26.362383479 +0200
+@@ -132,7 +132,7 @@
+ if not fname or fname == '' then
+ fname = self.name
+ end
+- n = string.gsub(n..'_'.. (fname), "[<>:, \.%*&]",
"_")
++ n = string.gsub(n..'_'.. (fname), "[<>:, \\.%*&]",
"_")
+
+ return n
+ end
+diff -urN tolua++-1.0.93/src/bin/lua/function.lua
tolua++-1.0.93.lua52/src/bin/lua/function.lua
+--- tolua++-1.0.93/src/bin/lua/function.lua 2008-11-11 19:14:49.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/function.lua 2014-10-01 16:30:26.415381678 +0200
+@@ -520,7 +520,7 @@
+ function join(t, sep, first, last)
+
+ first = first or 1
+- last = last or table.getn(t)
++ last = last or #t
+ local lsep = ""
+ local ret = ""
+ local loop = false
+diff -urN tolua++-1.0.93/src/bin/lua/package.lua
tolua++-1.0.93.lua52/src/bin/lua/package.lua
+--- tolua++-1.0.93/src/bin/lua/package.lua 2007-10-30 02:58:17.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/package.lua 2014-10-01 16:30:26.539377462 +0200
+@@ -39,7 +39,7 @@
+ self.code = gsub(self.code,"\n%s*%$%]","\2")
+ self.code = gsub(self.code,"(%b\1\2)", function (c)
+ tinsert(L,c)
+- return
"\n#["..getn(L).."]#"
++ return "\n#[".. #L
.."]#"
+ end)
+ -- avoid preprocessing embedded C code
+ local C = {}
+@@ -47,14 +47,14 @@
+ self.code = gsub(self.code,"\n%s*%$%>","\4")
+ self.code = gsub(self.code,"(%b\3\4)", function (c)
+ tinsert(C,c)
+- return
"\n#<"..getn(C)..">#"
++ return "\n#<".. #C
..">#"
+ end)
+ -- avoid preprocessing embedded C code
+ self.code = gsub(self.code,"\n%s*%$%{","\5") -- deal with embedded
C code
+ self.code = gsub(self.code,"\n%s*%$%}","\6")
+ self.code = gsub(self.code,"(%b\5\6)", function (c)
+ tinsert(C,c)
+- return
"\n#<"..getn(C)..">#"
++ return "\n#<"..
#C..">#"
+ end)
+
+ --self.code = gsub(self.code,"\n%s*#[^d][^\n]*\n", "\n\n") --
eliminate preprocessor directives that don't start with 'd'
+@@ -64,7 +64,7 @@
+ local V = {}
+ self.code = gsub(self.code,"\n(%s*%$[^%[%]][^\n]*)",function (v)
+ tinsert(V,v)
+- return
"\n#"..getn(V).."#"
++ return "\n#".. #V
.."#"
+ end)
+
+ -- perform global substitution
+@@ -152,14 +152,14 @@
+ if flags.t then
+ output("#ifndef Mtolua_typeid\n#define Mtolua_typeid(L,TI,T)\n#endif\n")
+ end
+- foreach(_usertype,function(n,v)
++ for n,v in pairs(_usertype) do
+ if (not _global_classes[v]) or _global_classes[v]:check_public_access() then
+ output(' tolua_usertype(tolua_S,"',v,'");')
+ if flags.t then
+ output(' Mtolua_typeid(tolua_S,typeid(',v,'),
"',v,'");')
+ end
+ end
+- end)
++ end
+ output('}')
+ output('\n')
+ end
+@@ -288,7 +288,7 @@
+ local t = {code=s}
+ extra = string.gsub(extra, "^%s*,%s*", "")
+ local pars = split_c_tokens(extra, ",")
+- include_file_hook(t, fn, unpack(pars))
++ include_file_hook(t, fn, table.unpack(pars))
+ return "\n\n" .. t.code
+ else
+ error('#Invalid include directive (use $cfile, $pfile, $lfile or $ifile)')
+@@ -322,7 +322,7 @@
+ table.insert(chunk, string.sub(line, 3) .. "\n")
+ else
+ local last = 1
+- for text, expr, index in string.gfind(line, "(.-)$(%b())()") do
++ for text, expr, index in string.gmatch(line, "(.-)$(%b())()") do
+ last = index
+ if text ~= "" then
+ table.insert(chunk, string.format('table.insert(__ret, %q )', text))
+@@ -334,10 +334,9 @@
+ end
+ end
+ table.insert(chunk, '\nreturn table.concat(__ret)\n')
+- local f,e = loadstring(table.concat(chunk))
++ local f,e = load(table.concat(chunk), nil, "t", _extra_parameters)
+ if e then
+ error("#"..e)
+ end
+- setfenv(f, _extra_parameters)
+ return f()
+ end
+diff -urN tolua++-1.0.93/src/bin/lua/template_class.lua
tolua++-1.0.93.lua52/src/bin/lua/template_class.lua
+--- tolua++-1.0.93/src/bin/lua/template_class.lua 2007-11-28 06:31:35.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/template_class.lua 2014-10-01 16:30:26.563376645
+0200
+@@ -22,7 +22,7 @@
+ for i =1 , types.n do
+
+ local Il = split_c_tokens(types[i], " ")
+- if table.getn(Il) ~= table.getn(self.args) then
++ if #Il ~= #self.args then
+ error("#invalid parameter count for "..types[i])
+ end
+ local bI = self.body
+@@ -31,16 +31,16 @@
+ --Tl[j] = findtype(Tl[j]) or Tl[j]
+ bI = string.gsub(bI, "([^_%w])"..self.args[j].."([^_%w])",
"%1"..Il[j].."%2")
+ if self.parents then
+- for i=1,table.getn(self.parents) do
++ for i=1,#self.parents do
+ pI[i] = string.gsub(self.parents[i],
"([^_%w]?)"..self.args[j].."([^_%w]?)",
"%1"..Il[j].."%2")
+ end
+ end
+ end
+ --local append = "<"..string.gsub(types[i], "%s+",
",")..">"
+- local append = "<"..concat(Il, 1, table.getn(Il),
",")..">"
++ local append = "<"..concat(Il, 1, #Il, ",")..">"
+ append = string.gsub(append, "%s*,%s*", ",")
+ append = string.gsub(append, ">>", "> >")
+- for i=1,table.getn(pI) do
++ for i=1,#pI do
+ --pI[i] = string.gsub(pI[i], ">>", "> >")
+ pI[i] = resolve_template_types(pI[i])
+ end
+diff -urN tolua++-1.0.93/src/bin/tolua.c tolua++-1.0.93.lua52/src/bin/tolua.c
+--- tolua++-1.0.93/src/bin/tolua.c 2006-07-29 04:45:56.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/tolua.c 2014-09-30 18:42:00.823196281 +0200
+@@ -67,7 +67,11 @@
+ static void add_extra (lua_State* L, char* value) {
+ int len;
+ lua_getglobal(L, "_extra_parameters");
++#if LUA_VERSION_NUM > 501
++ len = lua_rawlen(L, -1);
++#else
+ len = luaL_getn(L, -1);
++#endif
+ lua_pushstring(L, value);
+ lua_rawseti(L, -2, len+1);
+ lua_pop(L, 1);
+diff -urN tolua++-1.0.93/src/lib/tolua_event.c
tolua++-1.0.93.lua52/src/lib/tolua_event.c
+--- tolua++-1.0.93/src/lib/tolua_event.c 2006-10-14 08:18:11.000000000 +0200
++++ tolua++-1.0.93.lua52/src/lib/tolua_event.c 2014-10-06 11:32:46.162013835 +0200
+@@ -23,12 +23,20 @@
+ static void storeatubox (lua_State* L, int lo)
+ {
+ #ifdef LUA_VERSION_NUM
++#if LUA_VERSION_NUM > 501
++ lua_getuservalue(L, lo);
++#else
+ lua_getfenv(L, lo);
++#endif
+ if (lua_rawequal(L, -1, TOLUA_NOPEER)) {
+ lua_pop(L, 1);
+ lua_newtable(L);
+ lua_pushvalue(L, -1);
++#if LUA_VERSION_NUM > 501
++ lua_setuservalue(L, lo); /* stack: k,v,table */
++#else
+ lua_setfenv(L, lo); /* stack: k,v,table */
++#endif
+ };
+ lua_insert(L, -3);
+ lua_settable(L, -3); /* on lua 5.1, we trade the "tolua_peers" lookup for a
settable call */
+@@ -141,7 +149,11 @@
+ {
+ /* Access alternative table */
+ #ifdef LUA_VERSION_NUM /* new macro on version 5.1 */
++#if LUA_VERSION_NUM > 501
++ lua_getuservalue(L, 1);
++#else
+ lua_getfenv(L,1);
++#endif
+ if (!lua_rawequal(L, -1, TOLUA_NOPEER)) {
+ lua_pushvalue(L, 2); /* key */
+ lua_gettable(L, -2); /* on lua 5.1, we trade the "tolua_peers" lookup for a
gettable call */
+@@ -420,6 +432,8 @@
+ */
+ TOLUA_API int class_gc_event (lua_State* L)
+ {
++ if (lua_type(L,1) == LUA_TUSERDATA)
++ {
+ void* u = *((void**)lua_touserdata(L,1));
+ int top;
+ /*fprintf(stderr, "collecting: looking at %p\n", u);*/
+@@ -427,7 +441,8 @@
+ lua_pushstring(L,"tolua_gc");
+ lua_rawget(L,LUA_REGISTRYINDEX);
+ */
+- lua_pushvalue(L, lua_upvalueindex(1));
++ lua_pushstring(L,"tolua_gc");
++ lua_rawget(L,LUA_REGISTRYINDEX); /* gc */
+ lua_pushlightuserdata(L,u);
+ lua_rawget(L,-2); /* stack: gc umt */
+ lua_getmetatable(L,1); /* stack: gc umt mt */
+@@ -456,6 +471,7 @@
+ lua_rawset(L,-5); /* stack: gc umt mt */
+ }
+ lua_pop(L,3);
++ }
+ return 0;
+ }
+
+diff -urN tolua++-1.0.93/src/lib/tolua_map.c tolua++-1.0.93.lua52/src/lib/tolua_map.c
+--- tolua++-1.0.93/src/lib/tolua_map.c 2009-02-14 04:06:32.000000000 +0100
++++ tolua++-1.0.93.lua52/src/lib/tolua_map.c 2014-09-30 18:42:00.836195826 +0200
+@@ -262,8 +262,12 @@
+
+ lua_pop(L, 1);
+ lua_pushvalue(L, TOLUA_NOPEER);
+- };
++ }
++#if LUA_VERSION_NUM > 501
++ lua_setuservalue(L, -2);
++#else
+ lua_setfenv(L, -2);
++#endif
+
+ return 0;
+ };
+@@ -271,7 +275,11 @@
+ static int tolua_bnd_getpeer(lua_State* L) {
+
+ /* stack: userdata */
++#if LUA_VERSION_NUM > 501
++ lua_getuservalue(L, -1);
++#else
+ lua_getfenv(L, -1);
++#endif
+ if (lua_rawequal(L, -1, TOLUA_NOPEER)) {
+ lua_pop(L, 1);
+ lua_pushnil(L);
+@@ -411,7 +419,11 @@
+ lua_rawget(L,-2);
+ }
+ else
++#if LUA_VERSION_NUM > 501
++ lua_pushglobaltable(L);
++#else
+ lua_pushvalue(L,LUA_GLOBALSINDEX);
++#endif
+ }
+
+ /* End module
+@@ -445,7 +457,11 @@
+ else
+ {
+ /* global table */
++#if LUA_VERSION_NUM > 501
++ lua_pushglobaltable(L);
++#else
+ lua_pushvalue(L,LUA_GLOBALSINDEX);
++#endif
+ }
+ if (hasvar)
+ {
+@@ -473,7 +489,11 @@
+ else
+ {
+ /* global table */
++#if LUA_VERSION_NUM > 501
++ lua_pushglobaltable(L);
++#else
+ lua_pushvalue(L,LUA_GLOBALSINDEX);
++#endif
+ }
+ if (hasvar)
+ {
+diff -urN tolua++-1.0.93/src/lib/tolua_push.c tolua++-1.0.93.lua52/src/lib/tolua_push.c
+--- tolua++-1.0.93/src/lib/tolua_push.c 2007-02-10 03:43:56.000000000 +0100
++++ tolua++-1.0.93.lua52/src/lib/tolua_push.c 2014-09-30 18:42:00.844195546 +0200
+@@ -79,7 +79,11 @@
+
+ #ifdef LUA_VERSION_NUM
+ lua_pushvalue(L, TOLUA_NOPEER);
++#if LUA_VERSION_NUM > 501
++ lua_setuservalue(L, -2);
++#else
+ lua_setfenv(L, -2);
++#endif
+ #endif
+ }
+ else
diff --git a/tolua++-1.0.93-no-buildin-bytecode.patch
b/tolua++-1.0.93-no-buildin-bytecode.patch
new file mode 100644
index 0000000..3556105
--- /dev/null
+++ b/tolua++-1.0.93-no-buildin-bytecode.patch
@@ -0,0 +1,54 @@
+diff -urN tolua++-1.0.93/src/bin/SCsub tolua++-1.0.93.no-builtin/src/bin/SCsub
+--- tolua++-1.0.93/src/bin/SCsub 2008-04-21 02:05:35.000000000 +0200
++++ tolua++-1.0.93.no-builtin/src/bin/SCsub 2014-10-01 15:54:39.001158444 +0200
+@@ -5,8 +5,8 @@
+ ]
+
+
+-toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
++#toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
+
+-env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src +
[toluabind], LIBS = ['$tolua_lib'] + env['LIBS'])
++env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src, LIBS =
['$tolua_lib'] + env['LIBS'])
+
+ env.bootstrap_target = env.Program('#/bin/'+env['TOLUAPP_BOOTSTRAP'],
src + ['toluabind_default.c', env.lib_target_static], LIBS = env['LIBS'])
+diff -urN tolua++-1.0.93/src/bin/tolua.c tolua++-1.0.93.no-builtin/src/bin/tolua.c
+--- tolua++-1.0.93/src/bin/tolua.c 2006-07-29 04:45:56.000000000 +0200
++++ tolua++-1.0.93.no-builtin/src/bin/tolua.c 2014-10-01 16:06:09.791424704 +0200
+@@ -145,7 +145,7 @@
+ }
+ lua_pop(L,1);
+ }
+-/* #define TOLUA_SCRIPT_RUN */
++#define TOLUA_SCRIPT_RUN
+ #ifndef TOLUA_SCRIPT_RUN
+ {
+ int tolua_tolua_open (lua_State* L);
+@@ -153,16 +153,17 @@
+ }
+ #else
+ {
+- char* p;
+- char path[BUFSIZ];
+- strcpy(path,argv[0]);
+- p = strrchr(path,'/');
+- if (p==NULL) p = strrchr(path,'\\');
+- p = (p==NULL) ? path : p+1;
+- sprintf(p,"%s","../src/bin/lua/");
+- lua_pushstring(L,path); lua_setglobal(L,"path");
+- strcat(path,"all.lua");
+- lua_dofile(L,path);
++ lua_pushstring(L, "/usr/share/tolua++/");
lua_setglobal(L,"path");
++ if (luaL_loadfile(L, "/usr/share/tolua++/all.lua") != 0) {
++ fprintf(stderr, "luaL_loadfile failed\n");
++ return 1;
++ }
++ if (lua_pcall(L, 0,0,0) != 0) {
++ const char *errmsg = lua_tostring(L, -1);
++ fprintf(stderr, "lua_pcall failed: %s\n", errmsg);
++ lua_pop(L, 1);
++ return 1;
++ }
+ }
+ #endif
+ return 0;
diff --git a/tolua++.spec b/tolua++.spec
new file mode 100644
index 0000000..7f90af3
--- /dev/null
+++ b/tolua++.spec
@@ -0,0 +1,185 @@
+%define solib tolua++-5.3
+
+Name: tolua++
+Version: 1.0.93
+Release: 26%{?dist}
+Summary: A tool to integrate C/C++ code with Lua
+License: MIT
+URL:
http://www.codenix.com/~tolua/
+Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
+Patch0: tolua++-1.0.93-no-buildin-bytecode.patch
+Patch1: tolua++-1.0.93-lua52.patch
+BuildRequires: gcc-c++
+BuildRequires: scons
+BuildRequires: lua-devel >= 5.3
+
+%description
+tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
+Lua. tolua++ includes new features oriented to C++.
+
+
+%package devel
+Summary: Development files for tolua++
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: lua-devel >= 5.3
+
+%description devel
+Development files for tolua++
+
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+sed -i 's/\r//' doc/%{name}.html
+
+
+%build
+scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
+# Relink the tolua++ binary, to link it without the soname which we add to
+# LINKFLAGS to build a shared lib
+gcc -o bin/%{name} src/bin/tolua.o -Llib -l%{solib} -llua -ldl -lm
+
+
+%install
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+mkdir -p $RPM_BUILD_ROOT%{_includedir}
+install -m 755 bin/%{name} $RPM_BUILD_ROOT%{_bindir}
+install -m 755 lib/lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}
+ln -s lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}/libtolua++.so
+install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
+# For use with Patch2 (not working yet)
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
+install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
+
+
+%ldconfig_scriptlets
+
+
+%files
+%doc README doc/*
+%{_libdir}/lib%{solib}.so
+%{_datadir}/%{name}
+
+
+%files devel
+%{_bindir}/%{name}
+%{_libdir}/libtolua++.so
+%{_includedir}/%{name}.h
+
+
+%changelog
+* Sat Jul 27 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-26
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Sun Feb 03 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-25
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Sat Jul 14 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-24
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Wed Mar 07 2018 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-23
+- Add BR gcc-c++
+
+* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-22
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-21
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+
+* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-20
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+
+* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-19
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Fri Feb 05 2016 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-18
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+* Mon Feb 01 2016 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-17
+- Update library name to reflect linking with Lua 5.3
+
+* Fri Jun 19 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-16
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
+* Wed Dec 17 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-15
+- Drop unused patches
+- Re-add comment about why we need to relink tolua++ after calling scons
+
+* Mon Dec 15 2014 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-14
+- Compatibility with Lua 5.2
+
+* Mon Aug 18 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-13
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Mon Jun 16 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-12
+- Use the pre-generated toluabind.c everywhere but x86_64, something goes wrong
+ when re-generating it (bootstrap) elsewhere (rhbz#1094103)
+
+* Sun Jun 08 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-11
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-10
+- Use the pre-generated toluabind.c on non x86, as something goes wrong
+ when re-generating it (bootstrap) on non x86. This fixes tolua++
+ segfaulting on arm, and hopefully also on ppc (rhbz#704372)
+
+* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-9
+- Honor the compiler include path when opening lua.h
+
+* Sun Aug 04 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-8
+- Switch over to compat-lua-5.1
+
+* Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-7
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Fri Feb 15 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Wed Oct 12 2011 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-3
+- Exclude ppc, there are problems according to bz #704372
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Thu Feb 25 2010 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-1
+- Upgrade to 1.0.93
+
+* Sun Jul 26 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-9
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-8
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Thu Mar 13 2008 Tim Niemueller <tim(a)niemueller.de> - 1.0.92-7
+- Added patch to make tolua++ compatible with GCC 4.3
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng(a)fedoraproject.org> -
1.0.92-6
+- Autorebuild for GCC 4.3
+
+* Wed Aug 22 2007 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-5
+- Release bump for F8 mass rebuild
+- Updated license due to new guidelines
+
+* Mon Aug 28 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-4
+- Release bump for FC6 mass rebuild
+
+* Sat Jun 03 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-3
+- Fixed issue with where tolua++ was tagged with an soname the same as the lib
+ meaning ld would fail to locate the library.
+
+* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-2
+- Changed license from Freeware Style to just Freeware
+- Changed => to more conventional >= for (build)requires
+- Moved %%{_bindir}/tolua++ to devel package
+- Now adds soname to library
+
+* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-1
+- Initial Release
commit 58a488dace321ad747f43eead897ff374951d9fb
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Thu Aug 8 16:45:16 2019 +0000
tolua++ fails to build from source:
https://bugzilla.redhat.com/show_bug.cgi?id=1676145
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 2c3ec59..0000000
--- a/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-tolua++-1.0.93.tar.bz2
diff --git a/dead.package b/dead.package
new file mode 100644
index 0000000..445976c
--- /dev/null
+++ b/dead.package
@@ -0,0 +1 @@
+tolua++ fails to build from source:
https://bugzilla.redhat.com/show_bug.cgi?id=1676145
diff --git a/sources b/sources
deleted file mode 100644
index 8e91745..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-100aa6907b8108582080b37d79c0afd7 tolua++-1.0.93.tar.bz2
diff --git a/tolua++-1.0.93-lua52.patch b/tolua++-1.0.93-lua52.patch
deleted file mode 100644
index 9f3c741..0000000
--- a/tolua++-1.0.93-lua52.patch
+++ /dev/null
@@ -1,553 +0,0 @@
-diff -urN tolua++-1.0.93/config_linux.py tolua++-1.0.93.lua52/config_linux.py
---- tolua++-1.0.93/config_linux.py 2005-11-30 23:31:27.000000000 +0100
-+++ tolua++-1.0.93.lua52/config_linux.py 2014-09-30 18:42:00.850195336 +0200
-@@ -4,7 +4,7 @@
-
- # Compiler flags (based on Debian's installation of lua)
- #LINKFLAGS = ['-g']
--CCFLAGS = ['-I/usr/include/lua50', '-O2', '-ansi',
'-Wall']
-+CCFLAGS = ['-O2', '-ansi', '-Wall']
- #CCFLAGS = ['-I/usr/include/lua50', '-g']
-
- # this is the default directory for installation. Files will be installed on
-@@ -18,5 +18,5 @@
- prefix = '/usr/local'
-
- # libraries (based on Debian's installation of lua)
--LIBS = ['lua50', 'lualib50', 'dl', 'm']
-+LIBS = ['lua', 'dl', 'm']
-
-diff -urN tolua++-1.0.93/custom.py tolua++-1.0.93.lua52/custom.py
---- tolua++-1.0.93/custom.py 1970-01-01 01:00:00.000000000 +0100
-+++ tolua++-1.0.93.lua52/custom.py 2014-10-01 11:52:32.217957188 +0200
-@@ -0,0 +1,9 @@
-+CCFLAGS = ['-O2', '-ansi']
-+#LIBPATH = ['/usr/local/lib']
-+LIBS = ['lua', 'dl', 'm']
-+prefix = '/usr'
-+build_dev=1
-+tolua_bin = 'tolua++'
-+tolua_lib = 'tolua++-5.2'
-+TOLUAPP = 'tolua++'
-+
-diff -urN tolua++-1.0.93/SConstruct tolua++-1.0.93.lua52/SConstruct
---- tolua++-1.0.93/SConstruct 2008-04-21 02:05:35.000000000 +0200
-+++ tolua++-1.0.93.lua52/SConstruct 2014-10-01 13:51:40.837513339 +0200
-@@ -82,6 +82,8 @@
- header = target[:-2] + '.h'
- pheader = Dir('.').path + '/' + header
-
-+ print("Generating ", target, " from ", source)
-+
- tolua = ""
- if bootstrap:
- if os.name == 'nt':
-diff -urN tolua++-1.0.93/src/bin/lua/all.lua tolua++-1.0.93.lua52/src/bin/lua/all.lua
---- tolua++-1.0.93/src/bin/lua/all.lua 2007-07-03 08:03:38.000000000 +0200
-+++ tolua++-1.0.93.lua52/src/bin/lua/all.lua 2014-10-01 16:30:26.057393850 +0200
-@@ -1,8 +1,8 @@
- dofile(path.."compat-5.1.lua")
- dofile(path.."compat.lua")
--dofile(path.."basic.lua")
- dofile(path.."feature.lua")
- dofile(path.."verbatim.lua")
-+dofile(path.."basic.lua")
- dofile(path.."code.lua")
- dofile(path.."typedef.lua")
- dofile(path.."container.lua")
-diff -urN tolua++-1.0.93/src/bin/lua/basic.lua
tolua++-1.0.93.lua52/src/bin/lua/basic.lua
---- tolua++-1.0.93/src/bin/lua/basic.lua 2008-11-11 19:14:49.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/basic.lua 2014-10-01 16:30:26.112391980 +0200
-@@ -75,8 +75,8 @@
- end
-
- function applyrenaming (s)
-- for i=1,getn(_renaming) do
-- local m,n = gsub(s,_renaming[i].old,_renaming[i].new)
-+ for i,v in ipairs(_renaming) do
-+ local m,n = gsub(s,v.old,v.new)
- if n ~= 0 then
- return m
- end
-@@ -252,7 +252,8 @@
- -- concatenate all parameters, following output rules
- function concatparam (line, ...)
- local i=1
-- while i<=arg.n do
-+ local arg={...}
-+ while i<=#arg do
- if _cont and not strfind(_cont,'[%(,"]') and
- strfind(arg[i],"^[%a_~]") then
- line = line .. ' '
-@@ -263,7 +264,7 @@
- end
- i = i+1
- end
-- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
-+ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
- _cont=nil line = line .. '\n'
- end
- return line
-@@ -272,7 +273,8 @@
- -- output line
- function output (...)
- local i=1
-- while i<=arg.n do
-+ local arg = {...}
-+ while i<=#arg do
- if _cont and not strfind(_cont,'[%(,"]') and
- strfind(arg[i],"^[%a_~]") then
- write(' ')
-@@ -283,7 +285,7 @@
- end
- i = i+1
- end
-- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
-+ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
- _cont=nil write('\n')
- end
- end
-@@ -373,9 +375,10 @@
-
- end
-
-+
- -- called to output an error message
- function output_error_hook(...)
-- return string.format(...)
-+ return string.format(table.unpack{...})
- end
-
- -- custom pushers
-diff -urN tolua++-1.0.93/src/bin/lua/class.lua
tolua++-1.0.93.lua52/src/bin/lua/class.lua
---- tolua++-1.0.93/src/bin/lua/class.lua 2007-11-28 06:31:35.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/class.lua 2014-10-01 16:30:26.129391402 +0200
-@@ -92,7 +92,7 @@
- self.btype = typevar(self.base)
- self.ctype = 'const '..self.type
- if self.extra_bases then
-- for i=1,table.getn(self.extra_bases) do
-+ for i=1,#self.extra_bases do
- self.extra_bases[i] = typevar(self.extra_bases[i])
- end
- end
-@@ -138,9 +138,9 @@
- -- Expects the name, the base (array) and the body of the class.
- function Class (n,p,b)
-
-- if table.getn(p) > 1 then
-+ if #p > 1 then
- b = string.sub(b, 1, -2)
-- for i=2,table.getn(p),1 do
-+ for i=2,#p,1 do
- b = b.."\n tolua_inherits "..p[i].."
__"..p[i].."__;\n"
- end
- b = b.."\n}"
-diff -urN tolua++-1.0.93/src/bin/lua/clean.lua
tolua++-1.0.93.lua52/src/bin/lua/clean.lua
---- tolua++-1.0.93/src/bin/lua/clean.lua 2005-11-30 23:31:27.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/clean.lua 2014-10-01 16:30:26.133391266 +0200
-@@ -19,14 +19,14 @@
- }
-
- function mask (s)
-- for i = 1,getn(MASK) do
-+ for i = 1,#MASK do
- s = gsub(s,MASK[i][2],MASK[i][1])
- end
- return s
- end
-
- function unmask (s)
-- for i = 1,getn(MASK) do
-+ for i = 1,#MASK do
- s = gsub(s,MASK[i][1],MASK[i][2])
- end
- return s
-diff -urN tolua++-1.0.93/src/bin/lua/compat-5.1.lua
tolua++-1.0.93.lua52/src/bin/lua/compat-5.1.lua
---- tolua++-1.0.93/src/bin/lua/compat-5.1.lua 2007-07-03 08:03:38.000000000 +0200
-+++ tolua++-1.0.93.lua52/src/bin/lua/compat-5.1.lua 2014-10-01 16:30:26.169390042 +0200
-@@ -25,10 +25,10 @@
- end
- end
-
-- local f = load(getfile, path)
-+ local f, errmsg = load(getfile, path)
- if not f then
-
-- error("error loading file "..path)
-+ error("error loading file "..path ..": " .. errmsg)
- end
- return f()
- end
-diff -urN tolua++-1.0.93/src/bin/lua/compat.lua
tolua++-1.0.93.lua52/src/bin/lua/compat.lua
---- tolua++-1.0.93/src/bin/lua/compat.lua 2005-11-30 23:31:27.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/compat.lua 2014-10-01 16:30:26.173389906 +0200
-@@ -40,15 +40,13 @@
- end
- end
-
--function dostring(s) return do_(loadstring(s)) end
-+function dostring(s) return do_(load(s)) end
- -- function dofile(s) return do_(loadfile(s)) end
-
- -------------------------------------------------------------------
- -- Table library
- local tab = table
--foreach = tab.foreach
--foreachi = tab.foreachi
--getn = tab.getn
-+getn = function (tab) return #tab end
- tinsert = tab.insert
- tremove = tab.remove
- sort = tab.sort
-@@ -78,7 +76,7 @@
- frexp = math.frexp
- ldexp = math.ldexp
- log = math.log
--log10 = math.log10
-+log10 = function(val) return math.log(10, val) end
- max = math.max
- min = math.min
- mod = math.mod
-@@ -177,17 +175,19 @@
-
- function read (...)
- local f = _INPUT
-+ local arg = {...}
- if rawtype(arg[1]) == 'userdata' then
- f = tab.remove(arg, 1)
- end
-- return f:read(unpack(arg))
-+ return f:read(table.unpack(arg))
- end
-
- function write (...)
- local f = _OUTPUT
-+ local arg = {...}
- if rawtype(arg[1]) == 'userdata' then
- f = tab.remove(arg, 1)
- end
-- return f:write(unpack(arg))
-+ return f:write(table.unpack(arg))
- end
-
-diff -urN tolua++-1.0.93/src/bin/lua/declaration.lua
tolua++-1.0.93.lua52/src/bin/lua/declaration.lua
---- tolua++-1.0.93/src/bin/lua/declaration.lua 2008-07-18 07:27:24.000000000 +0200
-+++ tolua++-1.0.93.lua52/src/bin/lua/declaration.lua 2014-10-01 16:30:26.309385281 +0200
-@@ -137,7 +137,7 @@
- if b then
-
- m = split_c_tokens(string.sub(m, 2, -2), ",")
-- for i=1, table.getn(m) do
-+ for i=1, #m do
- m[i] = string.gsub(m[i],"%s*([%*&])", "%1")
- if not isbasic(m[i]) then
- if not isenum(m[i]) then _, m[i] = applytypedef("", m[i]) end
-@@ -522,7 +522,7 @@
- end
-
- -- check the form: mod type* name
-- local s1 = gsub(s,"(%b\[\])",function (n) return
gsub(n,'%*','\1') end)
-+ local s1 = gsub(s,"(%b%[%])",function (n) return
gsub(n,'%*','\1') end)
- t = split_c_tokens(s1,'%*')
- if t.n == 2 then
- t[2] = gsub(t[2],'\1','%*') -- restore * in dimension expression
-diff -urN tolua++-1.0.93/src/bin/lua/feature.lua
tolua++-1.0.93.lua52/src/bin/lua/feature.lua
---- tolua++-1.0.93/src/bin/lua/feature.lua 2007-10-30 02:58:17.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/feature.lua 2014-10-01 16:30:26.362383479 +0200
-@@ -132,7 +132,7 @@
- if not fname or fname == '' then
- fname = self.name
- end
-- n = string.gsub(n..'_'.. (fname), "[<>:, \.%*&]",
"_")
-+ n = string.gsub(n..'_'.. (fname), "[<>:, \\.%*&]",
"_")
-
- return n
- end
-diff -urN tolua++-1.0.93/src/bin/lua/function.lua
tolua++-1.0.93.lua52/src/bin/lua/function.lua
---- tolua++-1.0.93/src/bin/lua/function.lua 2008-11-11 19:14:49.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/function.lua 2014-10-01 16:30:26.415381678 +0200
-@@ -520,7 +520,7 @@
- function join(t, sep, first, last)
-
- first = first or 1
-- last = last or table.getn(t)
-+ last = last or #t
- local lsep = ""
- local ret = ""
- local loop = false
-diff -urN tolua++-1.0.93/src/bin/lua/package.lua
tolua++-1.0.93.lua52/src/bin/lua/package.lua
---- tolua++-1.0.93/src/bin/lua/package.lua 2007-10-30 02:58:17.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/package.lua 2014-10-01 16:30:26.539377462 +0200
-@@ -39,7 +39,7 @@
- self.code = gsub(self.code,"\n%s*%$%]","\2")
- self.code = gsub(self.code,"(%b\1\2)", function (c)
- tinsert(L,c)
-- return
"\n#["..getn(L).."]#"
-+ return "\n#[".. #L
.."]#"
- end)
- -- avoid preprocessing embedded C code
- local C = {}
-@@ -47,14 +47,14 @@
- self.code = gsub(self.code,"\n%s*%$%>","\4")
- self.code = gsub(self.code,"(%b\3\4)", function (c)
- tinsert(C,c)
-- return
"\n#<"..getn(C)..">#"
-+ return "\n#<".. #C
..">#"
- end)
- -- avoid preprocessing embedded C code
- self.code = gsub(self.code,"\n%s*%$%{","\5") -- deal with embedded
C code
- self.code = gsub(self.code,"\n%s*%$%}","\6")
- self.code = gsub(self.code,"(%b\5\6)", function (c)
- tinsert(C,c)
-- return
"\n#<"..getn(C)..">#"
-+ return "\n#<"..
#C..">#"
- end)
-
- --self.code = gsub(self.code,"\n%s*#[^d][^\n]*\n", "\n\n") --
eliminate preprocessor directives that don't start with 'd'
-@@ -64,7 +64,7 @@
- local V = {}
- self.code = gsub(self.code,"\n(%s*%$[^%[%]][^\n]*)",function (v)
- tinsert(V,v)
-- return
"\n#"..getn(V).."#"
-+ return "\n#".. #V
.."#"
- end)
-
- -- perform global substitution
-@@ -152,14 +152,14 @@
- if flags.t then
- output("#ifndef Mtolua_typeid\n#define Mtolua_typeid(L,TI,T)\n#endif\n")
- end
-- foreach(_usertype,function(n,v)
-+ for n,v in pairs(_usertype) do
- if (not _global_classes[v]) or _global_classes[v]:check_public_access() then
- output(' tolua_usertype(tolua_S,"',v,'");')
- if flags.t then
- output(' Mtolua_typeid(tolua_S,typeid(',v,'),
"',v,'");')
- end
- end
-- end)
-+ end
- output('}')
- output('\n')
- end
-@@ -288,7 +288,7 @@
- local t = {code=s}
- extra = string.gsub(extra, "^%s*,%s*", "")
- local pars = split_c_tokens(extra, ",")
-- include_file_hook(t, fn, unpack(pars))
-+ include_file_hook(t, fn, table.unpack(pars))
- return "\n\n" .. t.code
- else
- error('#Invalid include directive (use $cfile, $pfile, $lfile or $ifile)')
-@@ -322,7 +322,7 @@
- table.insert(chunk, string.sub(line, 3) .. "\n")
- else
- local last = 1
-- for text, expr, index in string.gfind(line, "(.-)$(%b())()") do
-+ for text, expr, index in string.gmatch(line, "(.-)$(%b())()") do
- last = index
- if text ~= "" then
- table.insert(chunk, string.format('table.insert(__ret, %q )', text))
-@@ -334,10 +334,9 @@
- end
- end
- table.insert(chunk, '\nreturn table.concat(__ret)\n')
-- local f,e = loadstring(table.concat(chunk))
-+ local f,e = load(table.concat(chunk), nil, "t", _extra_parameters)
- if e then
- error("#"..e)
- end
-- setfenv(f, _extra_parameters)
- return f()
- end
-diff -urN tolua++-1.0.93/src/bin/lua/template_class.lua
tolua++-1.0.93.lua52/src/bin/lua/template_class.lua
---- tolua++-1.0.93/src/bin/lua/template_class.lua 2007-11-28 06:31:35.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/bin/lua/template_class.lua 2014-10-01 16:30:26.563376645
+0200
-@@ -22,7 +22,7 @@
- for i =1 , types.n do
-
- local Il = split_c_tokens(types[i], " ")
-- if table.getn(Il) ~= table.getn(self.args) then
-+ if #Il ~= #self.args then
- error("#invalid parameter count for "..types[i])
- end
- local bI = self.body
-@@ -31,16 +31,16 @@
- --Tl[j] = findtype(Tl[j]) or Tl[j]
- bI = string.gsub(bI, "([^_%w])"..self.args[j].."([^_%w])",
"%1"..Il[j].."%2")
- if self.parents then
-- for i=1,table.getn(self.parents) do
-+ for i=1,#self.parents do
- pI[i] = string.gsub(self.parents[i],
"([^_%w]?)"..self.args[j].."([^_%w]?)",
"%1"..Il[j].."%2")
- end
- end
- end
- --local append = "<"..string.gsub(types[i], "%s+",
",")..">"
-- local append = "<"..concat(Il, 1, table.getn(Il),
",")..">"
-+ local append = "<"..concat(Il, 1, #Il, ",")..">"
- append = string.gsub(append, "%s*,%s*", ",")
- append = string.gsub(append, ">>", "> >")
-- for i=1,table.getn(pI) do
-+ for i=1,#pI do
- --pI[i] = string.gsub(pI[i], ">>", "> >")
- pI[i] = resolve_template_types(pI[i])
- end
-diff -urN tolua++-1.0.93/src/bin/tolua.c tolua++-1.0.93.lua52/src/bin/tolua.c
---- tolua++-1.0.93/src/bin/tolua.c 2006-07-29 04:45:56.000000000 +0200
-+++ tolua++-1.0.93.lua52/src/bin/tolua.c 2014-09-30 18:42:00.823196281 +0200
-@@ -67,7 +67,11 @@
- static void add_extra (lua_State* L, char* value) {
- int len;
- lua_getglobal(L, "_extra_parameters");
-+#if LUA_VERSION_NUM > 501
-+ len = lua_rawlen(L, -1);
-+#else
- len = luaL_getn(L, -1);
-+#endif
- lua_pushstring(L, value);
- lua_rawseti(L, -2, len+1);
- lua_pop(L, 1);
-diff -urN tolua++-1.0.93/src/lib/tolua_event.c
tolua++-1.0.93.lua52/src/lib/tolua_event.c
---- tolua++-1.0.93/src/lib/tolua_event.c 2006-10-14 08:18:11.000000000 +0200
-+++ tolua++-1.0.93.lua52/src/lib/tolua_event.c 2014-10-06 11:32:46.162013835 +0200
-@@ -23,12 +23,20 @@
- static void storeatubox (lua_State* L, int lo)
- {
- #ifdef LUA_VERSION_NUM
-+#if LUA_VERSION_NUM > 501
-+ lua_getuservalue(L, lo);
-+#else
- lua_getfenv(L, lo);
-+#endif
- if (lua_rawequal(L, -1, TOLUA_NOPEER)) {
- lua_pop(L, 1);
- lua_newtable(L);
- lua_pushvalue(L, -1);
-+#if LUA_VERSION_NUM > 501
-+ lua_setuservalue(L, lo); /* stack: k,v,table */
-+#else
- lua_setfenv(L, lo); /* stack: k,v,table */
-+#endif
- };
- lua_insert(L, -3);
- lua_settable(L, -3); /* on lua 5.1, we trade the "tolua_peers" lookup for a
settable call */
-@@ -141,7 +149,11 @@
- {
- /* Access alternative table */
- #ifdef LUA_VERSION_NUM /* new macro on version 5.1 */
-+#if LUA_VERSION_NUM > 501
-+ lua_getuservalue(L, 1);
-+#else
- lua_getfenv(L,1);
-+#endif
- if (!lua_rawequal(L, -1, TOLUA_NOPEER)) {
- lua_pushvalue(L, 2); /* key */
- lua_gettable(L, -2); /* on lua 5.1, we trade the "tolua_peers" lookup for a
gettable call */
-@@ -420,6 +432,8 @@
- */
- TOLUA_API int class_gc_event (lua_State* L)
- {
-+ if (lua_type(L,1) == LUA_TUSERDATA)
-+ {
- void* u = *((void**)lua_touserdata(L,1));
- int top;
- /*fprintf(stderr, "collecting: looking at %p\n", u);*/
-@@ -427,7 +441,8 @@
- lua_pushstring(L,"tolua_gc");
- lua_rawget(L,LUA_REGISTRYINDEX);
- */
-- lua_pushvalue(L, lua_upvalueindex(1));
-+ lua_pushstring(L,"tolua_gc");
-+ lua_rawget(L,LUA_REGISTRYINDEX); /* gc */
- lua_pushlightuserdata(L,u);
- lua_rawget(L,-2); /* stack: gc umt */
- lua_getmetatable(L,1); /* stack: gc umt mt */
-@@ -456,6 +471,7 @@
- lua_rawset(L,-5); /* stack: gc umt mt */
- }
- lua_pop(L,3);
-+ }
- return 0;
- }
-
-diff -urN tolua++-1.0.93/src/lib/tolua_map.c tolua++-1.0.93.lua52/src/lib/tolua_map.c
---- tolua++-1.0.93/src/lib/tolua_map.c 2009-02-14 04:06:32.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/lib/tolua_map.c 2014-09-30 18:42:00.836195826 +0200
-@@ -262,8 +262,12 @@
-
- lua_pop(L, 1);
- lua_pushvalue(L, TOLUA_NOPEER);
-- };
-+ }
-+#if LUA_VERSION_NUM > 501
-+ lua_setuservalue(L, -2);
-+#else
- lua_setfenv(L, -2);
-+#endif
-
- return 0;
- };
-@@ -271,7 +275,11 @@
- static int tolua_bnd_getpeer(lua_State* L) {
-
- /* stack: userdata */
-+#if LUA_VERSION_NUM > 501
-+ lua_getuservalue(L, -1);
-+#else
- lua_getfenv(L, -1);
-+#endif
- if (lua_rawequal(L, -1, TOLUA_NOPEER)) {
- lua_pop(L, 1);
- lua_pushnil(L);
-@@ -411,7 +419,11 @@
- lua_rawget(L,-2);
- }
- else
-+#if LUA_VERSION_NUM > 501
-+ lua_pushglobaltable(L);
-+#else
- lua_pushvalue(L,LUA_GLOBALSINDEX);
-+#endif
- }
-
- /* End module
-@@ -445,7 +457,11 @@
- else
- {
- /* global table */
-+#if LUA_VERSION_NUM > 501
-+ lua_pushglobaltable(L);
-+#else
- lua_pushvalue(L,LUA_GLOBALSINDEX);
-+#endif
- }
- if (hasvar)
- {
-@@ -473,7 +489,11 @@
- else
- {
- /* global table */
-+#if LUA_VERSION_NUM > 501
-+ lua_pushglobaltable(L);
-+#else
- lua_pushvalue(L,LUA_GLOBALSINDEX);
-+#endif
- }
- if (hasvar)
- {
-diff -urN tolua++-1.0.93/src/lib/tolua_push.c tolua++-1.0.93.lua52/src/lib/tolua_push.c
---- tolua++-1.0.93/src/lib/tolua_push.c 2007-02-10 03:43:56.000000000 +0100
-+++ tolua++-1.0.93.lua52/src/lib/tolua_push.c 2014-09-30 18:42:00.844195546 +0200
-@@ -79,7 +79,11 @@
-
- #ifdef LUA_VERSION_NUM
- lua_pushvalue(L, TOLUA_NOPEER);
-+#if LUA_VERSION_NUM > 501
-+ lua_setuservalue(L, -2);
-+#else
- lua_setfenv(L, -2);
-+#endif
- #endif
- }
- else
diff --git a/tolua++-1.0.93-no-buildin-bytecode.patch
b/tolua++-1.0.93-no-buildin-bytecode.patch
deleted file mode 100644
index 3556105..0000000
--- a/tolua++-1.0.93-no-buildin-bytecode.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff -urN tolua++-1.0.93/src/bin/SCsub tolua++-1.0.93.no-builtin/src/bin/SCsub
---- tolua++-1.0.93/src/bin/SCsub 2008-04-21 02:05:35.000000000 +0200
-+++ tolua++-1.0.93.no-builtin/src/bin/SCsub 2014-10-01 15:54:39.001158444 +0200
-@@ -5,8 +5,8 @@
- ]
-
-
--toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
-+#toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
-
--env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src +
[toluabind], LIBS = ['$tolua_lib'] + env['LIBS'])
-+env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src, LIBS =
['$tolua_lib'] + env['LIBS'])
-
- env.bootstrap_target = env.Program('#/bin/'+env['TOLUAPP_BOOTSTRAP'],
src + ['toluabind_default.c', env.lib_target_static], LIBS = env['LIBS'])
-diff -urN tolua++-1.0.93/src/bin/tolua.c tolua++-1.0.93.no-builtin/src/bin/tolua.c
---- tolua++-1.0.93/src/bin/tolua.c 2006-07-29 04:45:56.000000000 +0200
-+++ tolua++-1.0.93.no-builtin/src/bin/tolua.c 2014-10-01 16:06:09.791424704 +0200
-@@ -145,7 +145,7 @@
- }
- lua_pop(L,1);
- }
--/* #define TOLUA_SCRIPT_RUN */
-+#define TOLUA_SCRIPT_RUN
- #ifndef TOLUA_SCRIPT_RUN
- {
- int tolua_tolua_open (lua_State* L);
-@@ -153,16 +153,17 @@
- }
- #else
- {
-- char* p;
-- char path[BUFSIZ];
-- strcpy(path,argv[0]);
-- p = strrchr(path,'/');
-- if (p==NULL) p = strrchr(path,'\\');
-- p = (p==NULL) ? path : p+1;
-- sprintf(p,"%s","../src/bin/lua/");
-- lua_pushstring(L,path); lua_setglobal(L,"path");
-- strcat(path,"all.lua");
-- lua_dofile(L,path);
-+ lua_pushstring(L, "/usr/share/tolua++/");
lua_setglobal(L,"path");
-+ if (luaL_loadfile(L, "/usr/share/tolua++/all.lua") != 0) {
-+ fprintf(stderr, "luaL_loadfile failed\n");
-+ return 1;
-+ }
-+ if (lua_pcall(L, 0,0,0) != 0) {
-+ const char *errmsg = lua_tostring(L, -1);
-+ fprintf(stderr, "lua_pcall failed: %s\n", errmsg);
-+ lua_pop(L, 1);
-+ return 1;
-+ }
- }
- #endif
- return 0;
diff --git a/tolua++.spec b/tolua++.spec
deleted file mode 100644
index 7f90af3..0000000
--- a/tolua++.spec
+++ /dev/null
@@ -1,185 +0,0 @@
-%define solib tolua++-5.3
-
-Name: tolua++
-Version: 1.0.93
-Release: 26%{?dist}
-Summary: A tool to integrate C/C++ code with Lua
-License: MIT
-URL:
http://www.codenix.com/~tolua/
-Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
-Patch0: tolua++-1.0.93-no-buildin-bytecode.patch
-Patch1: tolua++-1.0.93-lua52.patch
-BuildRequires: gcc-c++
-BuildRequires: scons
-BuildRequires: lua-devel >= 5.3
-
-%description
-tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
-Lua. tolua++ includes new features oriented to C++.
-
-
-%package devel
-Summary: Development files for tolua++
-Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: lua-devel >= 5.3
-
-%description devel
-Development files for tolua++
-
-
-%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-sed -i 's/\r//' doc/%{name}.html
-
-
-%build
-scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
-# Relink the tolua++ binary, to link it without the soname which we add to
-# LINKFLAGS to build a shared lib
-gcc -o bin/%{name} src/bin/tolua.o -Llib -l%{solib} -llua -ldl -lm
-
-
-%install
-mkdir -p $RPM_BUILD_ROOT%{_bindir}
-mkdir -p $RPM_BUILD_ROOT%{_libdir}
-mkdir -p $RPM_BUILD_ROOT%{_includedir}
-install -m 755 bin/%{name} $RPM_BUILD_ROOT%{_bindir}
-install -m 755 lib/lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}
-ln -s lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}/libtolua++.so
-install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
-# For use with Patch2 (not working yet)
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
-install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
-
-
-%ldconfig_scriptlets
-
-
-%files
-%doc README doc/*
-%{_libdir}/lib%{solib}.so
-%{_datadir}/%{name}
-
-
-%files devel
-%{_bindir}/%{name}
-%{_libdir}/libtolua++.so
-%{_includedir}/%{name}.h
-
-
-%changelog
-* Sat Jul 27 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-26
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Sun Feb 03 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-25
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Sat Jul 14 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-24
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Wed Mar 07 2018 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-23
-- Add BR gcc-c++
-
-* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-22
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-21
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
-
-* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-20
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-19
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
-
-* Fri Feb 05 2016 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-18
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-
-* Mon Feb 01 2016 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-17
-- Update library name to reflect linking with Lua 5.3
-
-* Fri Jun 19 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-16
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-
-* Wed Dec 17 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-15
-- Drop unused patches
-- Re-add comment about why we need to relink tolua++ after calling scons
-
-* Mon Dec 15 2014 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-14
-- Compatibility with Lua 5.2
-
-* Mon Aug 18 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-13
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
-
-* Mon Jun 16 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-12
-- Use the pre-generated toluabind.c everywhere but x86_64, something goes wrong
- when re-generating it (bootstrap) elsewhere (rhbz#1094103)
-
-* Sun Jun 08 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-11
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
-* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-10
-- Use the pre-generated toluabind.c on non x86, as something goes wrong
- when re-generating it (bootstrap) on non x86. This fixes tolua++
- segfaulting on arm, and hopefully also on ppc (rhbz#704372)
-
-* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-9
-- Honor the compiler include path when opening lua.h
-
-* Sun Aug 04 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-8
-- Switch over to compat-lua-5.1
-
-* Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-7
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
-
-* Fri Feb 15 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-6
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
-
-* Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-5
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
-
-* Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-4
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
-
-* Wed Oct 12 2011 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-3
-- Exclude ppc, there are problems according to bz #704372
-
-* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-2
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-
-* Thu Feb 25 2010 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-1
-- Upgrade to 1.0.93
-
-* Sun Jul 26 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-9
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Wed Feb 25 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-8
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
-* Thu Mar 13 2008 Tim Niemueller <tim(a)niemueller.de> - 1.0.92-7
-- Added patch to make tolua++ compatible with GCC 4.3
-
-* Tue Feb 19 2008 Fedora Release Engineering <rel-eng(a)fedoraproject.org> -
1.0.92-6
-- Autorebuild for GCC 4.3
-
-* Wed Aug 22 2007 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-5
-- Release bump for F8 mass rebuild
-- Updated license due to new guidelines
-
-* Mon Aug 28 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-4
-- Release bump for FC6 mass rebuild
-
-* Sat Jun 03 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-3
-- Fixed issue with where tolua++ was tagged with an soname the same as the lib
- meaning ld would fail to locate the library.
-
-* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-2
-- Changed license from Freeware Style to just Freeware
-- Changed => to more conventional >= for (build)requires
-- Moved %%{_bindir}/tolua++ to devel package
-- Now adds soname to library
-
-* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-1
-- Initial Release
commit edd5adc155497bd65187afc1b26950b0b4c24e75
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jul 27 01:39:03 2019 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/tolua++.spec b/tolua++.spec
index 44ef926..7f90af3 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 25%{?dist}
+Release: 26%{?dist}
Summary: A tool to integrate C/C++ code with Lua
License: MIT
URL:
http://www.codenix.com/~tolua/
@@ -70,6 +70,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Sat Jul 27 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-26
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
* Sun Feb 03 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-25
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
commit a7b6e270dbb0c9f48308533c907e0551b830e377
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sun Feb 3 10:02:35 2019 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/tolua++.spec b/tolua++.spec
index 95b0bd5..44ef926 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 24%{?dist}
+Release: 25%{?dist}
Summary: A tool to integrate C/C++ code with Lua
License: MIT
URL:
http://www.codenix.com/~tolua/
@@ -70,6 +70,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Sun Feb 03 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-25
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
* Sat Jul 14 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-24
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
commit 92a0b82b34486bcde4a457cfe9b9f30b2b20a396
Author: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
Date: Mon Jan 28 20:18:28 2019 +0100
Remove obsolete Group tag
References:
https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
diff --git a/tolua++.spec b/tolua++.spec
index 60991d9..95b0bd5 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -4,7 +4,6 @@ Name: tolua++
Version: 1.0.93
Release: 24%{?dist}
Summary: A tool to integrate C/C++ code with Lua
-Group: Development/Tools
License: MIT
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
@@ -21,7 +20,6 @@ Lua. tolua++ includes new features oriented to C++.
%package devel
Summary: Development files for tolua++
-Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: lua-devel >= 5.3
commit 3dbac895fe34b0d1b52dd1c05ab1c526e108fdd0
Author: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
Date: Tue Jan 22 18:41:11 2019 +0100
Remove obsolete ldconfig scriptlets
References:
https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
diff --git a/tolua++.spec b/tolua++.spec
index ac7bdd6..60991d9 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -56,8 +56,7 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%ldconfig_scriptlets
%files
commit 42e655b52a170f90b43c0b27938bef02b942e646
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jul 14 07:42:08 2018 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/tolua++.spec b/tolua++.spec
index 0d8c625..ac7bdd6 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 23%{?dist}
+Release: 24%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -73,6 +73,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Sat Jul 14 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-24
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Wed Mar 07 2018 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-23
- Add BR gcc-c++
commit 07ddceab7e34e0f94671036c295f2005dc08cda8
Author: Tim Niemueller <niemueller(a)kbsg.rwth-aachen.de>
Date: Wed Mar 7 09:09:12 2018 +0100
Add BR gcc-c++
diff --git a/tolua++.spec b/tolua++.spec
index 66f5142..0d8c625 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 22%{?dist}
+Release: 23%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -10,6 +10,7 @@ URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.93-no-buildin-bytecode.patch
Patch1: tolua++-1.0.93-lua52.patch
+BuildRequires: gcc-c++
BuildRequires: scons
BuildRequires: lua-devel >= 5.3
@@ -72,6 +73,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Wed Mar 07 2018 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-23
+- Add BR gcc-c++
+
* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-22
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
commit 851856ca35b614469ad00818056b19c1709d2eef
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Feb 9 19:10:00 2018 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/tolua++.spec b/tolua++.spec
index 41f2e71..66f5142 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 21%{?dist}
+Release: 22%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -72,6 +72,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-22
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-21
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
commit ff88e10daa8b3899f616a79f44742b45377718ab
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Thu Aug 3 09:31:03 2017 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index c19366e..41f2e71 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 20%{?dist}
+Release: 21%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -72,6 +72,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-21
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+
* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-20
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
commit 38ce8d9b87dffe4ae22966e2158fa3d7dcf5687a
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Thu Jul 27 20:25:26 2017 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 8f93983..c19366e 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 19%{?dist}
+Release: 20%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -72,6 +72,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-20
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+
* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-19
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
commit 92225011dc43e6119c24bea0da9adbac8651bd71
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Feb 11 16:06:46 2017 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index c16b020..8f93983 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 18%{?dist}
+Release: 19%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -72,6 +72,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-19
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
* Fri Feb 05 2016 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-18
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
commit 60fbfd4d1dee45278006ceb8191b7e73751525d9
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Feb 5 01:45:37 2016 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 1688512..c16b020 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 17%{?dist}
+Release: 18%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -72,6 +72,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Fri Feb 05 2016 Fedora Release Engineering <releng(a)fedoraproject.org> -
1.0.93-18
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
* Mon Feb 01 2016 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-17
- Update library name to reflect linking with Lua 5.3
commit 1d38ab1c68ef6baf76bb6d642bc9b3135b8c6b71
Author: Tim Niemueller <niemueller(a)kbsg.rwth-aachen.de>
Date: Mon Feb 1 10:26:38 2016 +0100
Update library name to reflect linking with Lua 5.3
diff --git a/tolua++.spec b/tolua++.spec
index b8f5d61..1688512 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -1,8 +1,8 @@
-%define solib tolua++-5.2
+%define solib tolua++-5.3
Name: tolua++
Version: 1.0.93
-Release: 16%{?dist}
+Release: 17%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -11,7 +11,7 @@ Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.93-no-buildin-bytecode.patch
Patch1: tolua++-1.0.93-lua52.patch
BuildRequires: scons
-BuildRequires: lua-devel >= 5.2
+BuildRequires: lua-devel >= 5.3
%description
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
@@ -22,7 +22,7 @@ Lua. tolua++ includes new features oriented to C++.
Summary: Development files for tolua++
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: lua-devel >= 5.2
+Requires: lua-devel >= 5.3
%description devel
Development files for tolua++
@@ -72,6 +72,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Mon Feb 01 2016 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-17
+- Update library name to reflect linking with Lua 5.3
+
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-16
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
commit 1151ed6408902e340aac799b931851fea3b34f08
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Fri Jun 19 03:05:03 2015 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 6c9e0d2..b8f5d61 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 15%{?dist}
+Release: 16%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -72,6 +72,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Fri Jun 19 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-16
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
* Wed Dec 17 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-15
- Drop unused patches
- Re-add comment about why we need to relink tolua++ after calling scons
commit 5b007e5afd930a85acd8ca2190855152789b3b17
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Wed Dec 17 13:57:51 2014 +0100
Drop unused patches
- Re-add comment about why we need to relink tolua++ after calling scons
diff --git a/tolua++-1.0.93-lua-include-path.patch
b/tolua++-1.0.93-lua-include-path.patch
deleted file mode 100644
index 0107d93..0000000
--- a/tolua++-1.0.93-lua-include-path.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up tolua++-1.0.93/include/tolua++.h~ tolua++-1.0.93/include/tolua++.h
---- tolua++-1.0.93/include/tolua++.h~ 2008-05-02 21:20:37.000000000 +0200
-+++ tolua++-1.0.93/include/tolua++.h 2013-08-09 12:52:16.229145059 +0200
-@@ -43,8 +43,8 @@ extern "C" {
-
- typedef int lua_Object;
-
--#include "lua.h"
--#include "lauxlib.h"
-+#include <lua.h>
-+#include <lauxlib.h>
-
- struct tolua_Error
- {
diff --git a/tolua++-1.0.93-lua51.patch b/tolua++-1.0.93-lua51.patch
deleted file mode 100644
index 2c41ea4..0000000
--- a/tolua++-1.0.93-lua51.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -up tolua++-1.0.93/config_linux.py.lua51 tolua++-1.0.93/config_linux.py
---- tolua++-1.0.93/config_linux.py.lua51 2005-11-30 23:31:27.000000000 +0100
-+++ tolua++-1.0.93/config_linux.py 2013-08-03 12:26:16.260951919 +0200
-@@ -4,7 +4,7 @@
-
- # Compiler flags (based on Debian's installation of lua)
- #LINKFLAGS = ['-g']
--CCFLAGS = ['-I/usr/include/lua50', '-O2', '-ansi',
'-Wall']
-+CCFLAGS = ['-I/usr/include/lua51', '-O2', '-ansi',
'-Wall']
- #CCFLAGS = ['-I/usr/include/lua50', '-g']
-
- # this is the default directory for installation. Files will be installed on
-@@ -18,5 +18,5 @@ CCFLAGS = ['-I/usr/include/lua50', '-O2'
- prefix = '/usr/local'
-
- # libraries (based on Debian's installation of lua)
--LIBS = ['lua50', 'lualib50', 'dl', 'm']
-+LIBS = ['lua-5.1', 'dl', 'm']
-
-diff -up tolua++-1.0.93/custom.py.lua51 tolua++-1.0.93/custom.py
---- tolua++-1.0.93/custom.py.lua51 2013-08-03 12:23:41.400953222 +0200
-+++ tolua++-1.0.93/custom.py 2013-08-03 12:23:41.400953222 +0200
-@@ -0,0 +1,9 @@
-+CCFLAGS = ['-O2', '-ansi']
-+#LIBPATH = ['/usr/local/lib']
-+LIBS = ['lua-5.1', 'dl', 'm']
-+prefix = '/usr'
-+build_dev=1
-+tolua_bin = 'tolua++'
-+tolua_lib = 'tolua++-5.1'
-+TOLUAPP = 'tolua++-5.1'
-+
diff --git a/tolua++.spec b/tolua++.spec
index c48e0ba..6c9e0d2 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,16 +2,14 @@
Name: tolua++
Version: 1.0.93
-Release: 14%{?dist}
+Release: 15%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
-Patch0: tolua++-1.0.93-lua51.patch
-Patch1: tolua++-1.0.93-lua-include-path.patch
-Patch2: tolua++-1.0.93-no-buildin-bytecode.patch
-Patch3: tolua++-1.0.93-lua52.patch
+Patch0: tolua++-1.0.93-no-buildin-bytecode.patch
+Patch1: tolua++-1.0.93-lua52.patch
BuildRequires: scons
BuildRequires: lua-devel >= 5.2
@@ -32,14 +30,15 @@ Development files for tolua++
%prep
%setup -q
-#%patch0 -p1 -b .lua51
-%patch2 -p1 -b .no-builtin
-%patch3 -p1 -b .lua52
+%patch0 -p1
+%patch1 -p1
sed -i 's/\r//' doc/%{name}.html
%build
scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
+# Relink the tolua++ binary, to link it without the soname which we add to
+# LINKFLAGS to build a shared lib
gcc -o bin/%{name} src/bin/tolua.o -Llib -l%{solib} -llua -ldl -lm
@@ -73,6 +72,10 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Wed Dec 17 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-15
+- Drop unused patches
+- Re-add comment about why we need to relink tolua++ after calling scons
+
* Mon Dec 15 2014 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-14
- Compatibility with Lua 5.2
commit 9f65d6d680d9da65318d7348c8dbde5b7a93419f
Author: Tim Niemueller <niemueller(a)kbsg.rwth-aachen.de>
Date: Mon Dec 15 18:47:56 2014 +0100
Unified linking, add missing changelog entry
We no longer need to link differently on non-x86-64 platforms as we do
not embed code anymore, but rather install it along the package and just
load and call it. That makes it easier to modify and fix it and seems to
solve the problem for me. But I do not have a non-x86-64 platform at
hand right now, someone who has please confirm.
Add missing changelog entry along the way.
diff --git a/tolua++.spec b/tolua++.spec
index f6d14d4..c48e0ba 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -40,19 +40,7 @@ sed -i 's/\r//' doc/%{name}.html
%build
scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
-# Relink the tolua++ binary, there are 2 reasons for this:
-# -Link it without the soname which we add to LINKFLAGS to build a shared lib
-# -On non x86_64 link it against the pre-generated toluabind rather then the
-# bootstapped one as something goes wrong with the bootstrap on ARM, x86_32
-# (rhbz#1094103) and ppc (rhbz#704372) causing a segfault for unknown reasons.
-# It would be better to switch to using lua code directly, rather then
-# using built-in lua byte-code, since the byte-code is somewhat platfrom
-# dependent, see Patch2 for an attempt at this
-%ifarch x86_64
gcc -o bin/%{name} src/bin/tolua.o -Llib -l%{solib} -llua -ldl -lm
-%else
-gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind_default.o -Llib -l%{solib} -llua
-ldl -lm
-%endif
%install
@@ -85,6 +73,9 @@ install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%changelog
+* Mon Dec 15 2014 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-14
+- Compatibility with Lua 5.2
+
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-13
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
commit a724f634f2910c31fa9e7938640b752293251d12
Author: Tim Niemueller <niemueller(a)kbsg.rwth-aachen.de>
Date: Mon Dec 15 18:26:13 2014 +0100
Make tolua++ compatible with Lua 5.2
This makes it compatible with only Lua 5.2! An email to maintainers of
depending packages will be sent after a successful build. An update will
not be pushed before coordinating with them.
diff --git a/tolua++-1.0.93-lua52.patch b/tolua++-1.0.93-lua52.patch
new file mode 100644
index 0000000..9f3c741
--- /dev/null
+++ b/tolua++-1.0.93-lua52.patch
@@ -0,0 +1,553 @@
+diff -urN tolua++-1.0.93/config_linux.py tolua++-1.0.93.lua52/config_linux.py
+--- tolua++-1.0.93/config_linux.py 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93.lua52/config_linux.py 2014-09-30 18:42:00.850195336 +0200
+@@ -4,7 +4,7 @@
+
+ # Compiler flags (based on Debian's installation of lua)
+ #LINKFLAGS = ['-g']
+-CCFLAGS = ['-I/usr/include/lua50', '-O2', '-ansi',
'-Wall']
++CCFLAGS = ['-O2', '-ansi', '-Wall']
+ #CCFLAGS = ['-I/usr/include/lua50', '-g']
+
+ # this is the default directory for installation. Files will be installed on
+@@ -18,5 +18,5 @@
+ prefix = '/usr/local'
+
+ # libraries (based on Debian's installation of lua)
+-LIBS = ['lua50', 'lualib50', 'dl', 'm']
++LIBS = ['lua', 'dl', 'm']
+
+diff -urN tolua++-1.0.93/custom.py tolua++-1.0.93.lua52/custom.py
+--- tolua++-1.0.93/custom.py 1970-01-01 01:00:00.000000000 +0100
++++ tolua++-1.0.93.lua52/custom.py 2014-10-01 11:52:32.217957188 +0200
+@@ -0,0 +1,9 @@
++CCFLAGS = ['-O2', '-ansi']
++#LIBPATH = ['/usr/local/lib']
++LIBS = ['lua', 'dl', 'm']
++prefix = '/usr'
++build_dev=1
++tolua_bin = 'tolua++'
++tolua_lib = 'tolua++-5.2'
++TOLUAPP = 'tolua++'
++
+diff -urN tolua++-1.0.93/SConstruct tolua++-1.0.93.lua52/SConstruct
+--- tolua++-1.0.93/SConstruct 2008-04-21 02:05:35.000000000 +0200
++++ tolua++-1.0.93.lua52/SConstruct 2014-10-01 13:51:40.837513339 +0200
+@@ -82,6 +82,8 @@
+ header = target[:-2] + '.h'
+ pheader = Dir('.').path + '/' + header
+
++ print("Generating ", target, " from ", source)
++
+ tolua = ""
+ if bootstrap:
+ if os.name == 'nt':
+diff -urN tolua++-1.0.93/src/bin/lua/all.lua tolua++-1.0.93.lua52/src/bin/lua/all.lua
+--- tolua++-1.0.93/src/bin/lua/all.lua 2007-07-03 08:03:38.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/lua/all.lua 2014-10-01 16:30:26.057393850 +0200
+@@ -1,8 +1,8 @@
+ dofile(path.."compat-5.1.lua")
+ dofile(path.."compat.lua")
+-dofile(path.."basic.lua")
+ dofile(path.."feature.lua")
+ dofile(path.."verbatim.lua")
++dofile(path.."basic.lua")
+ dofile(path.."code.lua")
+ dofile(path.."typedef.lua")
+ dofile(path.."container.lua")
+diff -urN tolua++-1.0.93/src/bin/lua/basic.lua
tolua++-1.0.93.lua52/src/bin/lua/basic.lua
+--- tolua++-1.0.93/src/bin/lua/basic.lua 2008-11-11 19:14:49.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/basic.lua 2014-10-01 16:30:26.112391980 +0200
+@@ -75,8 +75,8 @@
+ end
+
+ function applyrenaming (s)
+- for i=1,getn(_renaming) do
+- local m,n = gsub(s,_renaming[i].old,_renaming[i].new)
++ for i,v in ipairs(_renaming) do
++ local m,n = gsub(s,v.old,v.new)
+ if n ~= 0 then
+ return m
+ end
+@@ -252,7 +252,8 @@
+ -- concatenate all parameters, following output rules
+ function concatparam (line, ...)
+ local i=1
+- while i<=arg.n do
++ local arg={...}
++ while i<=#arg do
+ if _cont and not strfind(_cont,'[%(,"]') and
+ strfind(arg[i],"^[%a_~]") then
+ line = line .. ' '
+@@ -263,7 +264,7 @@
+ end
+ i = i+1
+ end
+- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
++ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
+ _cont=nil line = line .. '\n'
+ end
+ return line
+@@ -272,7 +273,8 @@
+ -- output line
+ function output (...)
+ local i=1
+- while i<=arg.n do
++ local arg = {...}
++ while i<=#arg do
+ if _cont and not strfind(_cont,'[%(,"]') and
+ strfind(arg[i],"^[%a_~]") then
+ write(' ')
+@@ -283,7 +285,7 @@
+ end
+ i = i+1
+ end
+- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
++ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
+ _cont=nil write('\n')
+ end
+ end
+@@ -373,9 +375,10 @@
+
+ end
+
++
+ -- called to output an error message
+ function output_error_hook(...)
+- return string.format(...)
++ return string.format(table.unpack{...})
+ end
+
+ -- custom pushers
+diff -urN tolua++-1.0.93/src/bin/lua/class.lua
tolua++-1.0.93.lua52/src/bin/lua/class.lua
+--- tolua++-1.0.93/src/bin/lua/class.lua 2007-11-28 06:31:35.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/class.lua 2014-10-01 16:30:26.129391402 +0200
+@@ -92,7 +92,7 @@
+ self.btype = typevar(self.base)
+ self.ctype = 'const '..self.type
+ if self.extra_bases then
+- for i=1,table.getn(self.extra_bases) do
++ for i=1,#self.extra_bases do
+ self.extra_bases[i] = typevar(self.extra_bases[i])
+ end
+ end
+@@ -138,9 +138,9 @@
+ -- Expects the name, the base (array) and the body of the class.
+ function Class (n,p,b)
+
+- if table.getn(p) > 1 then
++ if #p > 1 then
+ b = string.sub(b, 1, -2)
+- for i=2,table.getn(p),1 do
++ for i=2,#p,1 do
+ b = b.."\n tolua_inherits "..p[i].."
__"..p[i].."__;\n"
+ end
+ b = b.."\n}"
+diff -urN tolua++-1.0.93/src/bin/lua/clean.lua
tolua++-1.0.93.lua52/src/bin/lua/clean.lua
+--- tolua++-1.0.93/src/bin/lua/clean.lua 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/clean.lua 2014-10-01 16:30:26.133391266 +0200
+@@ -19,14 +19,14 @@
+ }
+
+ function mask (s)
+- for i = 1,getn(MASK) do
++ for i = 1,#MASK do
+ s = gsub(s,MASK[i][2],MASK[i][1])
+ end
+ return s
+ end
+
+ function unmask (s)
+- for i = 1,getn(MASK) do
++ for i = 1,#MASK do
+ s = gsub(s,MASK[i][1],MASK[i][2])
+ end
+ return s
+diff -urN tolua++-1.0.93/src/bin/lua/compat-5.1.lua
tolua++-1.0.93.lua52/src/bin/lua/compat-5.1.lua
+--- tolua++-1.0.93/src/bin/lua/compat-5.1.lua 2007-07-03 08:03:38.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/lua/compat-5.1.lua 2014-10-01 16:30:26.169390042 +0200
+@@ -25,10 +25,10 @@
+ end
+ end
+
+- local f = load(getfile, path)
++ local f, errmsg = load(getfile, path)
+ if not f then
+
+- error("error loading file "..path)
++ error("error loading file "..path ..": " .. errmsg)
+ end
+ return f()
+ end
+diff -urN tolua++-1.0.93/src/bin/lua/compat.lua
tolua++-1.0.93.lua52/src/bin/lua/compat.lua
+--- tolua++-1.0.93/src/bin/lua/compat.lua 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/compat.lua 2014-10-01 16:30:26.173389906 +0200
+@@ -40,15 +40,13 @@
+ end
+ end
+
+-function dostring(s) return do_(loadstring(s)) end
++function dostring(s) return do_(load(s)) end
+ -- function dofile(s) return do_(loadfile(s)) end
+
+ -------------------------------------------------------------------
+ -- Table library
+ local tab = table
+-foreach = tab.foreach
+-foreachi = tab.foreachi
+-getn = tab.getn
++getn = function (tab) return #tab end
+ tinsert = tab.insert
+ tremove = tab.remove
+ sort = tab.sort
+@@ -78,7 +76,7 @@
+ frexp = math.frexp
+ ldexp = math.ldexp
+ log = math.log
+-log10 = math.log10
++log10 = function(val) return math.log(10, val) end
+ max = math.max
+ min = math.min
+ mod = math.mod
+@@ -177,17 +175,19 @@
+
+ function read (...)
+ local f = _INPUT
++ local arg = {...}
+ if rawtype(arg[1]) == 'userdata' then
+ f = tab.remove(arg, 1)
+ end
+- return f:read(unpack(arg))
++ return f:read(table.unpack(arg))
+ end
+
+ function write (...)
+ local f = _OUTPUT
++ local arg = {...}
+ if rawtype(arg[1]) == 'userdata' then
+ f = tab.remove(arg, 1)
+ end
+- return f:write(unpack(arg))
++ return f:write(table.unpack(arg))
+ end
+
+diff -urN tolua++-1.0.93/src/bin/lua/declaration.lua
tolua++-1.0.93.lua52/src/bin/lua/declaration.lua
+--- tolua++-1.0.93/src/bin/lua/declaration.lua 2008-07-18 07:27:24.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/lua/declaration.lua 2014-10-01 16:30:26.309385281 +0200
+@@ -137,7 +137,7 @@
+ if b then
+
+ m = split_c_tokens(string.sub(m, 2, -2), ",")
+- for i=1, table.getn(m) do
++ for i=1, #m do
+ m[i] = string.gsub(m[i],"%s*([%*&])", "%1")
+ if not isbasic(m[i]) then
+ if not isenum(m[i]) then _, m[i] = applytypedef("", m[i]) end
+@@ -522,7 +522,7 @@
+ end
+
+ -- check the form: mod type* name
+- local s1 = gsub(s,"(%b\[\])",function (n) return
gsub(n,'%*','\1') end)
++ local s1 = gsub(s,"(%b%[%])",function (n) return
gsub(n,'%*','\1') end)
+ t = split_c_tokens(s1,'%*')
+ if t.n == 2 then
+ t[2] = gsub(t[2],'\1','%*') -- restore * in dimension expression
+diff -urN tolua++-1.0.93/src/bin/lua/feature.lua
tolua++-1.0.93.lua52/src/bin/lua/feature.lua
+--- tolua++-1.0.93/src/bin/lua/feature.lua 2007-10-30 02:58:17.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/feature.lua 2014-10-01 16:30:26.362383479 +0200
+@@ -132,7 +132,7 @@
+ if not fname or fname == '' then
+ fname = self.name
+ end
+- n = string.gsub(n..'_'.. (fname), "[<>:, \.%*&]",
"_")
++ n = string.gsub(n..'_'.. (fname), "[<>:, \\.%*&]",
"_")
+
+ return n
+ end
+diff -urN tolua++-1.0.93/src/bin/lua/function.lua
tolua++-1.0.93.lua52/src/bin/lua/function.lua
+--- tolua++-1.0.93/src/bin/lua/function.lua 2008-11-11 19:14:49.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/function.lua 2014-10-01 16:30:26.415381678 +0200
+@@ -520,7 +520,7 @@
+ function join(t, sep, first, last)
+
+ first = first or 1
+- last = last or table.getn(t)
++ last = last or #t
+ local lsep = ""
+ local ret = ""
+ local loop = false
+diff -urN tolua++-1.0.93/src/bin/lua/package.lua
tolua++-1.0.93.lua52/src/bin/lua/package.lua
+--- tolua++-1.0.93/src/bin/lua/package.lua 2007-10-30 02:58:17.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/package.lua 2014-10-01 16:30:26.539377462 +0200
+@@ -39,7 +39,7 @@
+ self.code = gsub(self.code,"\n%s*%$%]","\2")
+ self.code = gsub(self.code,"(%b\1\2)", function (c)
+ tinsert(L,c)
+- return
"\n#["..getn(L).."]#"
++ return "\n#[".. #L
.."]#"
+ end)
+ -- avoid preprocessing embedded C code
+ local C = {}
+@@ -47,14 +47,14 @@
+ self.code = gsub(self.code,"\n%s*%$%>","\4")
+ self.code = gsub(self.code,"(%b\3\4)", function (c)
+ tinsert(C,c)
+- return
"\n#<"..getn(C)..">#"
++ return "\n#<".. #C
..">#"
+ end)
+ -- avoid preprocessing embedded C code
+ self.code = gsub(self.code,"\n%s*%$%{","\5") -- deal with embedded
C code
+ self.code = gsub(self.code,"\n%s*%$%}","\6")
+ self.code = gsub(self.code,"(%b\5\6)", function (c)
+ tinsert(C,c)
+- return
"\n#<"..getn(C)..">#"
++ return "\n#<"..
#C..">#"
+ end)
+
+ --self.code = gsub(self.code,"\n%s*#[^d][^\n]*\n", "\n\n") --
eliminate preprocessor directives that don't start with 'd'
+@@ -64,7 +64,7 @@
+ local V = {}
+ self.code = gsub(self.code,"\n(%s*%$[^%[%]][^\n]*)",function (v)
+ tinsert(V,v)
+- return
"\n#"..getn(V).."#"
++ return "\n#".. #V
.."#"
+ end)
+
+ -- perform global substitution
+@@ -152,14 +152,14 @@
+ if flags.t then
+ output("#ifndef Mtolua_typeid\n#define Mtolua_typeid(L,TI,T)\n#endif\n")
+ end
+- foreach(_usertype,function(n,v)
++ for n,v in pairs(_usertype) do
+ if (not _global_classes[v]) or _global_classes[v]:check_public_access() then
+ output(' tolua_usertype(tolua_S,"',v,'");')
+ if flags.t then
+ output(' Mtolua_typeid(tolua_S,typeid(',v,'),
"',v,'");')
+ end
+ end
+- end)
++ end
+ output('}')
+ output('\n')
+ end
+@@ -288,7 +288,7 @@
+ local t = {code=s}
+ extra = string.gsub(extra, "^%s*,%s*", "")
+ local pars = split_c_tokens(extra, ",")
+- include_file_hook(t, fn, unpack(pars))
++ include_file_hook(t, fn, table.unpack(pars))
+ return "\n\n" .. t.code
+ else
+ error('#Invalid include directive (use $cfile, $pfile, $lfile or $ifile)')
+@@ -322,7 +322,7 @@
+ table.insert(chunk, string.sub(line, 3) .. "\n")
+ else
+ local last = 1
+- for text, expr, index in string.gfind(line, "(.-)$(%b())()") do
++ for text, expr, index in string.gmatch(line, "(.-)$(%b())()") do
+ last = index
+ if text ~= "" then
+ table.insert(chunk, string.format('table.insert(__ret, %q )', text))
+@@ -334,10 +334,9 @@
+ end
+ end
+ table.insert(chunk, '\nreturn table.concat(__ret)\n')
+- local f,e = loadstring(table.concat(chunk))
++ local f,e = load(table.concat(chunk), nil, "t", _extra_parameters)
+ if e then
+ error("#"..e)
+ end
+- setfenv(f, _extra_parameters)
+ return f()
+ end
+diff -urN tolua++-1.0.93/src/bin/lua/template_class.lua
tolua++-1.0.93.lua52/src/bin/lua/template_class.lua
+--- tolua++-1.0.93/src/bin/lua/template_class.lua 2007-11-28 06:31:35.000000000 +0100
++++ tolua++-1.0.93.lua52/src/bin/lua/template_class.lua 2014-10-01 16:30:26.563376645
+0200
+@@ -22,7 +22,7 @@
+ for i =1 , types.n do
+
+ local Il = split_c_tokens(types[i], " ")
+- if table.getn(Il) ~= table.getn(self.args) then
++ if #Il ~= #self.args then
+ error("#invalid parameter count for "..types[i])
+ end
+ local bI = self.body
+@@ -31,16 +31,16 @@
+ --Tl[j] = findtype(Tl[j]) or Tl[j]
+ bI = string.gsub(bI, "([^_%w])"..self.args[j].."([^_%w])",
"%1"..Il[j].."%2")
+ if self.parents then
+- for i=1,table.getn(self.parents) do
++ for i=1,#self.parents do
+ pI[i] = string.gsub(self.parents[i],
"([^_%w]?)"..self.args[j].."([^_%w]?)",
"%1"..Il[j].."%2")
+ end
+ end
+ end
+ --local append = "<"..string.gsub(types[i], "%s+",
",")..">"
+- local append = "<"..concat(Il, 1, table.getn(Il),
",")..">"
++ local append = "<"..concat(Il, 1, #Il, ",")..">"
+ append = string.gsub(append, "%s*,%s*", ",")
+ append = string.gsub(append, ">>", "> >")
+- for i=1,table.getn(pI) do
++ for i=1,#pI do
+ --pI[i] = string.gsub(pI[i], ">>", "> >")
+ pI[i] = resolve_template_types(pI[i])
+ end
+diff -urN tolua++-1.0.93/src/bin/tolua.c tolua++-1.0.93.lua52/src/bin/tolua.c
+--- tolua++-1.0.93/src/bin/tolua.c 2006-07-29 04:45:56.000000000 +0200
++++ tolua++-1.0.93.lua52/src/bin/tolua.c 2014-09-30 18:42:00.823196281 +0200
+@@ -67,7 +67,11 @@
+ static void add_extra (lua_State* L, char* value) {
+ int len;
+ lua_getglobal(L, "_extra_parameters");
++#if LUA_VERSION_NUM > 501
++ len = lua_rawlen(L, -1);
++#else
+ len = luaL_getn(L, -1);
++#endif
+ lua_pushstring(L, value);
+ lua_rawseti(L, -2, len+1);
+ lua_pop(L, 1);
+diff -urN tolua++-1.0.93/src/lib/tolua_event.c
tolua++-1.0.93.lua52/src/lib/tolua_event.c
+--- tolua++-1.0.93/src/lib/tolua_event.c 2006-10-14 08:18:11.000000000 +0200
++++ tolua++-1.0.93.lua52/src/lib/tolua_event.c 2014-10-06 11:32:46.162013835 +0200
+@@ -23,12 +23,20 @@
+ static void storeatubox (lua_State* L, int lo)
+ {
+ #ifdef LUA_VERSION_NUM
++#if LUA_VERSION_NUM > 501
++ lua_getuservalue(L, lo);
++#else
+ lua_getfenv(L, lo);
++#endif
+ if (lua_rawequal(L, -1, TOLUA_NOPEER)) {
+ lua_pop(L, 1);
+ lua_newtable(L);
+ lua_pushvalue(L, -1);
++#if LUA_VERSION_NUM > 501
++ lua_setuservalue(L, lo); /* stack: k,v,table */
++#else
+ lua_setfenv(L, lo); /* stack: k,v,table */
++#endif
+ };
+ lua_insert(L, -3);
+ lua_settable(L, -3); /* on lua 5.1, we trade the "tolua_peers" lookup for a
settable call */
+@@ -141,7 +149,11 @@
+ {
+ /* Access alternative table */
+ #ifdef LUA_VERSION_NUM /* new macro on version 5.1 */
++#if LUA_VERSION_NUM > 501
++ lua_getuservalue(L, 1);
++#else
+ lua_getfenv(L,1);
++#endif
+ if (!lua_rawequal(L, -1, TOLUA_NOPEER)) {
+ lua_pushvalue(L, 2); /* key */
+ lua_gettable(L, -2); /* on lua 5.1, we trade the "tolua_peers" lookup for a
gettable call */
+@@ -420,6 +432,8 @@
+ */
+ TOLUA_API int class_gc_event (lua_State* L)
+ {
++ if (lua_type(L,1) == LUA_TUSERDATA)
++ {
+ void* u = *((void**)lua_touserdata(L,1));
+ int top;
+ /*fprintf(stderr, "collecting: looking at %p\n", u);*/
+@@ -427,7 +441,8 @@
+ lua_pushstring(L,"tolua_gc");
+ lua_rawget(L,LUA_REGISTRYINDEX);
+ */
+- lua_pushvalue(L, lua_upvalueindex(1));
++ lua_pushstring(L,"tolua_gc");
++ lua_rawget(L,LUA_REGISTRYINDEX); /* gc */
+ lua_pushlightuserdata(L,u);
+ lua_rawget(L,-2); /* stack: gc umt */
+ lua_getmetatable(L,1); /* stack: gc umt mt */
+@@ -456,6 +471,7 @@
+ lua_rawset(L,-5); /* stack: gc umt mt */
+ }
+ lua_pop(L,3);
++ }
+ return 0;
+ }
+
+diff -urN tolua++-1.0.93/src/lib/tolua_map.c tolua++-1.0.93.lua52/src/lib/tolua_map.c
+--- tolua++-1.0.93/src/lib/tolua_map.c 2009-02-14 04:06:32.000000000 +0100
++++ tolua++-1.0.93.lua52/src/lib/tolua_map.c 2014-09-30 18:42:00.836195826 +0200
+@@ -262,8 +262,12 @@
+
+ lua_pop(L, 1);
+ lua_pushvalue(L, TOLUA_NOPEER);
+- };
++ }
++#if LUA_VERSION_NUM > 501
++ lua_setuservalue(L, -2);
++#else
+ lua_setfenv(L, -2);
++#endif
+
+ return 0;
+ };
+@@ -271,7 +275,11 @@
+ static int tolua_bnd_getpeer(lua_State* L) {
+
+ /* stack: userdata */
++#if LUA_VERSION_NUM > 501
++ lua_getuservalue(L, -1);
++#else
+ lua_getfenv(L, -1);
++#endif
+ if (lua_rawequal(L, -1, TOLUA_NOPEER)) {
+ lua_pop(L, 1);
+ lua_pushnil(L);
+@@ -411,7 +419,11 @@
+ lua_rawget(L,-2);
+ }
+ else
++#if LUA_VERSION_NUM > 501
++ lua_pushglobaltable(L);
++#else
+ lua_pushvalue(L,LUA_GLOBALSINDEX);
++#endif
+ }
+
+ /* End module
+@@ -445,7 +457,11 @@
+ else
+ {
+ /* global table */
++#if LUA_VERSION_NUM > 501
++ lua_pushglobaltable(L);
++#else
+ lua_pushvalue(L,LUA_GLOBALSINDEX);
++#endif
+ }
+ if (hasvar)
+ {
+@@ -473,7 +489,11 @@
+ else
+ {
+ /* global table */
++#if LUA_VERSION_NUM > 501
++ lua_pushglobaltable(L);
++#else
+ lua_pushvalue(L,LUA_GLOBALSINDEX);
++#endif
+ }
+ if (hasvar)
+ {
+diff -urN tolua++-1.0.93/src/lib/tolua_push.c tolua++-1.0.93.lua52/src/lib/tolua_push.c
+--- tolua++-1.0.93/src/lib/tolua_push.c 2007-02-10 03:43:56.000000000 +0100
++++ tolua++-1.0.93.lua52/src/lib/tolua_push.c 2014-09-30 18:42:00.844195546 +0200
+@@ -79,7 +79,11 @@
+
+ #ifdef LUA_VERSION_NUM
+ lua_pushvalue(L, TOLUA_NOPEER);
++#if LUA_VERSION_NUM > 501
++ lua_setuservalue(L, -2);
++#else
+ lua_setfenv(L, -2);
++#endif
+ #endif
+ }
+ else
diff --git a/tolua++-1.0.93-no-buildin-bytecode.patch
b/tolua++-1.0.93-no-buildin-bytecode.patch
index 8540c0b..3556105 100644
--- a/tolua++-1.0.93-no-buildin-bytecode.patch
+++ b/tolua++-1.0.93-no-buildin-bytecode.patch
@@ -1,18 +1,21 @@
-diff -up tolua++-1.0.93/src/bin/SCsub~ tolua++-1.0.93/src/bin/SCsub
---- tolua++-1.0.93/src/bin/SCsub~ 2008-04-21 02:05:35.000000000 +0200
-+++ tolua++-1.0.93/src/bin/SCsub 2013-08-09 20:37:35.127992550 +0200
-@@ -7,6 +7,6 @@ src = [
+diff -urN tolua++-1.0.93/src/bin/SCsub tolua++-1.0.93.no-builtin/src/bin/SCsub
+--- tolua++-1.0.93/src/bin/SCsub 2008-04-21 02:05:35.000000000 +0200
++++ tolua++-1.0.93.no-builtin/src/bin/SCsub 2014-10-01 15:54:39.001158444 +0200
+@@ -5,8 +5,8 @@
+ ]
- toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
+
+-toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
++#toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
-env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src +
[toluabind], LIBS = ['$tolua_lib'] + env['LIBS'])
+env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src, LIBS =
['$tolua_lib'] + env['LIBS'])
env.bootstrap_target = env.Program('#/bin/'+env['TOLUAPP_BOOTSTRAP'],
src + ['toluabind_default.c', env.lib_target_static], LIBS = env['LIBS'])
-diff -up tolua++-1.0.93/src/bin/tolua.c~ tolua++-1.0.93/src/bin/tolua.c
---- tolua++-1.0.93/src/bin/tolua.c~ 2006-07-29 04:45:56.000000000 +0200
-+++ tolua++-1.0.93/src/bin/tolua.c 2013-08-09 20:39:26.899284407 +0200
-@@ -145,7 +145,7 @@ int main (int argc, char* argv[])
+diff -urN tolua++-1.0.93/src/bin/tolua.c tolua++-1.0.93.no-builtin/src/bin/tolua.c
+--- tolua++-1.0.93/src/bin/tolua.c 2006-07-29 04:45:56.000000000 +0200
++++ tolua++-1.0.93.no-builtin/src/bin/tolua.c 2014-10-01 16:06:09.791424704 +0200
+@@ -145,7 +145,7 @@
}
lua_pop(L,1);
}
@@ -21,7 +24,7 @@ diff -up tolua++-1.0.93/src/bin/tolua.c~ tolua++-1.0.93/src/bin/tolua.c
#ifndef TOLUA_SCRIPT_RUN
{
int tolua_tolua_open (lua_State* L);
-@@ -153,16 +153,15 @@ int main (int argc, char* argv[])
+@@ -153,16 +153,17 @@
}
#else
{
@@ -41,7 +44,9 @@ diff -up tolua++-1.0.93/src/bin/tolua.c~ tolua++-1.0.93/src/bin/tolua.c
+ return 1;
+ }
+ if (lua_pcall(L, 0,0,0) != 0) {
-+ fprintf(stderr, "lua_pcall failed\n");
++ const char *errmsg = lua_tostring(L, -1);
++ fprintf(stderr, "lua_pcall failed: %s\n", errmsg);
++ lua_pop(L, 1);
+ return 1;
+ }
}
diff --git a/tolua++.spec b/tolua++.spec
index d7a8665..f6d14d4 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -1,8 +1,8 @@
-%define solib tolua++-5.1
+%define solib tolua++-5.2
Name: tolua++
Version: 1.0.93
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -11,8 +11,9 @@ Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.93-lua51.patch
Patch1: tolua++-1.0.93-lua-include-path.patch
Patch2: tolua++-1.0.93-no-buildin-bytecode.patch
+Patch3: tolua++-1.0.93-lua52.patch
BuildRequires: scons
-BuildRequires: compat-lua-devel >= 5.1
+BuildRequires: lua-devel >= 5.2
%description
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
@@ -23,7 +24,7 @@ Lua. tolua++ includes new features oriented to C++.
Summary: Development files for tolua++
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: compat-lua-devel >= 5.1
+Requires: lua-devel >= 5.2
%description devel
Development files for tolua++
@@ -31,13 +32,14 @@ Development files for tolua++
%prep
%setup -q
-%patch0 -p1 -b .lua51
-%patch1 -p1
+#%patch0 -p1 -b .lua51
+%patch2 -p1 -b .no-builtin
+%patch3 -p1 -b .lua52
sed -i 's/\r//' doc/%{name}.html
%build
-scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua-5.1)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
+scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
# Relink the tolua++ binary, there are 2 reasons for this:
# -Link it without the soname which we add to LINKFLAGS to build a shared lib
# -On non x86_64 link it against the pre-generated toluabind rather then the
@@ -47,9 +49,9 @@ scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags
lua-5.1)" to
# using built-in lua byte-code, since the byte-code is somewhat platfrom
# dependent, see Patch2 for an attempt at this
%ifarch x86_64
-gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua-5.1 -ldl
-lm
+gcc -o bin/%{name} src/bin/tolua.o -Llib -l%{solib} -llua -ldl -lm
%else
-gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind_default.o -Llib -l%{solib} -llua-5.1
-ldl -lm
+gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind_default.o -Llib -l%{solib} -llua
-ldl -lm
%endif
@@ -62,8 +64,8 @@ install -m 755 lib/lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}
ln -s lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}/libtolua++.so
install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
# For use with Patch2 (not working yet)
-#mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
-#install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
+install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%post -p /sbin/ldconfig
@@ -73,6 +75,7 @@ install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
%files
%doc README doc/*
%{_libdir}/lib%{solib}.so
+%{_datadir}/%{name}
%files devel
commit 9cddb5bf5956e641483f4dcf8becc78e5ae60282
Author: Peter Robinson <pbrobinson(a)fedoraproject.org>
Date: Mon Aug 18 06:03:17 2014 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 8537742..d7a8665 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -82,6 +82,9 @@ install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
%changelog
+* Mon Aug 18 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-13
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
* Mon Jun 16 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-12
- Use the pre-generated toluabind.c everywhere but x86_64, something goes wrong
when re-generating it (bootstrap) elsewhere (rhbz#1094103)
commit 7f0cc30c8545c5fe61f96e9da30a1fd42e53fa7e
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Mon Jun 16 17:33:48 2014 +0200
Use the pre-generated toluabind.c everywhere but x86_64, something goes wrong
when re-generating it (bootstrap) elsewhere (rhbz#1094103)
diff --git a/tolua++.spec b/tolua++.spec
index 999b60e..8537742 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -40,21 +40,17 @@ sed -i 's/\r//' doc/%{name}.html
scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua-5.1)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
# Relink the tolua++ binary, there are 2 reasons for this:
# -Link it without the soname which we add to LINKFLAGS to build a shared lib
-# -On non x86 link it against the pre-generated toluabind rather then the
-# bootstapped one as something goes wrong with the bootstrap on both ARM
-# and ppc (rhbz#704372) causing a segfault for unknown reasons.
+# -On non x86_64 link it against the pre-generated toluabind rather then the
+# bootstapped one as something goes wrong with the bootstrap on ARM, x86_32
+# (rhbz#1094103) and ppc (rhbz#704372) causing a segfault for unknown reasons.
# It would be better to switch to using lua code directly, rather then
# using built-in lua byte-code, since the byte-code is somewhat platfrom
# dependent, see Patch2 for an attempt at this
-%ifarch %{ix86}
-gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua-5.1 -ldl
-lm
-%else
%ifarch x86_64
gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua-5.1 -ldl
-lm
%else
gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind_default.o -Llib -l%{solib} -llua-5.1
-ldl -lm
%endif
-%endif
%install
@@ -86,6 +82,10 @@ install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
%changelog
+* Mon Jun 16 2014 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-12
+- Use the pre-generated toluabind.c everywhere but x86_64, something goes wrong
+ when re-generating it (bootstrap) elsewhere (rhbz#1094103)
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-11
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
commit 5cbe7717c045691aa5851205ae5576fa692dd83c
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Sun Jun 8 03:43:57 2014 -0500
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 68214d0..999b60e 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -86,6 +86,9 @@ install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
%changelog
+* Sun Jun 08 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-11
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-10
- Use the pre-generated toluabind.c on non x86, as something goes wrong
when re-generating it (bootstrap) on non x86. This fixes tolua++
commit 8d28c88063a4e5f62f7d1d20316e81872c6e1a1e
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri Aug 9 23:43:21 2013 +0200
Use the pre-generated toluabind.c on non x86, as something goes wrong
when re-generating it (bootstrap) on non x86. This fixes tolua++
segfaulting on arm, and hopefully also on ppc (rhbz#704372)
diff --git a/tolua++-1.0.93-no-buildin-bytecode.patch
b/tolua++-1.0.93-no-buildin-bytecode.patch
new file mode 100644
index 0000000..8540c0b
--- /dev/null
+++ b/tolua++-1.0.93-no-buildin-bytecode.patch
@@ -0,0 +1,49 @@
+diff -up tolua++-1.0.93/src/bin/SCsub~ tolua++-1.0.93/src/bin/SCsub
+--- tolua++-1.0.93/src/bin/SCsub~ 2008-04-21 02:05:35.000000000 +0200
++++ tolua++-1.0.93/src/bin/SCsub 2013-08-09 20:37:35.127992550 +0200
+@@ -7,6 +7,6 @@ src = [
+
+ toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg',
'tolua', bootstrap = True)
+
+-env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src +
[toluabind], LIBS = ['$tolua_lib'] + env['LIBS'])
++env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src, LIBS =
['$tolua_lib'] + env['LIBS'])
+
+ env.bootstrap_target = env.Program('#/bin/'+env['TOLUAPP_BOOTSTRAP'],
src + ['toluabind_default.c', env.lib_target_static], LIBS = env['LIBS'])
+diff -up tolua++-1.0.93/src/bin/tolua.c~ tolua++-1.0.93/src/bin/tolua.c
+--- tolua++-1.0.93/src/bin/tolua.c~ 2006-07-29 04:45:56.000000000 +0200
++++ tolua++-1.0.93/src/bin/tolua.c 2013-08-09 20:39:26.899284407 +0200
+@@ -145,7 +145,7 @@ int main (int argc, char* argv[])
+ }
+ lua_pop(L,1);
+ }
+-/* #define TOLUA_SCRIPT_RUN */
++#define TOLUA_SCRIPT_RUN
+ #ifndef TOLUA_SCRIPT_RUN
+ {
+ int tolua_tolua_open (lua_State* L);
+@@ -153,16 +153,15 @@ int main (int argc, char* argv[])
+ }
+ #else
+ {
+- char* p;
+- char path[BUFSIZ];
+- strcpy(path,argv[0]);
+- p = strrchr(path,'/');
+- if (p==NULL) p = strrchr(path,'\\');
+- p = (p==NULL) ? path : p+1;
+- sprintf(p,"%s","../src/bin/lua/");
+- lua_pushstring(L,path); lua_setglobal(L,"path");
+- strcat(path,"all.lua");
+- lua_dofile(L,path);
++ lua_pushstring(L, "/usr/share/tolua++/");
lua_setglobal(L,"path");
++ if (luaL_loadfile(L, "/usr/share/tolua++/all.lua") != 0) {
++ fprintf(stderr, "luaL_loadfile failed\n");
++ return 1;
++ }
++ if (lua_pcall(L, 0,0,0) != 0) {
++ fprintf(stderr, "lua_pcall failed\n");
++ return 1;
++ }
+ }
+ #endif
+ return 0;
diff --git a/tolua++.spec b/tolua++.spec
index 5ad0659..68214d0 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -10,6 +10,7 @@ URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.93-lua51.patch
Patch1: tolua++-1.0.93-lua-include-path.patch
+Patch2: tolua++-1.0.93-no-buildin-bytecode.patch
BuildRequires: scons
BuildRequires: compat-lua-devel >= 5.1
@@ -37,19 +38,36 @@ sed -i 's/\r//' doc/%{name}.html
%build
scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua-5.1)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
-#Recompile the exe without the soname. An ugly hack.
+# Relink the tolua++ binary, there are 2 reasons for this:
+# -Link it without the soname which we add to LINKFLAGS to build a shared lib
+# -On non x86 link it against the pre-generated toluabind rather then the
+# bootstapped one as something goes wrong with the bootstrap on both ARM
+# and ppc (rhbz#704372) causing a segfault for unknown reasons.
+# It would be better to switch to using lua code directly, rather then
+# using built-in lua byte-code, since the byte-code is somewhat platfrom
+# dependent, see Patch2 for an attempt at this
+%ifarch %{ix86}
gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua-5.1 -ldl
-lm
+%else
+%ifarch x86_64
+gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua-5.1 -ldl
-lm
+%else
+gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind_default.o -Llib -l%{solib} -llua-5.1
-ldl -lm
+%endif
+%endif
%install
-mkdir -p %{buildroot}%{_bindir}
-mkdir %{buildroot}%{_libdir}
-mkdir %{buildroot}%{_includedir}
-install -m0755 bin/%{name} %{buildroot}%{_bindir}
-install -m0755 lib/lib%{solib}.so %{buildroot}%{_libdir}
-install -m0644 include/%{name}.h %{buildroot}%{_includedir}
-cd %{buildroot}%{_libdir}
-ln -s lib%{solib}.so libtolua++.so
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+mkdir -p $RPM_BUILD_ROOT%{_includedir}
+install -m 755 bin/%{name} $RPM_BUILD_ROOT%{_bindir}
+install -m 755 lib/lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}
+ln -s lib%{solib}.so $RPM_BUILD_ROOT%{_libdir}/libtolua++.so
+install -p -m 644 include/%{name}.h $RPM_BUILD_ROOT%{_includedir}
+# For use with Patch2 (not working yet)
+#mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
+#install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%post -p /sbin/ldconfig
@@ -68,6 +86,11 @@ ln -s lib%{solib}.so libtolua++.so
%changelog
+* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-10
+- Use the pre-generated toluabind.c on non x86, as something goes wrong
+ when re-generating it (bootstrap) on non x86. This fixes tolua++
+ segfaulting on arm, and hopefully also on ppc (rhbz#704372)
+
* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-9
- Honor the compiler include path when opening lua.h
commit ecad2b327b7bffccd8cba65d18b81902d9b9751c
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Fri Aug 9 12:54:06 2013 +0200
Honor the compiler include path when opening lua.h
diff --git a/tolua++-1.0.93-lua-include-path.patch
b/tolua++-1.0.93-lua-include-path.patch
new file mode 100644
index 0000000..0107d93
--- /dev/null
+++ b/tolua++-1.0.93-lua-include-path.patch
@@ -0,0 +1,14 @@
+diff -up tolua++-1.0.93/include/tolua++.h~ tolua++-1.0.93/include/tolua++.h
+--- tolua++-1.0.93/include/tolua++.h~ 2008-05-02 21:20:37.000000000 +0200
++++ tolua++-1.0.93/include/tolua++.h 2013-08-09 12:52:16.229145059 +0200
+@@ -43,8 +43,8 @@ extern "C" {
+
+ typedef int lua_Object;
+
+-#include "lua.h"
+-#include "lauxlib.h"
++#include <lua.h>
++#include <lauxlib.h>
+
+ struct tolua_Error
+ {
diff --git a/tolua++.spec b/tolua++.spec
index 51fa3a5..5ad0659 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,13 +2,14 @@
Name: tolua++
Version: 1.0.93
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.93-lua51.patch
+Patch1: tolua++-1.0.93-lua-include-path.patch
BuildRequires: scons
BuildRequires: compat-lua-devel >= 5.1
@@ -30,6 +31,7 @@ Development files for tolua++
%prep
%setup -q
%patch0 -p1 -b .lua51
+%patch1 -p1
sed -i 's/\r//' doc/%{name}.html
@@ -66,6 +68,9 @@ ln -s lib%{solib}.so libtolua++.so
%changelog
+* Fri Aug 09 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-9
+- Honor the compiler include path when opening lua.h
+
* Sun Aug 04 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-8
- Switch over to compat-lua-5.1
commit df6fe3aea7bb83078288dede4d6b3188166143e2
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Sat Aug 3 14:30:08 2013 +0200
Switch over to compat-lua-5.1
diff --git a/tolua++-1.0.93-lua51.patch b/tolua++-1.0.93-lua51.patch
index fb7574d..2c41ea4 100644
--- a/tolua++-1.0.93-lua51.patch
+++ b/tolua++-1.0.93-lua51.patch
@@ -1,29 +1,29 @@
-diff -urN tolua++-1.0.93/config_linux.py tolua++-1.0.93.lua51/config_linux.py
---- tolua++-1.0.93/config_linux.py 2005-11-30 23:31:27.000000000 +0100
-+++ tolua++-1.0.93.lua51/config_linux.py 2010-02-25 14:35:06.000000000 +0100
+diff -up tolua++-1.0.93/config_linux.py.lua51 tolua++-1.0.93/config_linux.py
+--- tolua++-1.0.93/config_linux.py.lua51 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93/config_linux.py 2013-08-03 12:26:16.260951919 +0200
@@ -4,7 +4,7 @@
# Compiler flags (based on Debian's installation of lua)
#LINKFLAGS = ['-g']
-CCFLAGS = ['-I/usr/include/lua50', '-O2', '-ansi',
'-Wall']
-+CCFLAGS = ['-O2', '-ansi', '-Wall']
++CCFLAGS = ['-I/usr/include/lua51', '-O2', '-ansi',
'-Wall']
#CCFLAGS = ['-I/usr/include/lua50', '-g']
# this is the default directory for installation. Files will be installed on
-@@ -18,5 +18,5 @@
+@@ -18,5 +18,5 @@ CCFLAGS = ['-I/usr/include/lua50', '-O2'
prefix = '/usr/local'
# libraries (based on Debian's installation of lua)
-LIBS = ['lua50', 'lualib50', 'dl', 'm']
-+LIBS = ['lua', 'dl', 'm']
++LIBS = ['lua-5.1', 'dl', 'm']
-diff -urN tolua++-1.0.93/custom.py tolua++-1.0.93.lua51/custom.py
---- tolua++-1.0.93/custom.py 1970-01-01 01:00:00.000000000 +0100
-+++ tolua++-1.0.93.lua51/custom.py 2010-02-25 14:44:50.000000000 +0100
+diff -up tolua++-1.0.93/custom.py.lua51 tolua++-1.0.93/custom.py
+--- tolua++-1.0.93/custom.py.lua51 2013-08-03 12:23:41.400953222 +0200
++++ tolua++-1.0.93/custom.py 2013-08-03 12:23:41.400953222 +0200
@@ -0,0 +1,9 @@
+CCFLAGS = ['-O2', '-ansi']
+#LIBPATH = ['/usr/local/lib']
-+LIBS = ['lua', 'dl', 'm']
++LIBS = ['lua-5.1', 'dl', 'm']
+prefix = '/usr'
+build_dev=1
+tolua_bin = 'tolua++'
diff --git a/tolua++.spec b/tolua++.spec
index 6804d5a..51fa3a5 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,28 +2,26 @@
Name: tolua++
Version: 1.0.93
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.93-lua51.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: scons
-BuildRequires: lua-devel >= 5.1
-ExcludeArch: ppc
+BuildRequires: compat-lua-devel >= 5.1
%description
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
-Lua. tolua++ includes new features oriented to C++
+Lua. tolua++ includes new features oriented to C++.
%package devel
Summary: Development files for tolua++
Group: Development/Libraries
-Requires: tolua++ = %{version}-%{release}
-Requires: lua-devel >= 5.1
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: compat-lua-devel >= 5.1
%description devel
Development files for tolua++
@@ -36,13 +34,12 @@ sed -i 's/\r//' doc/%{name}.html
%build
-scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
+scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} $(pkg-config --cflags lua-5.1)"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
#Recompile the exe without the soname. An ugly hack.
-gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua -ldl -lm
+gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua-5.1 -ldl
-lm
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
mkdir %{buildroot}%{_libdir}
mkdir %{buildroot}%{_includedir}
@@ -53,28 +50,25 @@ cd %{buildroot}%{_libdir}
ln -s lib%{solib}.so libtolua++.so
-%clean
-rm -rf %{buildroot}
-
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
-%{_libdir}/lib%{solib}.so
%doc README doc/*
+%{_libdir}/lib%{solib}.so
%files devel
-%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_libdir}/libtolua++.so
%{_includedir}/%{name}.h
%changelog
+* Sun Aug 04 2013 Hans de Goede <hdegoede(a)redhat.com> - 1.0.93-8
+- Switch over to compat-lua-5.1
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-7
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
commit 386da3e09631dcb4f83fc1ba2aad0891128edb46
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Sat Aug 3 23:16:53 2013 -0500
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 9d1f044..6804d5a 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -75,6 +75,9 @@ rm -rf %{buildroot}
%changelog
+* Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-7
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-6
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
commit 200aaab77bb5de3684da111b8d5e56395b7cc3c4
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Thu Feb 14 19:47:31 2013 -0600
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 6a0c757..9d1f044 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -75,6 +75,9 @@ rm -rf %{buildroot}
%changelog
+* Fri Feb 15 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
commit 83884b63e3cd138d37d88aee42bd477aec5b269f
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Sat Jul 21 18:43:38 2012 -0500
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 273e7e4..6a0c757 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -75,6 +75,9 @@ rm -rf %{buildroot}
%changelog
+* Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
commit 27a6d1d73dc20f8dec81fb9ba82e2f3ca69c3c90
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Sat Jan 14 00:51:21 2012 -0600
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 9ad7f67..273e7e4 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -75,6 +75,9 @@ rm -rf %{buildroot}
%changelog
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
* Wed Oct 12 2011 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-3
- Exclude ppc, there are problems according to bz #704372
commit f850051213892e17fee70c3916573e22b2ce7bed
Author: Tim Niemueller <niemueller(a)kbsg.rwth-aachen.de>
Date: Wed Oct 12 00:17:02 2011 +0200
Exclude ppc, causes problems according to bz #704372
diff --git a/tolua++.spec b/tolua++.spec
index 60fd0b8..9ad7f67 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -12,6 +12,7 @@ Patch0: tolua++-1.0.93-lua51.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: scons
BuildRequires: lua-devel >= 5.1
+ExcludeArch: ppc
%description
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
@@ -74,6 +75,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Oct 12 2011 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-3
+- Exclude ppc, there are problems according to bz #704372
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
commit 0fbb64d54fb677593344d0fdddad3b2101a8df64
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Wed Feb 9 13:53:57 2011 -0600
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index f37771d..60fd0b8 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.93
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: MIT
@@ -74,6 +74,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.93-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
* Thu Feb 25 2010 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-1
- Upgrade to 1.0.93
commit 3c011744edbb9e7211b149661ac1ea980ba31b46
Author: Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org>
Date: Thu Jul 29 14:18:44 2010 +0000
dist-git conversion
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 2c3ec59..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-tolua++-1.0.93.tar.bz2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2c3ec59
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+tolua++-1.0.93.tar.bz2
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 5324a18..0000000
--- a/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Makefile for source rpm: tolua++
-# $Id$
-NAME := tolua++
-SPECFILE = $(firstword $(wildcard *.spec))
-
-define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f
$$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo
"$$d/Makefile.common" ; break ; fi ; done
-endef
-
-MAKEFILE_COMMON := $(shell $(find-makefile-common))
-
-ifeq ($(MAKEFILE_COMMON),)
-# attept a checkout
-define checkout-makefile-common
-test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo
"common/Makefile.common" ; } || { echo "ERROR: I can't figure out how
to checkout the 'common' module." ; exit -1 ; } >&2
-endef
-
-MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
-endif
-
-include $(MAKEFILE_COMMON)
commit 1f56423b56904d93c6c62b9fe787a6bbd56f9174
Author: Tim Niemueller <timn(a)fedoraproject.org>
Date: Sat Feb 27 21:42:29 2010 +0000
Upgrade to latest stable release 1.0.93
diff --git a/.cvsignore b/.cvsignore
index 38c43c2..2c3ec59 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-tolua++-1.0.92.tar.bz2
+tolua++-1.0.93.tar.bz2
diff --git a/sources b/sources
index d39898f..8e91745 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f4682e065b7d6d4de5eec13e6b7d347c tolua++-1.0.92.tar.bz2
+100aa6907b8108582080b37d79c0afd7 tolua++-1.0.93.tar.bz2
diff --git a/tolua++-1.0.92-gcc43.patch b/tolua++-1.0.92-gcc43.patch
deleted file mode 100644
index 1727469..0000000
--- a/tolua++-1.0.92-gcc43.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-diff -urN tolua++-1.0.92/include/tolua++.h tolua++-1.0.92.gcc43/include/tolua++.h
---- tolua++-1.0.92/include/tolua++.h 2006-04-27 05:33:40.000000000 +0200
-+++ tolua++-1.0.92.gcc43/include/tolua++.h 2008-03-13 23:20:12.000000000 +0100
-@@ -53,7 +53,7 @@
- #define TOLUA_NOPEER LUA_REGISTRYINDEX /* for lua 5.1 */
-
- TOLUA_API const char* tolua_typename (lua_State* L, int lo);
--TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err);
-+TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err);
- TOLUA_API int tolua_isnoobj (lua_State* L, int lo, tolua_Error* err);
- TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err);
- TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err);
-@@ -84,16 +84,15 @@
- TOLUA_API int tolua_register_gc (lua_State* L, int lo);
- TOLUA_API int tolua_default_collect (lua_State* tolua_S);
-
--TOLUA_API void tolua_usertype (lua_State* L, char* type);
--TOLUA_API void tolua_beginmodule (lua_State* L, char* name);
-+TOLUA_API void tolua_usertype (lua_State* L, const char* type);
-+TOLUA_API void tolua_beginmodule (lua_State* L, const char* name);
- TOLUA_API void tolua_endmodule (lua_State* L);
--TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar);
--TOLUA_API void tolua_class (lua_State* L, char* name, char* base);
--TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base,
lua_CFunction col);
--TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func);
--TOLUA_API void tolua_constant (lua_State* L, char* name, double value);
--TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get,
lua_CFunction set);
--TOLUA_API void tolua_array (lua_State* L,char* name, lua_CFunction get, lua_CFunction
set);
-+TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar);
-+TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const
char* base, lua_CFunction col);
-+TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func);
-+TOLUA_API void tolua_constant (lua_State* L, const char* name, double value);
-+TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set);
-+TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set);
-
- /* TOLUA_API void tolua_set_call_event(lua_State* L, lua_CFunction func, char* type);
*/
- /* TOLUA_API void tolua_addbase(lua_State* L, char* name, char* base); */
-diff -urN tolua++-1.0.92/src/lib/tolua_is.c tolua++-1.0.92.gcc43/src/lib/tolua_is.c
---- tolua++-1.0.92/src/lib/tolua_is.c 2005-12-19 02:13:05.000000000 +0100
-+++ tolua++-1.0.92.gcc43/src/lib/tolua_is.c 2008-03-13 23:11:27.000000000 +0100
-@@ -85,7 +85,7 @@
- return lua_tostring(L,-1);
- }
-
--TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err)
-+TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err)
- {
- if (msg[0] == '#')
- {
-diff -urN tolua++-1.0.92/src/lib/tolua_map.c tolua++-1.0.92.gcc43/src/lib/tolua_map.c
---- tolua++-1.0.92/src/lib/tolua_map.c 2006-03-13 23:37:49.000000000 +0100
-+++ tolua++-1.0.92.gcc43/src/lib/tolua_map.c 2008-03-13 23:21:58.000000000 +0100
-@@ -389,7 +389,7 @@
- * It creates the correspoding metatable in the registry, for both 'type' and
'const type'.
- * It maps 'const type' as being also a 'type'
- */
--TOLUA_API void tolua_usertype (lua_State* L, char* type)
-+TOLUA_API void tolua_usertype (lua_State* L, const char* type)
- {
- char ctype[128] = "const ";
- strncat(ctype,type,120);
-@@ -403,7 +403,7 @@
- /* Begin module
- * It pushes the module (or class) table on the stack
- */
--TOLUA_API void tolua_beginmodule (lua_State* L, char* name)
-+TOLUA_API void tolua_beginmodule (lua_State* L, const char* name)
- {
- if (name)
- {
-@@ -426,7 +426,7 @@
- * It creates a new module
- */
- #if 1
--TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar)
-+TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar)
- {
- if (name)
- {
-@@ -462,7 +462,7 @@
- lua_pop(L,1); /* pop module */
- }
- #else
--TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar)
-+TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar)
- {
- if (name)
- {
-@@ -518,7 +518,7 @@
- /* Map C class
- * It maps a C class, setting the appropriate inheritance and super classes.
- */
--TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base,
lua_CFunction col)
-+TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const
char* base, lua_CFunction col)
- {
- char cname[128] = "const ";
- char cbase[128] = "const ";
-@@ -577,7 +577,7 @@
- /* Map function
- * It assigns a function into the current module (or class)
- */
--TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func)
-+TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func)
- {
- lua_pushstring(L,name);
- lua_pushcfunction(L,func);
-@@ -600,7 +600,7 @@
- /* Map constant number
- * It assigns a constant number into the current module (or class)
- */
--TOLUA_API void tolua_constant (lua_State* L, char* name, double value)
-+TOLUA_API void tolua_constant (lua_State* L, const char* name, double value)
- {
- lua_pushstring(L,name);
- tolua_pushnumber(L,value);
-@@ -611,7 +611,7 @@
- /* Map variable
- * It assigns a variable into the current module (or class)
- */
--TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get,
lua_CFunction set)
-+TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set)
- {
- /* get func */
- lua_pushstring(L,".get");
-@@ -663,7 +663,7 @@
- /* Map an array
- * It assigns an array into the current module (or class)
- */
--TOLUA_API void tolua_array (lua_State* L, char* name, lua_CFunction get, lua_CFunction
set)
-+TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set)
- {
- lua_pushstring(L,".get");
- lua_rawget(L,-2);
diff --git a/tolua++-1.0.92-makeso.patch b/tolua++-1.0.92-makeso.patch
deleted file mode 100644
index 4265d9e..0000000
--- a/tolua++-1.0.92-makeso.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- tolua++-1.0.92/SConstruct.orig 2006-04-10 10:45:44.000000000 +0100
-+++ tolua++-1.0.92/SConstruct 2006-06-02 15:12:34.000000000 +0100
-@@ -22,7 +22,7 @@
- opts.Add('LIBPATH', 'library path', [])
-
- opts.Add('tolua_bin', 'the resulting binary', 'tolua++')
--opts.Add('tolua_lib', 'the resulting library', 'tolua++')
-+opts.Add('tolua_lib', 'the resulting library', 'tolua++-5.1')
- opts.Add('TOLUAPP', 'the name of the tolua++ binary (to use with
built_dev=1)', 'tolua++')
-
- opts.Add('prefix', 'The installation prefix')
---- tolua++-1.0.92/config_linux.py.orig 2005-04-30 03:20:38.000000000 +0100
-+++ tolua++-1.0.92/config_linux.py 2006-06-02 15:09:03.000000000 +0100
-@@ -15,8 +15,8 @@
- #
- # You can see more 'generic' options for POSIX systems on config_posix.py
-
--prefix = '/usr/local'
-+prefix = '/usr'
-
- # libraries (based on Debian's installation of lua)
--LIBS = ['lua50', 'lualib50', 'dl', 'm']
-+LIBS = ['lua', 'dl', 'm']
-
---- tolua++-1.0.92/custom-5.1.py.orig 2006-02-13 23:57:26.000000000 +0000
-+++ tolua++-1.0.92/custom-5.1.py 2006-06-02 15:10:08.000000000 +0100
-@@ -1,11 +1,11 @@
- CC = 'gcc'
- CCFLAGS = ['-I/usr/include/lua5.1', '-O2', '-ansi']
- #LIBPATH = ['/usr/local/lib']
--LIBS = ['lua5.1', 'dl', 'm']
--prefix = '/usr/local'
-+LIBS = ['lua', 'dl', 'm']
-+prefix = '/usr'
- build_dev = 1
--ENV = {'PATH': '/usr/local/bin:/bin:/usr/bin'}
--tolua_bin = 'tolua++5.1'
--tolua_lib = 'tolua++5.1'
-+ENV = {'PATH': '/bin:/usr/bin:/usr/local/bin'}
-+tolua_bin = 'tolua++'
-+tolua_lib = 'tolua++-5.1'
- TOLUAPP = 'tolua++5.1'
-
---- tolua++-1.0.92/src/lib/SCsub.orig 2005-11-28 13:51:15.000000000 +0000
-+++ tolua++-1.0.92/src/lib/SCsub 2006-06-02 15:11:17.000000000 +0100
-@@ -9,5 +9,4 @@
- 'tolua_to.c',
- ]
-
--env.lib_target = env.Library('#/lib/'+env['tolua_lib'], sources)
--
-+env.lib_target = env.SharedLibrary('#/lib/'+env['tolua_lib'], sources)
diff --git a/tolua++-1.0.93-lua51.patch b/tolua++-1.0.93-lua51.patch
new file mode 100644
index 0000000..fb7574d
--- /dev/null
+++ b/tolua++-1.0.93-lua51.patch
@@ -0,0 +1,32 @@
+diff -urN tolua++-1.0.93/config_linux.py tolua++-1.0.93.lua51/config_linux.py
+--- tolua++-1.0.93/config_linux.py 2005-11-30 23:31:27.000000000 +0100
++++ tolua++-1.0.93.lua51/config_linux.py 2010-02-25 14:35:06.000000000 +0100
+@@ -4,7 +4,7 @@
+
+ # Compiler flags (based on Debian's installation of lua)
+ #LINKFLAGS = ['-g']
+-CCFLAGS = ['-I/usr/include/lua50', '-O2', '-ansi',
'-Wall']
++CCFLAGS = ['-O2', '-ansi', '-Wall']
+ #CCFLAGS = ['-I/usr/include/lua50', '-g']
+
+ # this is the default directory for installation. Files will be installed on
+@@ -18,5 +18,5 @@
+ prefix = '/usr/local'
+
+ # libraries (based on Debian's installation of lua)
+-LIBS = ['lua50', 'lualib50', 'dl', 'm']
++LIBS = ['lua', 'dl', 'm']
+
+diff -urN tolua++-1.0.93/custom.py tolua++-1.0.93.lua51/custom.py
+--- tolua++-1.0.93/custom.py 1970-01-01 01:00:00.000000000 +0100
++++ tolua++-1.0.93.lua51/custom.py 2010-02-25 14:44:50.000000000 +0100
+@@ -0,0 +1,9 @@
++CCFLAGS = ['-O2', '-ansi']
++#LIBPATH = ['/usr/local/lib']
++LIBS = ['lua', 'dl', 'm']
++prefix = '/usr'
++build_dev=1
++tolua_bin = 'tolua++'
++tolua_lib = 'tolua++-5.1'
++TOLUAPP = 'tolua++-5.1'
++
diff --git a/tolua++.spec b/tolua++.spec
index 5110995..f37771d 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -1,15 +1,14 @@
%define solib tolua++-5.1
Name: tolua++
-Version: 1.0.92
-Release: 9%{?dist}
+Version: 1.0.93
+Release: 1%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
-License: Freely redistributable without restriction
+License: MIT
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
-Patch0: tolua++-1.0.92-makeso.patch
-Patch1: tolua++-1.0.92-gcc43.patch
+Patch0: tolua++-1.0.93-lua51.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: scons
BuildRequires: lua-devel >= 5.1
@@ -31,13 +30,12 @@ Development files for tolua++
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
+%patch0 -p1 -b .lua51
sed -i 's/\r//' doc/%{name}.html
%build
-scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so"
+scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so" shared=1
#Recompile the exe without the soname. An ugly hack.
gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua -ldl -lm
@@ -76,6 +74,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Feb 25 2010 Tim Niemueller <tim(a)niemueller.de> - 1.0.93-1
+- Upgrade to 1.0.93
+
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-9
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
commit 6a080acfc59f61ad766d93f89c2ae834fab54468
Author: Bill Nottingham <notting(a)fedoraproject.org>
Date: Wed Nov 25 22:52:24 2009 +0000
Fix typo that causes a failure to update the common directory. (releng
#2781)
diff --git a/Makefile b/Makefile
index 3394072..5324a18 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ NAME := tolua++
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f
$$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo
"$$d/Makefile.common" ; break ; fi ; done
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f
$$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo
"$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
commit ea5833d9523f50f3be3d73740b321ea4fa5beef9
Author: Jesse Keating <jkeating(a)fedoraproject.org>
Date: Mon Jul 27 06:04:39 2009 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 0eaecfb..5110995 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.92
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: Freely redistributable without restriction
@@ -76,6 +76,9 @@ rm -rf %{buildroot}
%changelog
+* Sun Jul 26 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-9
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-8
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
commit 590f0f7f4a670525ac9cc55a0ae6eabadfe5700f
Author: Jesse Keating <jkeating(a)fedoraproject.org>
Date: Wed Feb 25 21:12:39 2009 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
diff --git a/tolua++.spec b/tolua++.spec
index 9b427fe..0eaecfb 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.92
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: Freely redistributable without restriction
@@ -76,6 +76,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.0.92-8
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
* Thu Mar 13 2008 Tim Niemueller <tim(a)niemueller.de> - 1.0.92-7
- Added patch to make tolua++ compatible with GCC 4.3
commit 7ac89ae6dd3a3e836569dae55e89548317a9386e
Author: Tim Niemueller <timn(a)fedoraproject.org>
Date: Fri Mar 14 10:29:52 2008 +0000
Added patch to make tolua++ compatible with GCC 4.3
diff --git a/tolua++-1.0.92-gcc43.patch b/tolua++-1.0.92-gcc43.patch
new file mode 100644
index 0000000..1727469
--- /dev/null
+++ b/tolua++-1.0.92-gcc43.patch
@@ -0,0 +1,133 @@
+diff -urN tolua++-1.0.92/include/tolua++.h tolua++-1.0.92.gcc43/include/tolua++.h
+--- tolua++-1.0.92/include/tolua++.h 2006-04-27 05:33:40.000000000 +0200
++++ tolua++-1.0.92.gcc43/include/tolua++.h 2008-03-13 23:20:12.000000000 +0100
+@@ -53,7 +53,7 @@
+ #define TOLUA_NOPEER LUA_REGISTRYINDEX /* for lua 5.1 */
+
+ TOLUA_API const char* tolua_typename (lua_State* L, int lo);
+-TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err);
++TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err);
+ TOLUA_API int tolua_isnoobj (lua_State* L, int lo, tolua_Error* err);
+ TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err);
+ TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err);
+@@ -84,16 +84,15 @@
+ TOLUA_API int tolua_register_gc (lua_State* L, int lo);
+ TOLUA_API int tolua_default_collect (lua_State* tolua_S);
+
+-TOLUA_API void tolua_usertype (lua_State* L, char* type);
+-TOLUA_API void tolua_beginmodule (lua_State* L, char* name);
++TOLUA_API void tolua_usertype (lua_State* L, const char* type);
++TOLUA_API void tolua_beginmodule (lua_State* L, const char* name);
+ TOLUA_API void tolua_endmodule (lua_State* L);
+-TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar);
+-TOLUA_API void tolua_class (lua_State* L, char* name, char* base);
+-TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base,
lua_CFunction col);
+-TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func);
+-TOLUA_API void tolua_constant (lua_State* L, char* name, double value);
+-TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get,
lua_CFunction set);
+-TOLUA_API void tolua_array (lua_State* L,char* name, lua_CFunction get, lua_CFunction
set);
++TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar);
++TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const
char* base, lua_CFunction col);
++TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func);
++TOLUA_API void tolua_constant (lua_State* L, const char* name, double value);
++TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set);
++TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set);
+
+ /* TOLUA_API void tolua_set_call_event(lua_State* L, lua_CFunction func, char* type);
*/
+ /* TOLUA_API void tolua_addbase(lua_State* L, char* name, char* base); */
+diff -urN tolua++-1.0.92/src/lib/tolua_is.c tolua++-1.0.92.gcc43/src/lib/tolua_is.c
+--- tolua++-1.0.92/src/lib/tolua_is.c 2005-12-19 02:13:05.000000000 +0100
++++ tolua++-1.0.92.gcc43/src/lib/tolua_is.c 2008-03-13 23:11:27.000000000 +0100
+@@ -85,7 +85,7 @@
+ return lua_tostring(L,-1);
+ }
+
+-TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err)
++TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err)
+ {
+ if (msg[0] == '#')
+ {
+diff -urN tolua++-1.0.92/src/lib/tolua_map.c tolua++-1.0.92.gcc43/src/lib/tolua_map.c
+--- tolua++-1.0.92/src/lib/tolua_map.c 2006-03-13 23:37:49.000000000 +0100
++++ tolua++-1.0.92.gcc43/src/lib/tolua_map.c 2008-03-13 23:21:58.000000000 +0100
+@@ -389,7 +389,7 @@
+ * It creates the correspoding metatable in the registry, for both 'type' and
'const type'.
+ * It maps 'const type' as being also a 'type'
+ */
+-TOLUA_API void tolua_usertype (lua_State* L, char* type)
++TOLUA_API void tolua_usertype (lua_State* L, const char* type)
+ {
+ char ctype[128] = "const ";
+ strncat(ctype,type,120);
+@@ -403,7 +403,7 @@
+ /* Begin module
+ * It pushes the module (or class) table on the stack
+ */
+-TOLUA_API void tolua_beginmodule (lua_State* L, char* name)
++TOLUA_API void tolua_beginmodule (lua_State* L, const char* name)
+ {
+ if (name)
+ {
+@@ -426,7 +426,7 @@
+ * It creates a new module
+ */
+ #if 1
+-TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar)
++TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar)
+ {
+ if (name)
+ {
+@@ -462,7 +462,7 @@
+ lua_pop(L,1); /* pop module */
+ }
+ #else
+-TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar)
++TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar)
+ {
+ if (name)
+ {
+@@ -518,7 +518,7 @@
+ /* Map C class
+ * It maps a C class, setting the appropriate inheritance and super classes.
+ */
+-TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base,
lua_CFunction col)
++TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const
char* base, lua_CFunction col)
+ {
+ char cname[128] = "const ";
+ char cbase[128] = "const ";
+@@ -577,7 +577,7 @@
+ /* Map function
+ * It assigns a function into the current module (or class)
+ */
+-TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func)
++TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func)
+ {
+ lua_pushstring(L,name);
+ lua_pushcfunction(L,func);
+@@ -600,7 +600,7 @@
+ /* Map constant number
+ * It assigns a constant number into the current module (or class)
+ */
+-TOLUA_API void tolua_constant (lua_State* L, char* name, double value)
++TOLUA_API void tolua_constant (lua_State* L, const char* name, double value)
+ {
+ lua_pushstring(L,name);
+ tolua_pushnumber(L,value);
+@@ -611,7 +611,7 @@
+ /* Map variable
+ * It assigns a variable into the current module (or class)
+ */
+-TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get,
lua_CFunction set)
++TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set)
+ {
+ /* get func */
+ lua_pushstring(L,".get");
+@@ -663,7 +663,7 @@
+ /* Map an array
+ * It assigns an array into the current module (or class)
+ */
+-TOLUA_API void tolua_array (lua_State* L, char* name, lua_CFunction get, lua_CFunction
set)
++TOLUA_API void tolua_array (lua_State* L, const char* name, lua_CFunction get,
lua_CFunction set)
+ {
+ lua_pushstring(L,".get");
+ lua_rawget(L,-2);
diff --git a/tolua++.spec b/tolua++.spec
index 715c9d2..9b427fe 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,13 +2,14 @@
Name: tolua++
Version: 1.0.92
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: Freely redistributable without restriction
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.92-makeso.patch
+Patch1: tolua++-1.0.92-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: scons
BuildRequires: lua-devel >= 5.1
@@ -31,6 +32,7 @@ Development files for tolua++
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
sed -i 's/\r//' doc/%{name}.html
@@ -74,6 +76,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Mar 13 2008 Tim Niemueller <tim(a)niemueller.de> - 1.0.92-7
+- Added patch to make tolua++ compatible with GCC 4.3
+
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng(a)fedoraproject.org> -
1.0.92-6
- Autorebuild for GCC 4.3
commit 363f84438d769a4f803a88935884fc3a9fc2a69d
Author: Jesse Keating <jkeating(a)fedoraproject.org>
Date: Tue Feb 19 16:53:47 2008 +0000
- Autorebuild for GCC 4.3
diff --git a/tolua++.spec b/tolua++.spec
index 5f4cc5b..715c9d2 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.92
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
License: Freely redistributable without restriction
@@ -74,6 +74,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng(a)fedoraproject.org> -
1.0.92-6
+- Autorebuild for GCC 4.3
+
* Wed Aug 22 2007 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-5
- Release bump for F8 mass rebuild
- Updated license due to new guidelines
commit 515d3294a900c6013d07e9fe8fd708617be7f9fa
Author: oddsocks <oddsocks(a)fedoraproject.org>
Date: Wed Aug 22 20:03:20 2007 +0000
*** empty log message ***
diff --git a/tolua++.spec b/tolua++.spec
index 2e434fe..5f4cc5b 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,11 +2,10 @@
Name: tolua++
Version: 1.0.92
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A tool to integrate C/C++ code with Lua
-
Group: Development/Tools
-License: Freeware
+License: Freely redistributable without restriction
URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.92-makeso.patch
@@ -18,6 +17,7 @@ BuildRequires: lua-devel >= 5.1
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
Lua. tolua++ includes new features oriented to C++
+
%package devel
Summary: Development files for tolua++
Group: Development/Libraries
@@ -35,7 +35,7 @@ sed -i 's/\r//' doc/%{name}.html
%build
-scons %{?_smp_mflags} -Q CCFLAGS="$RPM_OPT_FLAGS -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so"
+scons %{?_smp_mflags} -Q CCFLAGS="%{optflags} -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so"
#Recompile the exe without the soname. An ugly hack.
gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua -ldl -lm
@@ -74,10 +74,14 @@ rm -rf %{buildroot}
%changelog
-* Mon Aug 28 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-4%{?dist}
+* Wed Aug 22 2007 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-5
+- Release bump for F8 mass rebuild
+- Updated license due to new guidelines
+
+* Mon Aug 28 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-4
- Release bump for FC6 mass rebuild
-* Sat Jun 03 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-3%{?dist}
+* Sat Jun 03 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-3
- Fixed issue with where tolua++ was tagged with an soname the same as the lib
meaning ld would fail to locate the library.
commit a7199cb6429de0c24932dfb77fee215cfd0b2798
Author: oddsocks <oddsocks(a)fedoraproject.org>
Date: Mon Aug 28 16:43:33 2006 +0000
auto-import tolua++-1.0.92-4 on branch devel from tolua++-1.0.92-4.src.rpm
diff --git a/tolua++.spec b/tolua++.spec
index 8728ca2..2e434fe 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.92
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
@@ -11,7 +11,6 @@ URL:
http://www.codenix.com/~tolua/
Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
Patch0: tolua++-1.0.92-makeso.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
BuildRequires: scons
BuildRequires: lua-devel >= 5.1
@@ -32,13 +31,13 @@ Development files for tolua++
%prep
%setup -q
%patch0 -p1
-sed -i 's/\r//' doc/tolua++.html
+sed -i 's/\r//' doc/%{name}.html
%build
scons %{?_smp_mflags} -Q CCFLAGS="$RPM_OPT_FLAGS -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so"
#Recompile the exe without the soname. An ugly hack.
-gcc -o bin/tolua++ src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua -ldl -lm
+gcc -o bin/%{name} src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua -ldl -lm
%install
@@ -46,9 +45,9 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
mkdir %{buildroot}%{_libdir}
mkdir %{buildroot}%{_includedir}
-install -m0755 bin/tolua++ %{buildroot}%{_bindir}
+install -m0755 bin/%{name} %{buildroot}%{_bindir}
install -m0755 lib/lib%{solib}.so %{buildroot}%{_libdir}
-install -m0644 include/tolua++.h %{buildroot}%{_includedir}
+install -m0644 include/%{name}.h %{buildroot}%{_includedir}
cd %{buildroot}%{_libdir}
ln -s lib%{solib}.so libtolua++.so
@@ -66,14 +65,18 @@ rm -rf %{buildroot}
%{_libdir}/lib%{solib}.so
%doc README doc/*
+
%files devel
%defattr(-,root,root,-)
-%{_bindir}/tolua++
+%{_bindir}/%{name}
%{_libdir}/libtolua++.so
-%{_includedir}/tolua++.h
+%{_includedir}/%{name}.h
%changelog
+* Mon Aug 28 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-4%{?dist}
+- Release bump for FC6 mass rebuild
+
* Sat Jun 03 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-3%{?dist}
- Fixed issue with where tolua++ was tagged with an soname the same as the lib
meaning ld would fail to locate the library.
@@ -85,4 +88,4 @@ rm -rf %{buildroot}
- Now adds soname to library
* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-1
-- Initial Release
\ No newline at end of file
+- Initial Release
commit 3418ae37914394c4754cfbef20503a5483f0d751
Author: oddsocks <oddsocks(a)fedoraproject.org>
Date: Mon Aug 28 16:42:39 2006 +0000
Package rebuild
diff --git a/needs.rebuild b/needs.rebuild
deleted file mode 100644
index 815fd29..0000000
--- a/needs.rebuild
+++ /dev/null
@@ -1 +0,0 @@
-http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild
commit 6e64f54bbc30198a582dc92b1bae886954f487f6
Author: Ville Skytt <scop(a)fedoraproject.org>
Date: Sun Aug 27 21:12:11 2006 +0000
http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild
diff --git a/needs.rebuild b/needs.rebuild
new file mode 100644
index 0000000..815fd29
--- /dev/null
+++ b/needs.rebuild
@@ -0,0 +1 @@
+http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild
commit aa87ca9ee0a4ce58664bd8ae80140b342f7e5937
Author: oddsocks <oddsocks(a)fedoraproject.org>
Date: Sun Jun 4 13:58:32 2006 +0000
auto-import tolua++-1.0.92-3 on branch devel from tolua++-1.0.92-3.src.rpm
diff --git a/tolua++.spec b/tolua++.spec
index e1712d2..8728ca2 100644
--- a/tolua++.spec
+++ b/tolua++.spec
@@ -2,7 +2,7 @@
Name: tolua++
Version: 1.0.92
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A tool to integrate C/C++ code with Lua
Group: Development/Tools
@@ -37,6 +37,8 @@ sed -i 's/\r//' doc/tolua++.html
%build
scons %{?_smp_mflags} -Q CCFLAGS="$RPM_OPT_FLAGS -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so"
+#Recompile the exe without the soname. An ugly hack.
+gcc -o bin/tolua++ src/bin/tolua.o src/bin/toluabind.o -Llib -l%{solib} -llua -ldl -lm
%install
@@ -72,7 +74,11 @@ rm -rf %{buildroot}
%changelog
-* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-2%{?dist}
+* Sat Jun 03 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-3%{?dist}
+- Fixed issue with where tolua++ was tagged with an soname the same as the lib
+ meaning ld would fail to locate the library.
+
+* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-2
- Changed license from Freeware Style to just Freeware
- Changed => to more conventional >= for (build)requires
- Moved %%{_bindir}/tolua++ to devel package
commit bf269e170bafdf672522e7dc42d6a60f48b0da63
Author: oddsocks <oddsocks(a)fedoraproject.org>
Date: Sat Jun 3 13:48:45 2006 +0000
auto-import tolua++-1.0.92-2 on branch devel from tolua++-1.0.92-2.src.rpm
diff --git a/.cvsignore b/.cvsignore
index e69de29..38c43c2 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+tolua++-1.0.92.tar.bz2
diff --git a/sources b/sources
index e69de29..d39898f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f4682e065b7d6d4de5eec13e6b7d347c tolua++-1.0.92.tar.bz2
diff --git a/tolua++-1.0.92-makeso.patch b/tolua++-1.0.92-makeso.patch
new file mode 100644
index 0000000..4265d9e
--- /dev/null
+++ b/tolua++-1.0.92-makeso.patch
@@ -0,0 +1,52 @@
+--- tolua++-1.0.92/SConstruct.orig 2006-04-10 10:45:44.000000000 +0100
++++ tolua++-1.0.92/SConstruct 2006-06-02 15:12:34.000000000 +0100
+@@ -22,7 +22,7 @@
+ opts.Add('LIBPATH', 'library path', [])
+
+ opts.Add('tolua_bin', 'the resulting binary', 'tolua++')
+-opts.Add('tolua_lib', 'the resulting library', 'tolua++')
++opts.Add('tolua_lib', 'the resulting library', 'tolua++-5.1')
+ opts.Add('TOLUAPP', 'the name of the tolua++ binary (to use with
built_dev=1)', 'tolua++')
+
+ opts.Add('prefix', 'The installation prefix')
+--- tolua++-1.0.92/config_linux.py.orig 2005-04-30 03:20:38.000000000 +0100
++++ tolua++-1.0.92/config_linux.py 2006-06-02 15:09:03.000000000 +0100
+@@ -15,8 +15,8 @@
+ #
+ # You can see more 'generic' options for POSIX systems on config_posix.py
+
+-prefix = '/usr/local'
++prefix = '/usr'
+
+ # libraries (based on Debian's installation of lua)
+-LIBS = ['lua50', 'lualib50', 'dl', 'm']
++LIBS = ['lua', 'dl', 'm']
+
+--- tolua++-1.0.92/custom-5.1.py.orig 2006-02-13 23:57:26.000000000 +0000
++++ tolua++-1.0.92/custom-5.1.py 2006-06-02 15:10:08.000000000 +0100
+@@ -1,11 +1,11 @@
+ CC = 'gcc'
+ CCFLAGS = ['-I/usr/include/lua5.1', '-O2', '-ansi']
+ #LIBPATH = ['/usr/local/lib']
+-LIBS = ['lua5.1', 'dl', 'm']
+-prefix = '/usr/local'
++LIBS = ['lua', 'dl', 'm']
++prefix = '/usr'
+ build_dev = 1
+-ENV = {'PATH': '/usr/local/bin:/bin:/usr/bin'}
+-tolua_bin = 'tolua++5.1'
+-tolua_lib = 'tolua++5.1'
++ENV = {'PATH': '/bin:/usr/bin:/usr/local/bin'}
++tolua_bin = 'tolua++'
++tolua_lib = 'tolua++-5.1'
+ TOLUAPP = 'tolua++5.1'
+
+--- tolua++-1.0.92/src/lib/SCsub.orig 2005-11-28 13:51:15.000000000 +0000
++++ tolua++-1.0.92/src/lib/SCsub 2006-06-02 15:11:17.000000000 +0100
+@@ -9,5 +9,4 @@
+ 'tolua_to.c',
+ ]
+
+-env.lib_target = env.Library('#/lib/'+env['tolua_lib'], sources)
+-
++env.lib_target = env.SharedLibrary('#/lib/'+env['tolua_lib'], sources)
diff --git a/tolua++.spec b/tolua++.spec
new file mode 100644
index 0000000..e1712d2
--- /dev/null
+++ b/tolua++.spec
@@ -0,0 +1,82 @@
+%define solib tolua++-5.1
+
+Name: tolua++
+Version: 1.0.92
+Release: 2%{?dist}
+Summary: A tool to integrate C/C++ code with Lua
+
+Group: Development/Tools
+License: Freeware
+URL:
http://www.codenix.com/~tolua/
+Source0:
http://www.codenix.com/~tolua/%{name}-%{version}.tar.bz2
+Patch0: tolua++-1.0.92-makeso.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: scons
+BuildRequires: lua-devel >= 5.1
+
+%description
+tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
+Lua. tolua++ includes new features oriented to C++
+
+%package devel
+Summary: Development files for tolua++
+Group: Development/Libraries
+Requires: tolua++ = %{version}-%{release}
+Requires: lua-devel >= 5.1
+
+%description devel
+Development files for tolua++
+
+
+%prep
+%setup -q
+%patch0 -p1
+sed -i 's/\r//' doc/tolua++.html
+
+
+%build
+scons %{?_smp_mflags} -Q CCFLAGS="$RPM_OPT_FLAGS -I%{_includedir}"
tolua_lib=%{solib} LINKFLAGS="-Wl,-soname,lib%{solib}.so"
+
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_bindir}
+mkdir %{buildroot}%{_libdir}
+mkdir %{buildroot}%{_includedir}
+install -m0755 bin/tolua++ %{buildroot}%{_bindir}
+install -m0755 lib/lib%{solib}.so %{buildroot}%{_libdir}
+install -m0644 include/tolua++.h %{buildroot}%{_includedir}
+cd %{buildroot}%{_libdir}
+ln -s lib%{solib}.so libtolua++.so
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/lib%{solib}.so
+%doc README doc/*
+
+%files devel
+%defattr(-,root,root,-)
+%{_bindir}/tolua++
+%{_libdir}/libtolua++.so
+%{_includedir}/tolua++.h
+
+
+%changelog
+* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-2%{?dist}
+- Changed license from Freeware Style to just Freeware
+- Changed => to more conventional >= for (build)requires
+- Moved %%{_bindir}/tolua++ to devel package
+- Now adds soname to library
+
+* Fri Jun 02 2006 Ian Chapman <packages(a)amiga-hardware.com> 1.0.92-1
+- Initial Release
\ No newline at end of file