diff --git a/attrib_test.patch b/attrib_test.patch index d5fd3be..46c9817 100644 --- a/attrib_test.patch +++ b/attrib_test.patch @@ -1,3 +1,7 @@ +--- + testes/attrib.lua | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + --- a/testes/attrib.lua +++ b/testes/attrib.lua @@ -269,7 +269,7 @@ local p = "" -- On Mac OS X, redefine diff --git a/lua-build-system.patch b/lua-build-system.patch index d957a1d..288b7d9 100644 --- a/lua-build-system.patch +++ b/lua-build-system.patch @@ -4,9 +4,9 @@ Subject: build system --- Makefile | 22 +++++++++++----------- - src/Makefile | 42 ++++++++++++++++++++++++------------------ + src/Makefile | 43 +++++++++++++++++++++++++------------------ src/luaconf.h | 2 +- - 3 files changed, 36 insertions(+), 30 deletions(-) + 3 files changed, 37 insertions(+), 30 deletions(-) --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ Subject: build system TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp -TO_LIB= liblua.a -TO_MAN= lua.1 luac.1 -+TO_LIB= liblua$(V).la ++TO_LIB= liblua$(V).a +TO_MAN= lua$(V).1 luac$(V).1 # Lua version and release. @@ -76,7 +76,11 @@ Subject: build system LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) LIBS= -lm $(SYSLIBS) $(MYLIBS) -@@ -22,25 +22,40 @@ SYSLIBS= +@@ -19,28 +19,44 @@ UNAME= uname + SYSCFLAGS= + SYSLDFLAGS= + SYSLIBS= ++LIBDIR=/usr/lib MYCFLAGS= MYLDFLAGS= @@ -121,13 +125,13 @@ Subject: build system LUAC_O= luac.o ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) -@@ -57,17 +72,16 @@ o: $(ALL_O) +@@ -57,17 +73,16 @@ o: $(ALL_O) a: $(ALL_A) $(LUA_A): $(BASE_O) - $(AR) $@ $(BASE_O) - $(RANLIB) $@ -+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -shared -rpath /usr/lib -version-info 9:0:4 -o $(LUA_A) ++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -shared -rpath $(LIBDIR) -version-info 9:0:4 -o $(LUA_A) $(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) @@ -135,7 +139,7 @@ Subject: build system $(LUAC_T): $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LUA_A) luac.lo -o $@ ++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LUA_A) luac.lo -lm -o $@ test: - ./$(LUA_T) -v @@ -143,7 +147,7 @@ Subject: build system clean: $(RM) $(ALL_T) $(ALL_O) -@@ -147,14 +161,6 @@ SunOS solaris: +@@ -147,14 +162,6 @@ SunOS solaris: .PHONY: all $(PLATS) help test clean default o a depend echo # Compiler modules may use special flags. diff --git a/lua54.changes b/lua54.changes index a56d85d..50ac443 100644 --- a/lua54.changes +++ b/lua54.changes @@ -10,6 +10,7 @@ Sun Apr 30 12:22:03 UTC 2023 - Matej Cepl - luabugs10.patch - luabugs11.patch - luabugs2.patch + - luabugs3.patch - luabugs4.patch - luabugs5.patch - luabugs6.patch diff --git a/lua54.spec b/lua54.spec index 5d7e3db..65e91d3 100644 --- a/lua54.spec +++ b/lua54.spec @@ -44,9 +44,6 @@ Patch1: attrib_test.patch Patch2: files_test.patch Patch3: main_test.patch Patch6: shared_link.patch -# PATCH-FIX-UPSTREAM luabugsX.patch https://www.lua.org/bugs.html#5.4.4-X -# Patch9: luabugs3.patch -# %if "%{flavor}" == "test" BuildRequires: lua54 %else @@ -155,7 +152,7 @@ cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC%{major_version} 1/' > doc/luac%{major_ %build sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h make linux-readline %{_smp_mflags} VERBOSE=1 -C src \ - CC="cc" \ + CC="cc" LIBDIR="%{_libdir}" \ MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_COMPAT_MODULE" \ V=%{major_version} \ LIBTOOL="libtool --quiet" @@ -164,7 +161,8 @@ make linux-readline %{_smp_mflags} VERBOSE=1 -C src \ %make_install \ LIBTOOL="libtool --quiet" \ INSTALL_TOP="%{buildroot}%{_prefix}" \ - INSTALL_LIB="%{buildroot}%{_libdir}" + INSTALL_LIB="%{buildroot}%{_libdir}" \ + INSTALL_MAN="%{buildroot}%{_mandir}/man1" find %{buildroot} -type f -name "*.la" -delete -print @@ -194,6 +192,14 @@ for file in lua luac ; do ln -sf "%{_sysconfdir}/alternatives/${file}.1%{ext_man}" "%{buildroot}%{_mandir}/man1/${file}.1%{ext_man}" done +# lrwxrwxrwx. 1 abuild abuild 27 May 3 21:50 liblua.so -> /etc/alternatives/liblua.so +# lrwxrwxrwx. 1 abuild abuild 18 May 3 21:50 liblua.so.5.4 -> liblua5.4.so.5.4.0 +# -rw-r--r--. 1 abuild abuild 30352 May 3 21:50 liblua5.4.a +# lrwxrwxrwx. 1 abuild abuild 18 May 3 21:50 liblua5.4.so.0 -> liblua5.4.so.5.4.0 +# lrwxrwxrwx. 1 abuild abuild 18 May 3 21:50 liblua5.4.so.5.4 -> liblua5.4.so.5.4.0 +# drwxr-xr-x. 1 abuild abuild 6 May 3 21:50 lua +# drwxr-xr-x. 1 abuild abuild 30 May 3 21:50 pkgconfig + # Compat link with older unprefixed library and with soname 0 from deb/etc ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.%{major_version} ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.0 diff --git a/luabugs3.patch b/luabugs3.patch deleted file mode 100644 index d963b73..0000000 --- a/luabugs3.patch +++ /dev/null @@ -1,20 +0,0 @@ -From c764ca71a639f5585b5f466bea25dc42b855a4b0 Mon Sep 17 00:00:00 2001 -From: Roberto Ierusalimschy -Date: Mon, 25 Apr 2022 14:42:51 -0300 -Subject: [PATCH] Bug: Wrong code generation in bitwise operations - ---- - src/lcode.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/lcode.c -+++ b/src/lcode.c -@@ -1531,7 +1531,7 @@ static void codecommutative (FuncState * - static void codebitwise (FuncState *fs, BinOpr opr, - expdesc *e1, expdesc *e2, int line) { - int flip = 0; -- if (e1->k == VKINT) { -+ if (e1->k == VKINT && luaK_exp2K(fs, e1)) { - swapexps(e1, e2); /* 'e2' will be the constant operand */ - flip = 1; - }