5.1.28, lua 5.2
This commit is contained in:
parent
4cf1aa7e70
commit
e1a3845277
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/luaposix-5.1.14.tar.gz
|
/luaposix-5.1.14.tar.gz
|
||||||
|
/lua-posix-5.1.28-8f80582.tar.gz
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
%define luaver 5.1
|
%define luaver 5.2
|
||||||
%define lualibdir %{_libdir}/lua/%{luaver}
|
%define lualibdir %{_libdir}/lua/%{luaver}
|
||||||
%define luapkgdir %{_datadir}/lua/%{luaver}
|
%define luapkgdir %{_datadir}/lua/%{luaver}
|
||||||
|
%global commit 8f8058293efd9654e5fc7f7627a04f4db2b56f8f
|
||||||
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||||
|
|
||||||
Name: lua-posix
|
Name: lua-posix
|
||||||
Version: 5.1.14
|
Version: 5.1.28
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A POSIX library for Lua
|
Summary: A POSIX library for Lua
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
URL: http://luaforge.net/projects/luaposix/
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver}
|
BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver}
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
Requires: lua >= %{luaver}
|
Requires: lua >= %{luaver}
|
||||||
@ -22,8 +23,8 @@ This is a POSIX library for Lua which provides access to many POSIX features
|
|||||||
to Lua programs.
|
to Lua programs.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n luaposix-%{version}
|
%setup -q -n luaposix-%{commit}
|
||||||
|
%patch0 -p1 -b .lua-52
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --libdir=%{lualibdir} --datadir=/%{luapkgdir}
|
%configure --libdir=%{lualibdir} --datadir=/%{luapkgdir}
|
||||||
@ -45,12 +46,16 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc README ChangeLog NEWS *.html
|
%doc README ChangeLog.old NEWS *.html
|
||||||
|
%{_defaultdocdir}/luaposix/
|
||||||
%{lualibdir}/*
|
%{lualibdir}/*
|
||||||
%{luapkgdir}/*.lua
|
%{luapkgdir}/*.lua
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
|
40
luaposix-lua-5.2.patch
Normal file
40
luaposix-lua-5.2.patch
Normal 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)
|
Loading…
Reference in New Issue
Block a user