diff --git a/Penlight-1.10.0.tar.gz b/Penlight-1.10.0.tar.gz new file mode 100644 index 0000000..c073201 --- /dev/null +++ b/Penlight-1.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:570e77070ce31051f3054c418215cf3931f2026e181e44abcc69301a2f86ba67 +size 413134 diff --git a/Penlight-1.6.0.tar.gz b/Penlight-1.6.0.tar.gz deleted file mode 100644 index a360073..0000000 --- a/Penlight-1.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a552d0a314f7aa94c9579746996a7aad4ed59f3187f33b4735d3e323e27354b0 -size 373167 diff --git a/lua-penlight.changes b/lua-penlight.changes index 3565726..26f4e77 100644 --- a/lua-penlight.changes +++ b/lua-penlight.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Apr 21 12:57:58 UTC 2021 - Callum Farmer + +- Update to version 1.10.0: + * Fix Lua 5.4 issues + * Fix Lua 5.1 compat issues + * Fixed a lot of bugs +- Removed lua54.patch: upstream +- Added lua5_4_3.patch: fix tests fail on Lua 5.4.3 + ------------------------------------------------------------------- Thu Feb 18 16:02:23 UTC 2021 - Callum Farmer diff --git a/lua-penlight.spec b/lua-penlight.spec index db3877c..ecfbfd6 100644 --- a/lua-penlight.spec +++ b/lua-penlight.spec @@ -16,22 +16,26 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # - -%define flavor @BUILD_FLAVOR@ +%define flavor @BUILD_FLAVOR@%{nil} %define mod_name penlight -%define lua_value %(echo "%{flavor}" |sed -e 's:lua::') -%define with_docs 1 - -Version: 1.6.0 +%define rname Penlight +%ifluadefault +%define with_main 1 +%endif +%if "%{flavor}" == "" +Name: lua-%{mod_name} +ExclusiveArch: do_not_build +%else +Name: %{flavor}-%{mod_name} +%endif +Version: 1.10.0 Release: 0 Summary: Generally useful modules inspired by the Python standard libraries License: MIT Group: Development/Languages/Other -URL: http://stevedonovan.github.com/Penlight -Source: https://github.com/stevedonovan/Penlight/archive/%{version}.tar.gz#/Penlight-%{version}.tar.gz -# PATCH-FIX-UPSTREAM lua54.patch gh#Tieske/Penlight#320 mcepl@suse.com -# workaround hardcoded version of Lua 5.3. -Patch0: lua54.patch +URL: https://lunarmodules.github.io/Penlight/ +Source0: https://github.com/lunarmodules/Penlight/archive/%{version}/%{rname}-%{version}.tar.gz +Patch0: lua5_4_3.patch BuildRequires: %{flavor}-devel BuildRequires: %{flavor}-ldoc BuildRequires: %{flavor}-luafilesystem @@ -39,15 +43,8 @@ BuildRequires: %{flavor}-markdown Requires: %{flavor} Requires: %{flavor}-luafilesystem BuildArch: noarch +Recommends: lua-%{mod_name}-doc %lua_provides -%if "%{flavor}" == "" -Name: lua-%{mod_name} -ExclusiveArch: do_not_build -%else -Name: %{flavor}-%{mod_name} -%endif -Requires(post): update-alternatives -Requires(postun): update-alternatives %description A set of pure Lua libraries focusing on input data handling (such as @@ -55,19 +52,17 @@ reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management. Much of the functionality is inspired by the Python standard libraries. -%if 0%{?with_docs} -%package doc -Summary: Documentation for %{name} +%if 0%{?with_main} +%package -n lua-%{mod_name}-doc +Summary: Documentation for lua-%{mod_name} Group: Development/Languages/Other -Requires: %{name} = %{version} -%description doc -Documentation for the package %{name} +%description -n lua-%{mod_name}-doc +Documentation for the package lua-%{mod_name} %endif %prep -%setup -q -n Penlight-%{version} -%autopatch -p1 +%autosetup -n %{rname}-%{version} -p1 %build @@ -92,7 +87,9 @@ lua%{lua_version} run.lua tests # Add bash/zsh-completion files # from completions/bash/penlight.bash penlight -%files doc +%if 0%{?with_main} +%files -n lua-%{mod_name}-doc %doc docs +%endif %changelog diff --git a/lua54.patch b/lua54.patch deleted file mode 100644 index 1f975a7..0000000 --- a/lua54.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tests/lua/mod52.lua -+++ b/tests/lua/mod52.lua -@@ -12,7 +12,7 @@ function answer () - -- so define it as a local up above, or use utils.import(_G). - test.assertraise(function() - print 'hello' -- end,(LUA_VERSION~="Lua 5.3") and "attempt to call global 'print'" or "attempt to call a nil value") -+ end,(LUA_VERSION~="Lua 5.3" and LUA_VERSION~="Lua 5.4") and "attempt to call global 'print'" or "attempt to call a nil value") - - -- but all the Penlight modules are available - return pretty.write(utils.split '10 20 30', '') diff --git a/lua5_4_3.patch b/lua5_4_3.patch new file mode 100644 index 0000000..38b13ec --- /dev/null +++ b/lua5_4_3.patch @@ -0,0 +1,23 @@ +From 10dfaea6adfddab4f138faad67b563b7c33c90a3 Mon Sep 17 00:00:00 2001 +From: Pierre Chapuis +Date: Thu, 29 Apr 2021 11:31:12 +0200 +Subject: [PATCH] fix tests on Lua 5.4.3 + +see http://lua-users.org/lists/lua-l/2021-04/msg00024.html +--- + tests/lua/mod52.lua | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/lua/mod52.lua b/tests/lua/mod52.lua +index 06e505e0..4b3ec7ce 100644 +--- a/tests/lua/mod52.lua ++++ b/tests/lua/mod52.lua +@@ -15,7 +15,7 @@ function answer () + ["1"] = "attempt to call global 'print'", + ["2"] = "attempt to call global 'print'", + ["3"] = "attempt to call a nil value", +- ["4"] = "attempt to call a nil value", ++ ["4"] = "a nil value", + } + local expected = versioned_errors[LUA_VERSION:match("Lua 5.(%d)")] + test.assertraise(function()