Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package neovim for openSUSE:Factory checked in at 2024-08-16 12:23:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/neovim (Old) and /work/SRC/openSUSE:Factory/.neovim.new.2698 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "neovim" Fri Aug 16 12:23:30 2024 rev:65 rq:1194028 version:0.10.1 Changes: -------- --- /work/SRC/openSUSE:Factory/neovim/neovim.changes 2024-08-02 17:27:25.721530457 +0200 +++ /work/SRC/openSUSE:Factory/.neovim.new.2698/neovim.changes 2024-08-16 12:24:01.963986532 +0200 @@ -1,0 +2,12 @@ +Wed Aug 14 21:23:07 UTC 2024 - Richard Rahl <rra...@opensuse.org> + +- add make-tree-sitter-optional.patch for making the tree-sitter plugins + optional (behind bcond) - this fixes s390x +- enable luajit for riscv64, which leaves ppc64le as the lone arch + which uses lua +- remove post and postun from the spec template, as most standard + packages don't need this (and ChangeLog file, as most projects dont use this + file anymore. +- revert back to default compiler flags + +------------------------------------------------------------------- New: ---- make-tree-sitter-optional.patch BETA DEBUG BEGIN: New: - add make-tree-sitter-optional.patch for making the tree-sitter plugins optional (behind bcond) - this fixes s390x BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ neovim.spec ++++++ --- /var/tmp/diff_new_pack.hiKRCc/_old 2024-08-16 12:24:02.800021277 +0200 +++ /var/tmp/diff_new_pack.hiKRCc/_new 2024-08-16 12:24:02.804021444 +0200 @@ -16,27 +16,28 @@ # -%{?!python3_pkgversion:%define python3_pkgversion 3} - -%define vimplugin_dir %{_datadir}/vim/site -# Luajit not available on all platforms -%ifarch %{arm} %{ix86} x86_64 aarch64 -%bcond_without luajit -%else +%ifarch s390x +%bcond_without make_optional +%endif +%ifarch ppc64le %bcond_with luajit +%else +%bcond_without luajit %endif - +%define vimplugin_dir %{_datadir}/vim/site Name: neovim Version: 0.10.1 Release: 0 Summary: Vim-fork focused on extensibility and agility License: Apache-2.0 AND Vim AND GPL-3.0-or-later AND CC-BY-3.0 -Group: Productivity/Text/Editors URL: https://neovim.io/ Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz Source1: sysinit.vim Source3: suse-spec-template Source4: spec.vim +# This patch is from AlpineLinux, which enables us to reenable neovim on s390x or as an optional flag to build +# This patch only makes the tree-sitter plugins optional, not tree-sitter in itself +Patch0: make-tree-sitter-optional.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -57,28 +58,29 @@ BuildRequires: make BuildRequires: pkgconfig BuildRequires: python-rpm-macros -BuildRequires: tree-sitter -BuildRequires: tree-sitter-c >= 0.21.3 -BuildRequires: tree-sitter-lua -BuildRequires: tree-sitter-markdown -BuildRequires: tree-sitter-python -BuildRequires: tree-sitter-query >= 0.4.0 -BuildRequires: tree-sitter-vim -BuildRequires: tree-sitter-vimdoc >= 3.0.0 BuildRequires: unzip BuildRequires: pkgconfig(libluv) BuildRequires: pkgconfig(libutf8proc) BuildRequires: pkgconfig(libuv) >= 1.42.0 -BuildRequires: pkgconfig(msgpack-c) -BuildRequires: pkgconfig(termkey) BuildRequires: pkgconfig(tree-sitter) >= 0.20.9 -BuildRequires: pkgconfig(unibilium) >= 2.0.0 -BuildRequires: pkgconfig(vterm) >= 0.3.3 %if %{with luajit} BuildRequires: pkgconfig(luajit) %else BuildRequires: lua51-BitOp -BuildRequires: lua51-devel +BuildRequires: pkgconfig(lua5.1) +%endif +BuildRequires: pkgconfig(msgpack-c) +BuildRequires: pkgconfig(termkey) +BuildRequires: pkgconfig(unibilium) >= 2.0.0 +BuildRequires: pkgconfig(vterm) >= 0.3.3 +%if %{without make_optional} +BuildRequires: tree-sitter-c >= 0.21.3 +BuildRequires: tree-sitter-lua +BuildRequires: tree-sitter-markdown +BuildRequires: tree-sitter-python +BuildRequires: tree-sitter-query >= 0.4.0 +BuildRequires: tree-sitter-vim +BuildRequires: tree-sitter-vimdoc >= 3.0.0 %endif Requires: gperf Requires: libvterm0 >= 0.3 @@ -88,7 +90,8 @@ Requires: lua51-luarocks Requires: lua51-luv Requires: lua51-mpack -Requires: tree-sitter +Requires: xdg-utils +%if %{without make_optional} Requires: tree-sitter-c >= 0.21.3 Requires: tree-sitter-lua Requires: tree-sitter-markdown @@ -96,7 +99,7 @@ Requires: tree-sitter-query >= 0.4.0 Requires: tree-sitter-vim Requires: tree-sitter-vimdoc >= 3.0.0 -Requires: xdg-utils +%endif Recommends: python3-neovim Recommends: wl-clipboard Recommends: xsel @@ -115,7 +118,10 @@ parts of Vim, without compromise, and more. %prep -%autosetup -p1 +%autosetup -N +%if %{with make_optional} +%patch -P0 -p1 +%endif # Remove __DATE__ and __TIME__. BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}') @@ -127,8 +133,6 @@ # set vars to make build reproducible in spite of config/CMakeLists.txt HOSTNAME=OBS USERNAME=OBS -export CFLAGS="%{optflags} -fcommon" -export CXXFLAGS="%{optflags} -fcommon" %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DPREFER_LUA=%{?with_luajit:OFF}%{!?with_luajit:ON} \ -DLUA_PRG=%{_bindir}/%{?with_luajit:luajit}%{!?with_luajit:lua} \ @@ -170,12 +174,14 @@ %fdupes %{buildroot}%{_datadir}/ %find_lang nvim +%if %{without make_optional} # let's make tree-sitter grammars visible to neovim install -d %{buildroot}%{_datadir}/nvim/runtime/parser for i in c lua markdown python query vim vimdoc; do ln -s %{_libdir}/libtree-sitter-$i.so %{buildroot}%{_datadir}/nvim/runtime/parser/$i.so; done ln -s %{_libdir}/libtree-sitter-markdown-inline.so %{buildroot}%{_datadir}/nvim/runtime/parser/markdown_inline.so +%endif # We have to have rpath # https://en.opensuse.org/openSUSE:Packaging_checks ++++++ make-tree-sitter-optional.patch ++++++ From: Jakub Jirutka <ja...@jirutka.cz> Date: Thu, 23 May 2024 20:07:15 +0200 Subject: Fallback to classic syntax highlighting if tree-sitter parser is not available See https://gitlab.alpinelinux.org/alpine/aports/-/issues/16132, https://github.com/neovim/neovim/pull/26824 --- a/runtime/ftplugin/help.lua +++ b/runtime/ftplugin/help.lua @@ -1,5 +1,8 @@ -- use treesitter over syntax (for highlighted code blocks) -vim.treesitter.start() +local ok, _ = pcall(vim.treesitter.start) +if not ok then + print('Note: tree-sitter-vimdoc package is not installed, some features will not work') +end -- add custom highlights for list in `:h highlight-groups` local bufname = vim.fs.normalize(vim.api.nvim_buf_get_name(0)) --- a/runtime/ftplugin/lua.lua +++ b/runtime/ftplugin/lua.lua @@ -1,2 +1,5 @@ -- use treesitter over syntax -vim.treesitter.start() +local ok, _ = pcall(vim.treesitter.start) +if not ok then + print('Note: tree-sitter-lua package is not installed, some features will not work') +end --- a/runtime/ftplugin/query.lua +++ b/runtime/ftplugin/query.lua @@ -9,7 +9,10 @@ -- Do not set vim.b.did_ftplugin = 1 to allow loading of ftplugin/lisp.vim -- use treesitter over syntax -vim.treesitter.start() +local ok, _ = pcall(vim.treesitter.start) +if not ok then + print('Note: tree-sitter-query package is not installed, some features will not work') +end -- set omnifunc vim.bo.omnifunc = 'v:lua.vim.treesitter.query.omnifunc' ++++++ suse-spec-template ++++++ --- /var/tmp/diff_new_pack.hiKRCc/_old 2024-08-16 12:24:02.872024270 +0200 +++ /var/tmp/diff_new_pack.hiKRCc/_new 2024-08-16 12:24:02.876024435 +0200 @@ -38,12 +38,9 @@ %install %make_install -%post -%postun - %files %license LICENSE -%doc README.md ChangeLog +%doc README.md %changelog