[lua-posix] 5.1.28, lua 5.2
Tom Callaway
spot at fedoraproject.org
Mon May 13 01:48:15 UTC 2013
commit e1a3845277dc637995517da94138eb8b64c91644
Author: Tom Callaway <spot at fedoraproject.org>
Date: Sun May 12 21:47:46 2013 -0400
5.1.28, lua 5.2
.gitignore | 1 +
lua-posix.spec | 23 ++++++++++++++---------
luaposix-lua-5.2.patch | 40 ++++++++++++++++++++++++++++++++++++++++
sources | 2 +-
4 files changed, 56 insertions(+), 10 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1523821..00f75e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/luaposix-5.1.14.tar.gz
+/lua-posix-5.1.28-8f80582.tar.gz
diff --git a/lua-posix.spec b/lua-posix.spec
index a38c811..288ce46 100644
--- a/lua-posix.spec
+++ b/lua-posix.spec
@@ -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 at fedoraproject.org> - 5.1.28-1
+- update to 5.1.28, lua 5.2
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.1.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/luaposix-lua-5.2.patch b/luaposix-lua-5.2.patch
new file mode 100644
index 0000000..a15b061
--- /dev/null
+++ b/luaposix-lua-5.2.patch
@@ -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)
diff --git a/sources b/sources
index c4af1de..3837479 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a06af926a87e8d5e7c5b99304e0371f1 luaposix-5.1.14.tar.gz
+df3d8b211ea79e82e9a60fd8e6165e3b lua-posix-5.1.28-8f80582.tar.gz
More information about the scm-commits
mailing list