SHA256
1
0
forked from pool/neovim

Accepting request 807386 from editors

- 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/request/show/807386
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/neovim?expand=0&rev=30
This commit is contained in:
Dominique Leuenberger 2020-05-20 16:45:25 +00:00 committed by Git OBS Bridge
commit a3fca23e1d
3 changed files with 46 additions and 1 deletions

28
libuv-compat.patch Normal file
View File

@ -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.

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue May 19 16:42:50 UTC 2020 - Matej Cepl <mcepl@suse.com>
- 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 <mcepl@suse.com>

View File

@ -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}')