Hello community, here is the log from the commit of package moonjit for openSUSE:Leap:15.2 checked in at 2020-04-14 14:19:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/moonjit (Old) and /work/SRC/openSUSE:Leap:15.2/.moonjit.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "moonjit" Tue Apr 14 14:19:21 2020 rev:4 rq:791639 version:2.2.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/moonjit/moonjit.changes 2020-03-23 07:13:26.318482140 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.moonjit.new.3248/moonjit.changes 2020-04-14 14:19:21.713201976 +0200 @@ -1,0 +2,6 @@ +Mon Mar 30 12:31:09 UTC 2020 - Matej Cepl <[email protected]> + +- Add moonjit105-string_gsub.patch to fix gsub method, which breaks + other packages (namely neovim). + +------------------------------------------------------------------- New: ---- moonjit105-string_gsub.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ moonjit.spec ++++++ --- /var/tmp/diff_new_pack.x9qncu/_old 2020-04-14 14:19:22.157202308 +0200 +++ /var/tmp/diff_new_pack.x9qncu/_new 2020-04-14 14:19:22.157202308 +0200 @@ -26,6 +26,9 @@ URL: https://github.com/moonjit/moonjit Source0: https://github.com/moonjit/moonjit/archive/%{version}.tar.gz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM moonjit105-string_gsub.patch gh#moonjit/moonjit#105 [email protected] +# fix string_gsub +Patch0: moonjit105-string_gsub.patch BuildRequires: pkgconfig Conflicts: luajit Provides: lua51-luajit @@ -53,6 +56,7 @@ %prep %setup -q -n moonjit-%{version} +%autopatch -p1 # Fix variables sed -i "s,PREFIX= %{_prefix}/local,PREFIX= %{_prefix}," Makefile ++++++ moonjit105-string_gsub.patch ++++++ >From cabe3b3cbddc1d3657af451ab0ed82416117cbc7 Mon Sep 17 00:00:00 2001 From: Francois Perrad <[email protected]> Date: Sun, 26 Jan 2020 14:54:14 +0100 Subject: [PATCH] fix string_gsub see https://github.com/moonjit/moonjit/issues/86 Signed-off-by: Francois Perrad <[email protected]> --- src/lib_string.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib_string.c b/src/lib_string.c index 5e2891a9e..a90e189ba 100644 --- a/src/lib_string.c +++ b/src/lib_string.c @@ -621,7 +621,7 @@ LJLIB_CF(string_gsub) const char *p = luaL_checklstring(L, 2, &lp); int tr = lua_type(L, 3); int max_s = luaL_optint(L, 4, (int)(srcl+1)); - int anchor = (*p == '^') ? (p++, 1) : 0; + int anchor = (*p == '^'); int n = 0; MatchState ms; luaL_Buffer b; @@ -629,6 +629,9 @@ LJLIB_CF(string_gsub) tr == LUA_TFUNCTION || tr == LUA_TTABLE)) lj_err_arg(L, 3, LJ_ERR_NOSFT); luaL_buffinit(L, &b); + if (anchor) { + p++; lp--; /* skip anchor character */ + } ms.L = L; ms.src_init = src; ms.src_end = src+srcl;
