From c90bf7d30dc7d61605b5a5b9b690668ddd677f5a6dea8be704764b6045743998 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 19 May 2020 16:49:05 +0000 Subject: [PATCH] - For compatibility with Leap 15.2 add libuv-compat.patch (applied conditionally only on the appropriate distribution), which works around too old version of libuv on Leap 15.* by not using UV_FS_COPYFILE_FICLONE flag to uv_fs_copyfile, and not using uv_stream_get_write_queue_size at all. sr#793088 gh#neovim/neovim#12108 OBS-URL: https://build.opensuse.org/package/show/editors/neovim?expand=0&rev=72 --- libuv-compat.patch | 28 ++++++++++++++++++++++++++++ neovim.changes | 10 ++++++++++ neovim.spec | 9 ++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 libuv-compat.patch diff --git a/libuv-compat.patch b/libuv-compat.patch new file mode 100644 index 0000000..32b87da --- /dev/null +++ b/libuv-compat.patch @@ -0,0 +1,28 @@ +--- 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.changes b/neovim.changes index cd728de..f7ca77e 100644 --- a/neovim.changes +++ b/neovim.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue May 19 16:42:50 UTC 2020 - Matej Cepl + +- For compatibility with Leap 15.2 add libuv-compat.patch + (applied conditionally only on the appropriate distribution), + which works around too old version of libuv on Leap 15.* + by not using UV_FS_COPYFILE_FICLONE flag to uv_fs_copyfile, + and not using uv_stream_get_write_queue_size at all. + sr#793088 gh#neovim/neovim#12108 + ------------------------------------------------------------------- Mon Apr 6 11:12:59 UTC 2020 - Matej Cepl diff --git a/neovim.spec b/neovim.spec index 168fe95..b5a2150 100644 --- a/neovim.spec +++ b/neovim.spec @@ -32,6 +32,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 BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: fdupes @@ -90,7 +93,11 @@ parts of Vim, without compromise, and more. %prep %setup -q -%autopatch -p1 +%patch0 -p1 +%patch1 -p1 +%if 0%{?suse_version} == 1500 +%patch2 -p1 +%endif # Remove __DATE__ and __TIME__. BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}')