From 9aa3d19022c58a690938d10d8e0018838da084b5b6b9a10e43b51325b995f353 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Sat, 14 Jul 2018 05:45:00 +0000 Subject: [PATCH] Accepting request 622507 from home:mimi_vx:branches:editors - update to 8.1.0179 - add u_lua53_on_32bit.patch - fix lua53 support on 32bit * Redundant condition for boundary check OBS-URL: https://build.opensuse.org/request/show/622507 OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=504 --- u_lua53_on_32bit.patch | 101 +++++++++++++++++++++++++++++++++++++++++ vim-8.1.0178.tar.gz | 3 -- vim-8.1.0179.tar.gz | 3 ++ vim.changes | 7 +++ vim.spec | 5 +- 5 files changed, 115 insertions(+), 4 deletions(-) create mode 100644 u_lua53_on_32bit.patch delete mode 100644 vim-8.1.0178.tar.gz create mode 100644 vim-8.1.0179.tar.gz diff --git a/u_lua53_on_32bit.patch b/u_lua53_on_32bit.patch new file mode 100644 index 0000000..ef89160 --- /dev/null +++ b/u_lua53_on_32bit.patch @@ -0,0 +1,101 @@ +From 856aeb0d94f88d93fe1753c02b51ad57edc2f8c5 Mon Sep 17 00:00:00 2001 +From: "K.Takata" +Date: Thu, 5 Jul 2018 23:22:47 +0900 +Subject: [PATCH 1/2] if_lua: Fix coding style + +--- + src/if_lua.c | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/src/if_lua.c b/src/if_lua.c +index df0ef34545..1e3208c862 100644 +--- a/src/if_lua.c ++++ b/src/if_lua.c +@@ -960,7 +960,8 @@ luaV_dict_newindex(lua_State *L) + luaL_error(L, "dict is locked"); + if (key != NULL && *key == NUL) + luaL_error(L, "empty key"); +- if (!lua_isnil(L, 3)) { /* read value? */ ++ if (!lua_isnil(L, 3)) /* read value? */ ++ { + luaV_checktypval(L, 3, &v, "setting dict item"); + if (d->dv_scope == VAR_DEF_SCOPE && v.v_type == VAR_FUNC) + luaL_error(L, "cannot assign funcref to builtin scope"); +@@ -1066,7 +1067,8 @@ luaV_funcref_call(lua_State *L) + + f->args.vval.v_list = list_alloc(); + rettv.v_type = VAR_UNKNOWN; /* as in clear_tv */ +- for (i = 0; i < n; i++) { ++ for (i = 0; i < n; i++) ++ { + luaV_checktypval(L, i + 2, &v, "calling funcref"); + list_append_tv(f->args.vval.v_list, &v); + } +@@ -1519,13 +1521,16 @@ luaV_list(lua_State *L) + else + { + luaV_newlist(L, l); +- if (initarg) { /* traverse table to init dict */ ++ if (initarg) /* traverse table to init list */ ++ { + int notnil, i = 0; + typval_T v; +- do { ++ do ++ { + lua_rawgeti(L, 1, ++i); + notnil = !lua_isnil(L, -1); +- if (notnil) { ++ if (notnil) ++ { + luaV_checktypval(L, -1, &v, "vim.list"); + list_append_tv(l, &v); + } +@@ -1564,7 +1569,8 @@ luaV_dict(lua_State *L) + luaL_error(L, "table has empty key"); + luaV_checktypval(L, -2, &v, "vim.dict"); /* value */ + di = dictitem_alloc(key); +- if (di == NULL || dict_add(d, di) == FAIL) { ++ if (di == NULL || dict_add(d, di) == FAIL) ++ { + vim_free(di); + lua_pushnil(L); + return 1; + +From 7664e9060a6921f248c917e78ad6f4f19e9774b3 Mon Sep 17 00:00:00 2001 +From: "K.Takata" +Date: Thu, 5 Jul 2018 23:23:33 +0900 +Subject: [PATCH 2/2] if_lua: Fix Lua 5.3 on 32-bit systems + +--- + src/if_lua.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/if_lua.c b/src/if_lua.c +index 1e3208c862..e30680941c 100644 +--- a/src/if_lua.c ++++ b/src/if_lua.c +@@ -253,14 +253,23 @@ void (*dll_lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); + void (*dll_lua_pushboolean) (lua_State *L, int b); + void (*dll_lua_pushlightuserdata) (lua_State *L, void *p); + void (*dll_lua_getfield) (lua_State *L, int idx, const char *k); ++#if LUA_VERSION_NUM <= 502 + void (*dll_lua_rawget) (lua_State *L, int idx); + void (*dll_lua_rawgeti) (lua_State *L, int idx, int n); ++#else ++int (*dll_lua_rawget) (lua_State *L, int idx); ++int (*dll_lua_rawgeti) (lua_State *L, int idx, lua_Integer n); ++#endif + void (*dll_lua_createtable) (lua_State *L, int narr, int nrec); + void *(*dll_lua_newuserdata) (lua_State *L, size_t sz); + int (*dll_lua_getmetatable) (lua_State *L, int objindex); + void (*dll_lua_setfield) (lua_State *L, int idx, const char *k); + void (*dll_lua_rawset) (lua_State *L, int idx); ++#if LUA_VERSION_NUM <= 502 + void (*dll_lua_rawseti) (lua_State *L, int idx, int n); ++#else ++void (*dll_lua_rawseti) (lua_State *L, int idx, lua_Integer n); ++#endif + int (*dll_lua_setmetatable) (lua_State *L, int objindex); + int (*dll_lua_next) (lua_State *L, int idx); + /* libs */ diff --git a/vim-8.1.0178.tar.gz b/vim-8.1.0178.tar.gz deleted file mode 100644 index cb28d59..0000000 --- a/vim-8.1.0178.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c6ad6654847bdb35e9a7c417420b0626724e33c2252d816b60e2a7bc9b38b5d -size 13758870 diff --git a/vim-8.1.0179.tar.gz b/vim-8.1.0179.tar.gz new file mode 100644 index 0000000..878e99c --- /dev/null +++ b/vim-8.1.0179.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45f9bb4bee5d75d60caad45c9f5707cd2c1f6a202eb8c343b89f0acf8b369b2e +size 13755618 diff --git a/vim.changes b/vim.changes index f95333d..36e47b9 100644 --- a/vim.changes +++ b/vim.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jul 13 14:10:46 UTC 2018 - mimi.vx@gmail.com + +- update to 8.1.0179 +- add u_lua53_on_32bit.patch - fix lua53 support on 32bit + * Redundant condition for boundary check + ------------------------------------------------------------------- Thu Jul 12 20:01:14 UTC 2018 - mimi.vx@gmail.com diff --git a/vim.spec b/vim.spec index 7b90b76..5f79146 100644 --- a/vim.spec +++ b/vim.spec @@ -17,7 +17,7 @@ %define pkg_version 8.1 -%define patchlevel 0178 +%define patchlevel 0179 %define patchlevel_compact %{patchlevel} %define VIM_SUBDIR vim81 %define site_runtimepath %{_datadir}/vim/site @@ -66,6 +66,8 @@ Patch23: vim-8.0-ttytype-test.patch Patch24: disable-unreliable-tests.patch Patch100: vim73-no-static-libpython.patch Patch101: vim-8.0.1568-defaults.patch +# Patch-FIX-Upstream: Fix build with lua-5.3 on 32bit platforms gh#3157 +Patch102: u_lua53_on_32bit.patch BuildRequires: autoconf BuildRequires: db-devel BuildRequires: fdupes @@ -170,6 +172,7 @@ cp %{SOURCE23} runtime/syntax/apparmor.vim %patch24 -p1 %patch100 -p1 %patch101 -p1 +%patch102 -p1 cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE8} %{SOURCE10} . # Unreliable tests