Update to 35.0

This commit is contained in:
Orion Poplawski 2020-07-09 22:20:27 -06:00
parent e26d542e6c
commit 3e14a926ff
6 changed files with 9 additions and 153 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/release-v33.2.1.tar.gz
/release-v33.3.1.tar.gz
/release-v34.1.1.tar.gz
/lua-posix-35.0.tar.gz

View File

@ -1,54 +0,0 @@
local bit32 = {}
function bit32.bnot (a)
return ~a & 0xFFFFFFFF
end
function bit32.band (x, y, z, ...)
if not z then
return ((x or -1) & (y or -1)) & 0xFFFFFFFF
else
local arg = {...}
local res = x & y & z
for i = 1, #arg do res = res & arg[i] end
return res & 0xFFFFFFFF
end
end
function bit32.bor (x, y, z, ...)
if not z then
return ((x or 0) | (y or 0)) & 0xFFFFFFFF
else
local arg = {...}
local res = x | y | z
for i = 1, #arg do res = res | arg[i] end
return res & 0xFFFFFFFF
end
end
return bit32
--[[
*****************************************************************************
* Copyright (C) 1994-2016 Lua.org, PUC-Rio.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*****************************************************************************
]]

View File

@ -1,52 +0,0 @@
diff -up luaposix-release-v34.1.1/lib/posix/_base.lua.pbit32 luaposix-release-v34.1.1/lib/posix/_base.lua
--- luaposix-release-v34.1.1/lib/posix/_base.lua.pbit32 2019-07-28 19:52:15.000000000 -0600
+++ luaposix-release-v34.1.1/lib/posix/_base.lua 2020-07-03 15:47:57.208581988 -0600
@@ -26,7 +26,7 @@ local _ENV = require 'posix._strict' {
S_IXOTH = require 'posix.sys.stat'.S_IXOTH,
S_ISUID = require 'posix.sys.stat'.S_ISUID,
S_ISGID = require 'posix.sys.stat'.S_ISGID,
- band = require 'bit32'.band,
+ band = require 'posix.bit32'.band,
concat = table.concat,
error = error,
format = string.format,
diff -up luaposix-release-v34.1.1/lib/posix/compat.lua.pbit32 luaposix-release-v34.1.1/lib/posix/compat.lua
--- luaposix-release-v34.1.1/lib/posix/compat.lua.pbit32 2019-07-28 19:52:15.000000000 -0600
+++ luaposix-release-v34.1.1/lib/posix/compat.lua 2020-07-03 12:20:26.753414331 -0600
@@ -34,9 +34,9 @@ local S_IXUSR = require 'posix.sys.stat'
local argerror = require 'posix._base'.argerror
local argscheck = require 'posix._base'.argscheck
local chmod = require 'posix.sys.stat'.chmod
-local band = require 'bit32'.band
-local bnot = require 'bit32'.bnot
-local bor = require 'bit32'.bor
+local band = require 'posix.bit32'.band
+local bnot = require 'posix.bit32'.bnot
+local bor = require 'posix.bit32'.bor
local concat = table.concat
local gsub = string.gsub
local match = string.match
diff -up luaposix-release-v34.1.1/lib/posix/deprecated.lua.pbit32 luaposix-release-v34.1.1/lib/posix/deprecated.lua
--- luaposix-release-v34.1.1/lib/posix/deprecated.lua.pbit32 2019-07-28 19:52:15.000000000 -0600
+++ luaposix-release-v34.1.1/lib/posix/deprecated.lua 2020-07-03 12:20:26.754414341 -0600
@@ -59,7 +59,7 @@ local _ENV = require 'posix._strict' {
argerror = require 'posix._base'.argerror,
argscheck = require 'posix._base'.argscheck,
bind = require 'posix.sys.socket'.bind,
- bor = require 'bit32'.bor,
+ bor = require 'posix.bit32'.bor,
clock_getres = require 'posix.time'.clock_getres or false,
clock_gettime = require 'posix.time'.clock_gettime or false,
connect = require 'posix.sys.socket'.connect,
diff -up luaposix-release-v34.1.1/lib/posix/init.lua.pbit32 luaposix-release-v34.1.1/lib/posix/init.lua
--- luaposix-release-v34.1.1/lib/posix/init.lua.pbit32 2019-07-28 19:52:15.000000000 -0600
+++ luaposix-release-v34.1.1/lib/posix/init.lua 2020-07-03 12:20:26.754414341 -0600
@@ -29,7 +29,7 @@ local _ENV = require 'posix._strict' {
access = require 'posix.unistd'.access,
argscheck = require 'posix._base'.argscheck,
assert = assert,
- bor = require 'bit32'.bor,
+ bor = require 'posix.bit32'.bor,
close = require 'posix.unistd'.close,
dup2 = require 'posix.unistd'.dup2,
errno = require 'posix.errno'.errno,

View File

@ -1,30 +0,0 @@
diff -up luaposix-release-v34.1.1/ext/include/_helpers.c.54 luaposix-release-v34.1.1/ext/include/_helpers.c
--- luaposix-release-v34.1.1/ext/include/_helpers.c.54 2019-07-28 19:52:15.000000000 -0600
+++ luaposix-release-v34.1.1/ext/include/_helpers.c 2020-07-03 15:52:36.736850636 -0600
@@ -67,7 +67,7 @@
# endif
#endif
-#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503
+#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 504
# define lua_objlen lua_rawlen
# define lua_strlen lua_rawlen
#endif
diff -up luaposix-release-v34.1.1/lib/posix/init.lua.54 luaposix-release-v34.1.1/lib/posix/init.lua
--- luaposix-release-v34.1.1/lib/posix/init.lua.54 2020-07-03 15:52:36.731850626 -0600
+++ luaposix-release-v34.1.1/lib/posix/init.lua 2020-07-03 16:27:29.414853510 -0600
@@ -327,10 +327,12 @@ do
end
-- Inject deprecated APIs (overwriting submodules) for backwards compatibility.
- for k, v in next, require 'posix.deprecated' do
+ local funcs = require 'posix.deprecated'
+ for k, v in next, funcs do
M[k] = v
end
- for k, v in next, require 'posix.compat' do
+ funcs = require 'posix.compat'
+ for k, v in next, funcs do
M[k] = v
end
end

View File

@ -5,21 +5,12 @@
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: lua-posix
Version: 34.1.1
Release: 2%{?dist}
Version: 35.0
Release: 1%{?dist}
Summary: A POSIX library for Lua
License: MIT
URL: http://luaforge.net/projects/luaposix/
Source0: https://github.com/luaposix/luaposix/archive/release-v%{version}.tar.gz
# bit32 is gone in lua 5.4
# this file is a hack to add functions that use the lua native bitwise operators
# taken from lua-5.4.0-tests/bitwise.lua
Source1: bit32.lua
# This patch tells lua-posix to use the local bit32
Patch0: lua-posix-local-bit32.patch
# Use the same tricks that the helpers use for 5.2/5.3
# Other fixes for lua 5.4
Patch1: lua-posix-lua-5.4.patch
Source0: https://github.com/luaposix/luaposix/archive/v%{version}/lua-posix-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: lua-devel
%{?lua_requires}
@ -29,9 +20,7 @@ This is a POSIX library for Lua which provides access to many POSIX features
to Lua programs.
%prep
%setup -q -n luaposix-release-v%{version}
%patch0 -p1 -b .pbit32
%patch1 -p1 -b .54
%setup -q -n luaposix-%{version}
%build
build-aux/luke CFLAGS="%build_cflags"
@ -39,7 +28,6 @@ build-aux/luke CFLAGS="%build_cflags"
%install
build-aux/luke install PREFIX=%{buildroot}%{_prefix} INST_LIBDIR=%{buildroot}%{lua_libdir}
install -pm0644 %{SOURCE1} %{buildroot}%{lua_pkgdir}/posix/
#check
@ -54,6 +42,9 @@ install -pm0644 %{SOURCE1} %{buildroot}%{lua_pkgdir}/posix/
%changelog
* Fri Jul 10 2020 Orion Poplawski <orion@nwra.com> - 35.0-1
- Update to 35.0
* Fri Jul 03 2020 Orion Poplawski <orion@nwra.com> - 34.1.1-2
- Fix bit32 patch
- More lua 5.4 fixes

View File

@ -1 +1 @@
SHA512 (release-v34.1.1.tar.gz) = 8ec0cd067c9e0d704ca2a363cdec71195f107783ebc6c0164e290bce77e39b4844132363522c4a443cbf3285335391bc7479b0782fd571c3805ddc59492c2bbd
SHA512 (lua-posix-35.0.tar.gz) = 4bb61892b78d9e59418a9a6360b9f611fb9b5438b9261a2c6672f053a1b21dfd9a2060b8d2f0d3eac6185773cf84672c1769c081c4ab53d2ddae2232e4a9269b