Hello community,

here is the log from the commit of package moonjit for openSUSE:Factory checked 
in at 2020-04-04 12:18:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/moonjit (Old)
 and      /work/SRC/openSUSE:Factory/.moonjit.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "moonjit"

Sat Apr  4 12:18:23 2020 rev:5 rq:789857 version:2.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/moonjit/moonjit.changes  2020-03-19 
19:48:55.544136538 +0100
+++ /work/SRC/openSUSE:Factory/.moonjit.new.3248/moonjit.changes        
2020-04-04 12:18:31.223577507 +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.C7yotc/_old  2020-04-04 12:18:34.831580607 +0200
+++ /var/tmp/diff_new_pack.C7yotc/_new  2020-04-04 12:18:34.831580607 +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;

Reply via email to