SHA256
1
0
forked from pool/vis
vis/vis.spec

81 lines
2.5 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package vis
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define test_version 0.5
Name: vis
Update to 0.9: This release has been long in the works but its time now. There have been many additions and bugfixes since 0.8. In particular changes to the Lua API have made it easier to extend `vis` in all sorts of ways that were previously difficult or impossible. As always the appreciation towards contributors new and old can not be understated; thanks goes out to everyone for their efforts! A summary of changes follows: Compare non-existing files by name and existing files by inode Do tilde expansion only for the tilde character at the beginning of the pattern. Add word wrapping via breakat and wrapcolumn options Add ansi escaping values and theming keyword for dimmed text Allow statusbar to disabled Default theme was changed to one that uses the terminal colors directly. filetype: support filetype detection via hashbang filetype: many new file extensions are covered Resync the lexers with Scintillua Implement Selection:remove() Allow underscore (_) in command names Allow nil in vis:pipe() File and Range parameters Add fullscreen param to vis_pipe_collect() and vis:pipe() Access and set all available editor options Implementation of the non-blocking process running Lua API Make expandtab and tabwidth options window-local Drop redrawtime option Add a Lua constant for UI_STYLE_LEXER_MAX Report viewport as lines in addition to bytes Add `win:style_pos()` for styling a specific window cell. Add `UI_DRAW` event for last minute changes to the drawn window. Report viewport dimensions Add a basic .editorconfig file Don't set _FORTIFY_SOURCE in configure Many documentation improvements. Make vis-open and vis-complete more POSIX compliant vis-clipboard: clean up bashisms and make shellcheck happy. vis-clipboard: add support for wayclip vis-open: allow to show files vertically fix warning by dealing with error value from fchdir in text-io.c text-io: close "cwd" in all cases vis-complete: Fix commandline options handling vis-clipboard: make xsel honor --selection wl-paste and wl-copy should not add \n to the end of the clipboard. fix a bug with using regex to close windows (i.e. `:X/re/q`) Limit to lines within range for inner text objects vis-clipboard: don't fail when sel is primary on unsupported platforms fix { moving back too much if cursor is at start of a line Print keybindings containing space correctly in help window Prevent flickering in curses vis-menu: try to preserve valid Unicode points lua: make sure lpeg is in fact optional vis-single: respect TMPDIR lua: fail when mapping a key to an invalid handler type vis_pipe: correctly return non-zero exit status view: skip empty cells before applying a style sam: reject invalid ranges for cmd_extract ("x"/"y") Fix upper/lower case conversions with `gU` and `gu`. lua: complete-word: use internal regex for splitting words Theme application was refactored and should be more consistent now. The option names `show-spaces`, `show-tabs`, `show-newlines`, `show-eof`, and `change-256colors` are all deprecated and will be removed for the next release, use the name without the `-` instead (e.g. showeof). This was done to avoid inconsistencies between the lua option names and the `:set option` names. The complete changelog can be viewed on https://git.sr.ht/~martanne/vis/log/v0.9
2024-07-10 14:19:17 +02:00
Version: 0.9
Release: 0
Summary: An editor combining the strengths of both vi(m) and sam
License: ISC
Group: Productivity/Text/Editors
Update to 0.9: This release has been long in the works but its time now. There have been many additions and bugfixes since 0.8. In particular changes to the Lua API have made it easier to extend `vis` in all sorts of ways that were previously difficult or impossible. As always the appreciation towards contributors new and old can not be understated; thanks goes out to everyone for their efforts! A summary of changes follows: Compare non-existing files by name and existing files by inode Do tilde expansion only for the tilde character at the beginning of the pattern. Add word wrapping via breakat and wrapcolumn options Add ansi escaping values and theming keyword for dimmed text Allow statusbar to disabled Default theme was changed to one that uses the terminal colors directly. filetype: support filetype detection via hashbang filetype: many new file extensions are covered Resync the lexers with Scintillua Implement Selection:remove() Allow underscore (_) in command names Allow nil in vis:pipe() File and Range parameters Add fullscreen param to vis_pipe_collect() and vis:pipe() Access and set all available editor options Implementation of the non-blocking process running Lua API Make expandtab and tabwidth options window-local Drop redrawtime option Add a Lua constant for UI_STYLE_LEXER_MAX Report viewport as lines in addition to bytes Add `win:style_pos()` for styling a specific window cell. Add `UI_DRAW` event for last minute changes to the drawn window. Report viewport dimensions Add a basic .editorconfig file Don't set _FORTIFY_SOURCE in configure Many documentation improvements. Make vis-open and vis-complete more POSIX compliant vis-clipboard: clean up bashisms and make shellcheck happy. vis-clipboard: add support for wayclip vis-open: allow to show files vertically fix warning by dealing with error value from fchdir in text-io.c text-io: close "cwd" in all cases vis-complete: Fix commandline options handling vis-clipboard: make xsel honor --selection wl-paste and wl-copy should not add \n to the end of the clipboard. fix a bug with using regex to close windows (i.e. `:X/re/q`) Limit to lines within range for inner text objects vis-clipboard: don't fail when sel is primary on unsupported platforms fix { moving back too much if cursor is at start of a line Print keybindings containing space correctly in help window Prevent flickering in curses vis-menu: try to preserve valid Unicode points lua: make sure lpeg is in fact optional vis-single: respect TMPDIR lua: fail when mapping a key to an invalid handler type vis_pipe: correctly return non-zero exit status view: skip empty cells before applying a style sam: reject invalid ranges for cmd_extract ("x"/"y") Fix upper/lower case conversions with `gU` and `gu`. lua: complete-word: use internal regex for splitting words Theme application was refactored and should be more consistent now. The option names `show-spaces`, `show-tabs`, `show-newlines`, `show-eof`, and `change-256colors` are all deprecated and will be removed for the next release, use the name without the `-` instead (e.g. showeof). This was done to avoid inconsistencies between the lua option names and the `:set option` names. The complete changelog can be viewed on https://git.sr.ht/~martanne/vis/log/v0.9
2024-07-10 14:19:17 +02:00
URL: https://sr.ht/~martanne/vis/
Source0: https://git.sr.ht/~martanne/vis/archive/v%{version}.tar.gz
Source1: https://git.sr.ht/~martanne/vis-test/archive/v%{test_version}.tar.gz
# PATCH-FIX-UPSTREAM vis-test-builtin_strncpy-bounds.patch mcepl@suse.com
# patch from https://git.sr.ht/~martanne/vis-test/commit/efafa3c17826
Patch0: vis-test-builtin_strncpy-bounds.patch
BuildRequires: libselinux-devel
BuildRequires: libtermkey-devel
BuildRequires: lua-devel
BuildRequires: lua-lpeg
BuildRequires: ncurses-devel
BuildRequires: tar
BuildRequires: tre-devel
Requires: lua
Suggests: par_text
ExclusiveArch: x86_64 %{ix86}
Suggests: par_text
%description
Vis aims to be a modern, legacy free, simple yet efficient editor combining the strengths of both vi(m) and sam.
It extends vi's modal editing with built-in support for multiple cursors/selections and combines it with sam's structural regular expression based command language.
%prep
Update to 0.9: This release has been long in the works but its time now. There have been many additions and bugfixes since 0.8. In particular changes to the Lua API have made it easier to extend `vis` in all sorts of ways that were previously difficult or impossible. As always the appreciation towards contributors new and old can not be understated; thanks goes out to everyone for their efforts! A summary of changes follows: Compare non-existing files by name and existing files by inode Do tilde expansion only for the tilde character at the beginning of the pattern. Add word wrapping via breakat and wrapcolumn options Add ansi escaping values and theming keyword for dimmed text Allow statusbar to disabled Default theme was changed to one that uses the terminal colors directly. filetype: support filetype detection via hashbang filetype: many new file extensions are covered Resync the lexers with Scintillua Implement Selection:remove() Allow underscore (_) in command names Allow nil in vis:pipe() File and Range parameters Add fullscreen param to vis_pipe_collect() and vis:pipe() Access and set all available editor options Implementation of the non-blocking process running Lua API Make expandtab and tabwidth options window-local Drop redrawtime option Add a Lua constant for UI_STYLE_LEXER_MAX Report viewport as lines in addition to bytes Add `win:style_pos()` for styling a specific window cell. Add `UI_DRAW` event for last minute changes to the drawn window. Report viewport dimensions Add a basic .editorconfig file Don't set _FORTIFY_SOURCE in configure Many documentation improvements. Make vis-open and vis-complete more POSIX compliant vis-clipboard: clean up bashisms and make shellcheck happy. vis-clipboard: add support for wayclip vis-open: allow to show files vertically fix warning by dealing with error value from fchdir in text-io.c text-io: close "cwd" in all cases vis-complete: Fix commandline options handling vis-clipboard: make xsel honor --selection wl-paste and wl-copy should not add \n to the end of the clipboard. fix a bug with using regex to close windows (i.e. `:X/re/q`) Limit to lines within range for inner text objects vis-clipboard: don't fail when sel is primary on unsupported platforms fix { moving back too much if cursor is at start of a line Print keybindings containing space correctly in help window Prevent flickering in curses vis-menu: try to preserve valid Unicode points lua: make sure lpeg is in fact optional vis-single: respect TMPDIR lua: fail when mapping a key to an invalid handler type vis_pipe: correctly return non-zero exit status view: skip empty cells before applying a style sam: reject invalid ranges for cmd_extract ("x"/"y") Fix upper/lower case conversions with `gU` and `gu`. lua: complete-word: use internal regex for splitting words Theme application was refactored and should be more consistent now. The option names `show-spaces`, `show-tabs`, `show-newlines`, `show-eof`, and `change-256colors` are all deprecated and will be removed for the next release, use the name without the `-` instead (e.g. showeof). This was done to avoid inconsistencies between the lua option names and the `:set option` names. The complete changelog can be viewed on https://git.sr.ht/~martanne/vis/log/v0.9
2024-07-10 14:19:17 +02:00
%setup -q -n %{name}-v%{version}
tar -xC test/ --strip-components 1 -f %{SOURCE1}
Update to 0.9: This release has been long in the works but its time now. There have been many additions and bugfixes since 0.8. In particular changes to the Lua API have made it easier to extend `vis` in all sorts of ways that were previously difficult or impossible. As always the appreciation towards contributors new and old can not be understated; thanks goes out to everyone for their efforts! A summary of changes follows: Compare non-existing files by name and existing files by inode Do tilde expansion only for the tilde character at the beginning of the pattern. Add word wrapping via breakat and wrapcolumn options Add ansi escaping values and theming keyword for dimmed text Allow statusbar to disabled Default theme was changed to one that uses the terminal colors directly. filetype: support filetype detection via hashbang filetype: many new file extensions are covered Resync the lexers with Scintillua Implement Selection:remove() Allow underscore (_) in command names Allow nil in vis:pipe() File and Range parameters Add fullscreen param to vis_pipe_collect() and vis:pipe() Access and set all available editor options Implementation of the non-blocking process running Lua API Make expandtab and tabwidth options window-local Drop redrawtime option Add a Lua constant for UI_STYLE_LEXER_MAX Report viewport as lines in addition to bytes Add `win:style_pos()` for styling a specific window cell. Add `UI_DRAW` event for last minute changes to the drawn window. Report viewport dimensions Add a basic .editorconfig file Don't set _FORTIFY_SOURCE in configure Many documentation improvements. Make vis-open and vis-complete more POSIX compliant vis-clipboard: clean up bashisms and make shellcheck happy. vis-clipboard: add support for wayclip vis-open: allow to show files vertically fix warning by dealing with error value from fchdir in text-io.c text-io: close "cwd" in all cases vis-complete: Fix commandline options handling vis-clipboard: make xsel honor --selection wl-paste and wl-copy should not add \n to the end of the clipboard. fix a bug with using regex to close windows (i.e. `:X/re/q`) Limit to lines within range for inner text objects vis-clipboard: don't fail when sel is primary on unsupported platforms fix { moving back too much if cursor is at start of a line Print keybindings containing space correctly in help window Prevent flickering in curses vis-menu: try to preserve valid Unicode points lua: make sure lpeg is in fact optional vis-single: respect TMPDIR lua: fail when mapping a key to an invalid handler type vis_pipe: correctly return non-zero exit status view: skip empty cells before applying a style sam: reject invalid ranges for cmd_extract ("x"/"y") Fix upper/lower case conversions with `gU` and `gu`. lua: complete-word: use internal regex for splitting words Theme application was refactored and should be more consistent now. The option names `show-spaces`, `show-tabs`, `show-newlines`, `show-eof`, and `change-256colors` are all deprecated and will be removed for the next release, use the name without the `-` instead (e.g. showeof). This was done to avoid inconsistencies between the lua option names and the `:set option` names. The complete changelog can be viewed on https://git.sr.ht/~martanne/vis/log/v0.9
2024-07-10 14:19:17 +02:00
%patch -p1 -P 0
%build
export CFLAGS="%{optflags} -fcommon"
%configure
%make_build debug
%install
%make_install
%check
# According to the debian/rules:
# The vim tests harness is not solid, let's skip them for the moment.
# Upstream mentioned the possibility of phasing them out entirely.
%make_build -C test/core
# No busted yet make -C test/lua
%make_build -C test/vis
%files
%{_bindir}/vis*
%{_datadir}/vis
%{_mandir}/man1/*
%dir %{_datadir}/doc/vis
%{_datadir}/doc/vis/LICENSE
%{_datadir}/doc/vis/README.md
%changelog