From 2a0d659db6de247918620d9b80be8d6aa184e71ec3cd4fc4495eb1c528244389 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 9 Jul 2021 16:52:54 +0000 Subject: [PATCH] Accepting request 903892 from home:mcepl:branches:editors - Update to 0.5.0 (FINALLY!!!): This release represents ~4000 commits since v0.4.4, the previous non-maintenance release. Highlights include builtin support for LSP, new APIs for extended marks (with byte resolution tracking of changes) and buffer decorations, as well as vast improvements to lua as a plugin and configuration language. Experimental support for tree-sitter as a syntax engine is also included, building on the new core APIs for byte tracking and decorations. There is also very visible shift towards using more of Lua. The full list of all changes is truly huge, the best list is the 0.5.0 commit message on https://github.com/neovim/neovim/commit/a5ac2f45ff84. OBS-URL: https://build.opensuse.org/request/show/903892 OBS-URL: https://build.opensuse.org/package/show/editors/neovim?expand=0&rev=85 --- libuv-compat.patch | 28 --------------- neovim-0.1.7-bitop.patch | 13 ++++--- neovim-0.4.4-findlua54.patch | 32 ----------------- neovim-0.4.4.tar.gz | 3 -- neovim-0.5.0.tar.gz | 3 ++ neovim.changes | 18 ++++++++++ neovim.patch | 6 +++- neovim.spec | 61 +++++++++++++++------------------ vim7188-fix-netrw-command.patch | 14 ++++---- 9 files changed, 69 insertions(+), 109 deletions(-) delete mode 100644 libuv-compat.patch delete mode 100644 neovim-0.4.4-findlua54.patch delete mode 100644 neovim-0.4.4.tar.gz create mode 100644 neovim-0.5.0.tar.gz diff --git a/libuv-compat.patch b/libuv-compat.patch deleted file mode 100644 index 32b87da..0000000 --- a/libuv-compat.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/nvim/fileio.c -+++ b/src/nvim/fileio.c -@@ -62,6 +62,11 @@ - #define BUFSIZE 8192 /* size of normal write buffer */ - #define SMBUFSIZE 256 /* size of emergency write buffer */ - -+// For compatibility with libuv < 1.20.0 (tested on 1.18.0) -+#ifndef UV_FS_COPYFILE_FICLONE -+#define UV_FS_COPYFILE_FICLONE 0 -+#endif -+ - // - // The autocommands are stored in a list for each event. - // Autocommands for the same pattern, that are consecutive, are joined ---- a/src/nvim/event/stream.c -+++ b/src/nvim/event/stream.c -@@ -16,6 +16,11 @@ - # include "event/stream.c.generated.h" - #endif - -+// For compatbility with libuv < 1.19.0 (tested on 1.18.0) -+#if UV_VERSION_MINOR < 19 -+#define uv_stream_get_write_queue_size(stream) stream->write_queue_size -+#endif -+ - /// Sets the stream associated with `fd` to "blocking" mode. - /// - /// @return `0` on success, or libuv error code on failure. diff --git a/neovim-0.1.7-bitop.patch b/neovim-0.1.7-bitop.patch index 668685f..5f3eda4 100644 --- a/neovim-0.1.7-bitop.patch +++ b/neovim-0.1.7-bitop.patch @@ -1,6 +1,11 @@ +--- + CMakeLists.txt | 2 +- + src/nvim/ex_cmds.lua | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -488,7 +488,7 @@ endforeach() +@@ -517,7 +517,7 @@ endforeach() # Find Lua interpreter include(LuaHelpers) @@ -8,12 +13,12 @@ +set(LUA_DEPENDENCIES lpeg mpack bit32) if(NOT LUA_PRG) foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua) - # If LUA_PRG is set find_program() will not search + unset(_CHECK_LUA_PRG CACHE) --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -1,4 +1,4 @@ -local bit = require 'bit' +local bit = require 'bit32' - -- Description of the values below is contained in ex_cmds_defs.h file. - local RANGE = 0x001 + local module = {} + diff --git a/neovim-0.4.4-findlua54.patch b/neovim-0.4.4-findlua54.patch deleted file mode 100644 index 1a3e0e0..0000000 --- a/neovim-0.4.4-findlua54.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 26a47f998c4884df7ba96a0f3ad6b268a832ae10 Mon Sep 17 00:00:00 2001 -From: Michel Alexandre Salim -Date: Mon, 31 Aug 2020 18:11:02 -0700 -Subject: [PATCH] Patch FindLua to support locating Lua 5.4 - -Lua 5.4 is out, and will be shipped with Fedora 33. - -Since there are architectures where LuaJIT is not available, being able -to compile against Lua 5.4 is needed to get Neovim to build for this -release. - -Signed-off-by: Michel Alexandre Salim ---- - cmake/FindLua.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/FindLua.cmake b/cmake/FindLua.cmake -index b669a49f2..7ba13e1f5 100644 ---- a/cmake/FindLua.cmake -+++ b/cmake/FindLua.cmake -@@ -42,7 +42,7 @@ unset(_lua_append_versions) - - # this is a function only to have all the variables inside go away automatically - function(_lua_set_version_vars) -- set(LUA_VERSIONS5 5.3 5.2 5.1 5.0) -+ set(LUA_VERSIONS5 5.4 5.3 5.2 5.1 5.0) - - if (Lua_FIND_VERSION_EXACT) - if (Lua_FIND_VERSION_COUNT GREATER 1) --- -2.26.2 - diff --git a/neovim-0.4.4.tar.gz b/neovim-0.4.4.tar.gz deleted file mode 100644 index 029b31c..0000000 --- a/neovim-0.4.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2f76aac59363677f37592e853ab2c06151cca8830d4b3fe4675b4a52d41fc42c -size 9558246 diff --git a/neovim-0.5.0.tar.gz b/neovim-0.5.0.tar.gz new file mode 100644 index 0000000..6ab14cb --- /dev/null +++ b/neovim-0.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2294caa9d2011996499fbd70e4006e4ef55db75b99b6719154c09262e23764ef +size 10337976 diff --git a/neovim.changes b/neovim.changes index 30622a2..ebeffcb 100644 --- a/neovim.changes +++ b/neovim.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sat Jul 3 16:41:13 UTC 2021 - Matej Cepl + +- Update to 0.5.0 (FINALLY!!!): + This release represents ~4000 commits since v0.4.4, the + previous non-maintenance release. Highlights include builtin + support for LSP, new APIs for extended marks (with byte + resolution tracking of changes) and buffer decorations, as + well as vast improvements to lua as a plugin and configuration + language. Experimental support for tree-sitter as a syntax + engine is also included, building on the new core APIs for byte + tracking and decorations. There is also very visible shift + towards using more of Lua. + + The full list of all changes is truly huge, the + best list is the 0.5.0 commit message on + https://github.com/neovim/neovim/commit/a5ac2f45ff84. + ------------------------------------------------------------------- Mon May 31 06:00:27 UTC 2021 - Matej Cepl diff --git a/neovim.patch b/neovim.patch index 90257e1..e228e15 100644 --- a/neovim.patch +++ b/neovim.patch @@ -1,6 +1,10 @@ +--- + third-party/cmake/BuildLuarocks.cmake | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + --- a/third-party/cmake/BuildLuarocks.cmake +++ b/third-party/cmake/BuildLuarocks.cmake -@@ -75,7 +75,9 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILI +@@ -93,7 +93,9 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILI BuildLuarocks( CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure --prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS} diff --git a/neovim.spec b/neovim.spec index 3674546..f422fc8 100644 --- a/neovim.spec +++ b/neovim.spec @@ -16,6 +16,7 @@ # +%define luv_min_ver 1.30.0 # Luajit not available on all platforms %ifarch %{arm} %{ix86} x86_64 %bcond_without luajit @@ -34,11 +35,8 @@ %define luaver_nopoint 53 %endif %endif - -%define luv_min_ver 1.30.0 - Name: neovim -Version: 0.4.4 +Version: 0.5.0 Release: 0 Summary: Vim-fork focused on extensibility and agility License: Apache-2.0 AND Vim @@ -53,14 +51,9 @@ Source99: neovim-rpmlintrc Patch0: neovim.patch # PATCH-FIX-OPENSUSE neovim-0.1.7-bitop.patch mcepl@cepl.eu build with old Lua with external bit module Patch1: neovim-0.1.7-bitop.patch -# PATCH-FIX-SLE libuv-compat.patch sr#793088 gh#neovim/neovim#12108 mcepl@suse.com -# works around too old version of libuv on Leap 15.* -Patch2: libuv-compat.patch -# PATCH-FIx-UPSTREAM https://github.com/neovim/neovim/pull/12820 -Patch3: neovim-0.4.4-findlua54.patch # PATCH-FIX-UPSTREAM vim7188-fix-netrw-command.patch gh#vim/vim#4738 mcepl@suse.com # make gx in netrw working again -Patch4: vim7188-fix-netrw-command.patch +Patch2: vim7188-fix-netrw-command.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -76,7 +69,21 @@ BuildRequires: libtool BuildRequires: libuv-devel BuildRequires: libvterm-devel >= 0.1 BuildRequires: lua-macros - +BuildRequires: make +BuildRequires: msgpack-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: tree-sitter-devel +BuildRequires: unibilium-devel +BuildRequires: unzip +BuildRequires: update-desktop-files +Requires: gperf +Requires: libvterm0 >= 0.1 +Requires: python3-neovim +Requires(post): desktop-file-utils +Requires(postun):desktop-file-utils +# XSel provides access to the system clipboard +Recommends: xsel %if %{with luajit} # luajit implements version 5.1 of the lua language spec, so it needs the # compat versions of libs. @@ -101,20 +108,6 @@ BuildRequires: lua%{luaver_nopoint}-compat-5.3 Requires: lua%{luaver_nopoint}-compat-5.3 %endif %endif -BuildRequires: make -BuildRequires: msgpack-devel -BuildRequires: pkgconfig -BuildRequires: python-rpm-macros -BuildRequires: unibilium-devel -BuildRequires: unzip -BuildRequires: update-desktop-files -Requires: gperf -Requires: libvterm0 >= 0.1 -Requires: python3-neovim -Requires(post): desktop-file-utils -Requires(postun):desktop-file-utils -# XSel provides access to the system clipboard -Recommends: xsel %if 0%{?suse_version} < 1330 BuildRequires: hicolor-icon-theme Requires(post): gtk3-tools @@ -136,14 +129,7 @@ parts of Vim, without compromise, and more. %define vimplugin_dir %{_datadir}/vim/site %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%if 0%{?suse_version} == 1500 -%patch2 -p1 -%endif -%patch3 -p1 -%patch4 -p1 +%autosetup -p1 # Remove __DATE__ and __TIME__. BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}') @@ -171,7 +157,7 @@ export CXXFLAGS="%{optflags} -fcommon" -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DLIBLUV_LIBRARY=%{lua_archdir}/luv.so \ -DLIBLUV_INCLUDE_DIR:PATH=%{lua_incdir} -make %{?_smp_mflags} VERBOSE=1 +%make_build popd @@ -189,6 +175,12 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/nvim/template.spec %endif %suse_update_desktop_file -r nvim ConsoleOnly Application Utility TextEditor +install -d -m0755 %{buildroot}%{_datadir}/pixmaps +install -m0644 runtime/nvim.png %{buildroot}%{_datadir}/pixmaps/nvim.png + +# Fix exec bits +find %{buildroot}%{_datadir} \( -name \*.bat -o -name \*.awk \) \ + -print -exec chmod -x '{}' \; # vim/site directories for plugins shared with vim mkdir -p %{buildroot}%{vimplugin_dir}/{after,after/syntax,autoload,colors,doc,ftdetect,plugin,syntax} @@ -219,6 +211,7 @@ export NO_BRP_CHECK_RPATH=true %{_datadir}/nvim/ %{_datadir}/applications/nvim.desktop %{_datadir}/pixmaps/nvim.png +%{_datadir}/icons/hicolor/*/apps/nvim.png %{_mandir}/man1/nvim.1%{?ext_man} %dir %{_sysconfdir}/nvim %config(noreplace) %{_sysconfdir}/nvim/sysinit.vim diff --git a/vim7188-fix-netrw-command.patch b/vim7188-fix-netrw-command.patch index 4854066..cf5597c 100644 --- a/vim7188-fix-netrw-command.patch +++ b/vim7188-fix-netrw-command.patch @@ -17,9 +17,9 @@ remote URL. --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim -@@ -5178,6 +5178,12 @@ fun! netrw#BrowseX(fname,remote) - " call Dret("(netrw#BrowseX) did gf instead") +@@ -5220,6 +5220,12 @@ fun! netrw#BrowseX(fname,remote) endif + " call Decho("not a local file nor a webpage request",'~'.expand("")) + if exists("g:netrw_browsex_viewer") && exists("g:netrw_browsex_support_remote") && !g:netrw_browsex_support_remote + let remote = a:remote @@ -30,7 +30,7 @@ remote URL. let ykeep = @@ let screenposn = winsaveview() " call Decho("saving posn to screenposn<".string(screenposn).">",'~'.expand("")) -@@ -5222,9 +5228,9 @@ fun! netrw#BrowseX(fname,remote) +@@ -5264,9 +5270,9 @@ fun! netrw#BrowseX(fname,remote) endif " call Decho("exten<".exten.">",'~'.expand("")) @@ -42,7 +42,7 @@ remote URL. setl bh=delete call netrw#NetRead(3,a:fname) " attempt to rename tempfile -@@ -5246,7 +5252,7 @@ fun! netrw#BrowseX(fname,remote) +@@ -5288,7 +5294,7 @@ fun! netrw#BrowseX(fname,remote) let fname= s:netrw_tmpfile endif else @@ -51,7 +51,7 @@ remote URL. let fname= a:fname " special ~ handler for local if fname =~ '^\~' && expand("$HOME") != "" -@@ -5378,12 +5384,12 @@ fun! netrw#BrowseX(fname,remote) +@@ -5431,12 +5437,12 @@ fun! netrw#BrowseX(fname,remote) " return to prior buffer (directory listing) " Feb 12, 2008: had to de-activiate removal of " temporary file because it wasn't getting seen. @@ -68,7 +68,7 @@ remote URL. setl noswf --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt -@@ -1504,6 +1504,9 @@ Netrw determines which special handler b +@@ -1510,6 +1510,9 @@ Netrw determines which special handler b If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be used instead (see |netrw_filehandler|). @@ -78,7 +78,7 @@ remote URL. * for Windows 32 or 64, the URL and FileProtocolHandler dlls are used. * for Gnome (with gnome-open): gnome-open is used. * for KDE (with kfmclient) : kfmclient is used -@@ -2601,6 +2604,10 @@ your browsing preferences. (see also: | +@@ -2607,6 +2610,10 @@ your browsing preferences. (see also: | a script/function to handle the given extension. (see |netrw_filehandler|).