SHA256
1
0
forked from pool/neovim

Accepting request 369390 from home:Ronis_BR

Add reference to the patches as per psmt request.

OBS-URL: https://build.opensuse.org/request/show/369390
OBS-URL: https://build.opensuse.org/package/show/editors/neovim?expand=0&rev=2
This commit is contained in:
Dirk Stoecker 2016-03-14 16:31:32 +00:00 committed by Git OBS Bridge
parent 87c2321107
commit 98c0fc79cb
6 changed files with 253 additions and 4 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f39bcab23457c66ce0d67dcf8029743703f860413db0070f75d4f0ffad27c6c1
size 7584560

3
neovim-0.1.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:549881465eff82454660ae92d857d6ffa22383d45c94c46f3753fd1b0e699247
size 7610804

View File

@ -1,3 +1,40 @@
-------------------------------------------------------------------
Tue Mar 8 13:25:23 UTC 2016 - ronisbr@gmail.com
- Backport two patches that fix translations in Neovim:
* neovim_fix_locale_dir_01.patch
* neovim_fix_locale_dir_02.patch
- Update to version 0.1.2.
- Changelog:
Features:
* ef66249 tabline: Add %[] atom to the tabline, for random
commands on click
* f338ea7 job control: implement jobpid() to get PID of job
* d0d5d17 job control: add 'detach' option to jobstart
* 7ad3f07 Add support for binary numbers
Fixes:
* 291495a regexp_nfa.c: Speed up find_match_text()
* 317d5ca input: Do not set high-bit; preserve ALT modifier.
* 3b7c409 shell: Unquote &shell* options before using them
Notable changes:
* 49b06a8 encoding: Always use "utf-8" as default for
&encoding
* 79a6983 ui: revert "gui_running" hack
Other changes:
* b4b4536 version: semver.org compliance
* c6aa716 reproducible builds: Stop using __{DATE,TIME}__
* 46bd3c0 clipboard: Check $DISPLAY. Prefer xsel. #4150
* f6ecd12 job control: don't kill PTY processes on exit
* 49f0417 clipboard: Detach clipboard helper, so contents is
kept after nvim exit
* 38435e8 python: Add missing I/O methods to RedirectStream
* d26b01d eval: Use better error messages when failing to
dump values
* 62d137c Remove swapsync.
-------------------------------------------------------------------
Fri Jan 22 16:02:49 UTC 2016 - ronisbr@gmail.com

View File

@ -17,7 +17,7 @@
Name: neovim
Version: 0.1.1
Version: 0.1.2
Release: 0
Summary: Vim-fork focused on extensibility and agility
License: Apache-2.0
@ -26,6 +26,10 @@ Url: https://neovim.io/
Source: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: neovim.svg
Source2: neovim.desktop
# PATCH-FIX-UPSTREAM neovim_fix_locale_dir_01.patch gh#neovim/neovim#PR4221 - Install *.mo files correctly.
Patch0: neovim_fix_locale_dir_01.patch
# PATCH-FIX-UPSTREAM neovim_fix_locale_dir_02.patch gh#neovim/neovim#PR4277 - Install *.mo files into the "standard" directory.
Patch1: neovim_fix_locale_dir_02.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
@ -57,6 +61,8 @@ the good parts of Vim, without compromise, and more.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# Remove __DATE__ and __TIME__
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"

View File

@ -0,0 +1,61 @@
From 0690c3358d10efdcc5cbd1ee0cace005ef139c29 Mon Sep 17 00:00:00 2001
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
Date: Wed, 10 Feb 2016 16:45:37 +0900
Subject: [PATCH 1/2] install *.mo files correctly
---
src/nvim/po/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
index 6687918..a660a44 100644
--- a/src/nvim/po/CMakeLists.txt
+++ b/src/nvim/po/CMakeLists.txt
@@ -72,8 +72,8 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
install_helper(
FILES ${moFile}
- DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${name}/LC_MESSAGES
- RENAME nvim.mo)
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/lang/${name}/LC_MESSAGES
+ RENAME vim.mo)
list(APPEND LANGUAGE_MO_FILES ${moFile})
endmacro()
From 81f54f909ec896e65766734e0bd848a3cfa270a2 Mon Sep 17 00:00:00 2001
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
Date: Wed, 10 Feb 2016 21:34:10 +0900
Subject: [PATCH 2/2] set VIMPACKAGE to "nvim"
---
src/nvim/po/CMakeLists.txt | 2 +-
src/nvim/vim.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
index a660a44..d1e08db 100644
--- a/src/nvim/po/CMakeLists.txt
+++ b/src/nvim/po/CMakeLists.txt
@@ -73,7 +73,7 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
install_helper(
FILES ${moFile}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/lang/${name}/LC_MESSAGES
- RENAME vim.mo)
+ RENAME nvim.mo)
list(APPEND LANGUAGE_MO_FILES ${moFile})
endmacro()
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index 5f9785a..762d349 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -30,7 +30,7 @@ Error: configure did not run properly.Check auto/config.log.
/* Can't use "PACKAGE" here, conflicts with a Perl include file. */
#ifndef VIMPACKAGE
-# define VIMPACKAGE "vim"
+# define VIMPACKAGE "nvim"
#endif
#include "nvim/os/os_defs.h" /* bring lots of system header files */

View File

@ -0,0 +1,145 @@
From 1a15cf84c29c984d600f438122edc70be2ac91a1 Mon Sep 17 00:00:00 2001
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
Date: Wed, 17 Feb 2016 23:16:25 +0900
Subject: [PATCH] build: install *.mo into the "standard" directory
Change POROJECT_NAME to 'nvim', and use it as the gettext
domain name. The *.mo files, previously installed as
$runtime/lang/xx/LC_MESSAGES/nvim.mo, are now installed as
$prefix/locale/xx/LC_MESSAGES/nvim.mo.
---
CMakeLists.txt | 2 +-
config/config.h.in | 3 +++
src/nvim/main.c | 8 ++++++--
src/nvim/mbyte.c | 4 ++--
src/nvim/os/env.c | 10 +++++-----
src/nvim/po/CMakeLists.txt | 4 ++--
src/nvim/vim.h | 6 ------
7 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 527a085..acd9dc1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.7)
-project(NEOVIM)
+project(nvim)
# Point CMake at any custom modules we may ship
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
diff --git a/config/config.h.in b/config/config.h.in
index 27705f8..d13e7de 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -12,6 +12,9 @@
#define ARCH_32
#endif
+#define PROJECT_NAME "@PROJECT_NAME@"
+#define LOCALE_INSTALL_DIR "@CMAKE_INSTALL_FULL_LOCALEDIR@"
+
#cmakedefine HAVE__NSGETENVIRON
#cmakedefine HAVE_FD_CLOEXEC
#cmakedefine HAVE_FSEEKO
diff --git a/src/nvim/main.c b/src/nvim/main.c
index d3cdfe3..a2aca65 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -657,6 +657,9 @@ static void init_locale(void)
setlocale(LC_NUMERIC, "C");
# endif
+# ifdef LOCALE_INSTALL_DIR // gnu/linux standard: $prefix/share/locale
+ bindtextdomain(PROJECT_NAME, LOCALE_INSTALL_DIR);
+# else // old vim style: $runtime/lang
{
char_u *p;
@@ -665,11 +668,12 @@ static void init_locale(void)
p = (char_u *)vim_getenv("VIMRUNTIME");
if (p != NULL && *p != NUL) {
vim_snprintf((char *)NameBuff, MAXPATHL, "%s/lang", p);
- bindtextdomain(VIMPACKAGE, (char *)NameBuff);
+ bindtextdomain(PROJECT_NAME, (char *)NameBuff);
}
xfree(p);
- textdomain(VIMPACKAGE);
}
+# endif
+ textdomain(PROJECT_NAME);
TIME_MSG("locale set");
}
#endif
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c
index fdd83f9..f0a2499 100644
--- a/src/nvim/mbyte.c
+++ b/src/nvim/mbyte.c
@@ -571,8 +571,8 @@ char_u * mb_init(void)
#ifdef HAVE_WORKING_LIBINTL
/* GNU gettext 0.10.37 supports this feature: set the codeset used for
* translated messages independently from the current locale. */
- (void)bind_textdomain_codeset(VIMPACKAGE,
- enc_utf8 ? "utf-8" : (char *)p_enc);
+ (void)bind_textdomain_codeset(PROJECT_NAME,
+ enc_utf8 ? "utf-8" : (char *)p_enc);
#endif
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index c180406..10f56b5 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -742,15 +742,15 @@ char_u * home_replace_save(buf_T *buf, char_u *src) FUNC_ATTR_NONNULL_RET
void vim_setenv(const char *name, const char *val)
{
os_setenv(name, val, 1);
- /*
- * When setting $VIMRUNTIME adjust the directory to find message
- * translations to $VIMRUNTIME/lang.
- */
+#ifndef LOCALE_INSTALL_DIR
+ // When setting $VIMRUNTIME adjust the directory to find message
+ // translations to $VIMRUNTIME/lang.
if (*val != NUL && STRICMP(name, "VIMRUNTIME") == 0) {
char *buf = (char *)concat_str((char_u *)val, (char_u *)"/lang");
- bindtextdomain(VIMPACKAGE, buf);
+ bindtextdomain(PROJECT_NAME, buf);
xfree(buf);
}
+#endif
}
diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt
index d1e08db..184c489 100644
--- a/src/nvim/po/CMakeLists.txt
+++ b/src/nvim/po/CMakeLists.txt
@@ -72,8 +72,8 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
install_helper(
FILES ${moFile}
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/lang/${name}/LC_MESSAGES
- RENAME nvim.mo)
+ DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${name}/LC_MESSAGES
+ RENAME ${PROJECT_NAME}.mo)
list(APPEND LANGUAGE_MO_FILES ${moFile})
endmacro()
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index 762d349..545b903 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -27,12 +27,6 @@ Error: configure did not run properly.Check auto/config.log.
# endif
#endif
-
-/* Can't use "PACKAGE" here, conflicts with a Perl include file. */
-#ifndef VIMPACKAGE
-# define VIMPACKAGE "nvim"
-#endif
-
#include "nvim/os/os_defs.h" /* bring lots of system header files */
/// length of a buffer to store a number in ASCII (64 bits binary + NUL)