Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Fedora Release Engineering
1b33022339 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:33:39 +00:00
Tom spot Callaway
938db33432 rebuild 2026-04-16 22:39:44 -04:00
Tom spot Callaway
bb0fc38581 rebuild for lua 5.5 2026-03-16 16:32:00 -04:00
Fedora Release Engineering
aae369be0e Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 19:59:27 +00:00
2 changed files with 41 additions and 1 deletions

38
vis-0.9-lua-5.5.patch Normal file
View file

@ -0,0 +1,38 @@
diff -up vis-v0.9/vis-lua.c.lua55 vis-v0.9/vis-lua.c
--- vis-v0.9/vis-lua.c.lua55 2026-03-16 16:23:43.668922812 -0400
+++ vis-v0.9/vis-lua.c 2026-03-16 16:25:41.892362312 -0400
@@ -3208,7 +3208,11 @@ static void *alloc_lua(void *ud, void *p
* @function init
*/
void vis_lua_init(Vis *vis) {
+#if LUA_VERSION_NUM >= 505
+ lua_State *L = lua_newstate(alloc_lua, vis, luaL_makeseed(0));
+#else
lua_State *L = lua_newstate(alloc_lua, vis);
+#endif
if (!L)
return;
vis->lua = L;
diff -up vis-v0.9/vis-lua.h.lua55 vis-v0.9/vis-lua.h
--- vis-v0.9/vis-lua.h.lua55 2026-03-16 16:13:13.657846463 -0400
+++ vis-v0.9/vis-lua.h 2026-03-16 16:15:26.159364325 -0400
@@ -14,6 +14,19 @@ typedef void* lua_CFunction;
#include "vis.h"
#include "vis-subprocess.h"
+#if LUA_VERSION_NUM >= 505
+
+#define lua_pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n))
+#define lua_tounsignedx(L,i,is) ((lua_Unsigned)lua_tointegerx(L,i,is))
+#define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL)
+#define luaL_checkunsigned(L,a) ((lua_Unsigned)luaL_checkinteger(L,a))
+#define luaL_optunsigned(L,a,d) \
+ ((lua_Unsigned)luaL_optinteger(L,a,(lua_Integer)(d)))
+#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
+
+#endif
+
+
/* add a directory to consider when loading lua files */
bool vis_lua_path_add(Vis*, const char *path);
/* get semicolon separated list of paths to load lua files

View file

@ -13,6 +13,7 @@ Summary: A vim-like editor with structural regex from plan9
License: ISC AND MIT AND CC0-1.0
URL: https://git.sr.ht/~martanne/%{name}
Source0: https://git.sr.ht/~martanne/%{name}/archive/v%{version}.tar.gz
Patch0: vis-0.9-lua-5.5.patch
BuildRequires: make
BuildRequires: gcc
@ -22,6 +23,7 @@ BuildRequires: pkgconfig(tre)
BuildRequires: pkgconfig(lua) >= 5.2
BuildRequires: libacl-devel
BuildRequires: pkgconfig(libselinux)
BuildRequires: lua-penlight
Requires: lua-lpeg >= 0.12
Requires: xsel
@ -39,7 +41,7 @@ BuildArch: noarch
%{summary}
%prep
%autosetup -n vis-v%{version}
%autosetup -n vis-v%{version} -p1
%build
%configure