5.1.28, lua 5.2

This commit is contained in:
Tom Callaway 2013-05-12 21:47:46 -04:00
parent 4cf1aa7e70
commit e1a3845277
4 changed files with 56 additions and 10 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/luaposix-5.1.14.tar.gz
/lua-posix-5.1.28-8f80582.tar.gz

View File

@ -1,18 +1,19 @@
%define luaver 5.1
%define luaver 5.2
%define lualibdir %{_libdir}/lua/%{luaver}
%define luapkgdir %{_datadir}/lua/%{luaver}
%global commit 8f8058293efd9654e5fc7f7627a04f4db2b56f8f
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: lua-posix
Version: 5.1.14
Release: 4%{?dist}
Version: 5.1.28
Release: 1%{?dist}
Summary: A POSIX library for Lua
Group: Development/Libraries
License: Public Domain
URL: http://luaforge.net/projects/luaposix/
Source0: http://luaforge.net/frs/download.php/4848/luaposix-5.1.14.tar.gz
Source0: https://github.com/luaposix/luaposix/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
Patch0: luaposix-lua-5.2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver}
BuildRequires: ncurses-devel
Requires: lua >= %{luaver}
@ -22,8 +23,8 @@ This is a POSIX library for Lua which provides access to many POSIX features
to Lua programs.
%prep
%setup -q -n luaposix-%{version}
%setup -q -n luaposix-%{commit}
%patch0 -p1 -b .lua-52
%build
%configure --libdir=%{lualibdir} --datadir=/%{luapkgdir}
@ -45,12 +46,16 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README ChangeLog NEWS *.html
%doc README ChangeLog.old NEWS *.html
%{_defaultdocdir}/luaposix/
%{lualibdir}/*
%{luapkgdir}/*.lua
%changelog
* Sun May 12 2013 Tom Callaway <spot@fedoraproject.org> - 5.1.28-1
- update to 5.1.28, lua 5.2
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

40
luaposix-lua-5.2.patch Normal file
View File

@ -0,0 +1,40 @@
diff -up luaposix-8f8058293efd9654e5fc7f7627a04f4db2b56f8f/posix.lua.lua-52 luaposix-8f8058293efd9654e5fc7f7627a04f4db2b56f8f/posix.lua
--- luaposix-8f8058293efd9654e5fc7f7627a04f4db2b56f8f/posix.lua.lua-52 2013-05-12 21:37:05.201524376 -0400
+++ luaposix-8f8058293efd9654e5fc7f7627a04f4db2b56f8f/posix.lua 2013-05-12 21:43:12.845548551 -0400
@@ -4,6 +4,27 @@ local posix = M
local bit
if _VERSION == "Lua 5.1" then bit = require "bit" else bit = require "bit32" end
+-- Code extracted from lua-stdlib with minimal modifications
+local list = {
+ sub = function (l, from, to)
+ local r = {}
+ local len = #l
+ from = from or 1
+ to = to or len
+ if from < 0 then
+ from = from + len + 1
+ end
+ if to < 0 then
+ to = to + len + 1
+ end
+ for i = from, to do
+ table.insert (r, l[i])
+ end
+ return r
+ end
+}
+-- end of stdlib code
+
--- Create a file.
-- @param file name of file to create
-- @param mode permissions with which to create file
@@ -30,7 +51,7 @@ function M.spawn (task, ...)
task = {"/bin/sh", "-c", task, ...}
end
if type (task) == "table" then
- posix.execp (unpack (task))
+ posix.execp (table.unpack (task))
-- Only get here if there's an error; kill the fork
local _, no = posix.errno ()
posix._exit (no)

View File

@ -1 +1 @@
a06af926a87e8d5e7c5b99304e0371f1 luaposix-5.1.14.tar.gz
df3d8b211ea79e82e9a60fd8e6165e3b lua-posix-5.1.28-8f80582.tar.gz