From 1cf7490d0c0a4280e43faaf5bf9a8c9818065510 Mon Sep 17 00:00:00 2001 From: Rmys Date: Thu, 29 Dec 2022 23:40:19 +0300 Subject: [PATCH] lua-5.4.4 --- programming/language/lua/actions.py | 8 +- .../language/lua/files/liblua.so.patch | 129 +++++++++++------- programming/language/lua/pspec.xml | 10 +- 3 files changed, 90 insertions(+), 57 deletions(-) diff --git a/programming/language/lua/actions.py b/programming/language/lua/actions.py index b1bbdcca9f..c85712c1f3 100644 --- a/programming/language/lua/actions.py +++ b/programming/language/lua/actions.py @@ -12,8 +12,8 @@ from pisi.actionsapi import get major = ".".join(get.srcVERSION().split(".")[:2]) def setup(): - shelltools.system('sed "s/^R= \$V.4/R= \$V.5/" -i Makefile') - pisitools.dosed("src/Makefile", "^CFLAGS.*$", "CFLAGS=%s -fPIC -DLUA_USE_LINUX -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" % get.CFLAGS()) + # shelltools.system('sed "s/^R= \$V.4/R= \$V.5/" -i Makefile') + pisitools.dosed("src/Makefile", "^CFLAGS.*$", "CFLAGS=%s -fPIC -DLUA_USE_LINUX -DLUA_COMPAT_5_3 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" % get.CFLAGS()) pisitools.dosed("src/Makefile", "^MYLDFLAGS.*$", "MYLDFLAGS=%s" % get.LDFLAGS()) pisitools.dosed("lua.pc", "%VER%", "%s" % major) pisitools.dosed("lua.pc", "%REL%", "%s" % get.srcVERSION()) @@ -24,10 +24,12 @@ def build(): def install(): autotools.rawInstall("INSTALL_TOP=%s/usr INSTALL_MAN=%s/usr/share/man/ INSTALL_LIB=%s/usr/lib/ TO_LIB='liblua.so liblua.so.%s liblua.so.%s'" % (get.installDIR(), get.installDIR(), get.installDIR(), major, get.srcVERSION())) + pisitools.dosym("/usr/lib/liblua.so.5.4.4", "/usr/lib/liblua.so.5.3") + #pisitools.insinto("/usr/lib", "src/liblua.so*") pisitools.insinto("/usr/lib/pkgconfig", "lua.pc") - pisitools.insinto("/usr/lib/pkgconfig", "lua.pc", "lua5.3.pc") + pisitools.insinto("/usr/lib/pkgconfig", "lua.pc", "lua5.4.pc") #free directory pisitools.removeDir("usr/lib/lua/") diff --git a/programming/language/lua/files/liblua.so.patch b/programming/language/lua/files/liblua.so.patch index f9e24f3285..d7413ae36b 100644 --- a/programming/language/lua/files/liblua.so.patch +++ b/programming/language/lua/files/liblua.so.patch @@ -1,60 +1,83 @@ -diff --git a/Makefile b/Makefile -index 7fa91c8..dccf485 100644 ---- a/Makefile -+++ b/Makefile +Submitted By: Xi Ruoyao +Date: 2022-09-16 +Initial Package Version: 5.4.4 +Upstream Status: Rejected +Origin: Arch Linux, with some modifications +Description: 2020-06-30 renodr: + Creates a shared liblua library, as well as + removes optimization since it causes SIGBUS errors, + and sets the search path to /usr from /usr/local. + The initial version of this patch was created by + Igor Zivkovic, before being rediffed for 5.4.0 by + myself with some modifications made. + 2022-09-16 xry111: + Remove an extra newline before $(MYLDFLAGS). + MYLDFLAGS is empty by default so it does not break + BLFS build, but it may break a custom build with + tuning or hardening. + +diff -Naurp lua-5.4.0.orig/Makefile lua-5.4.0/Makefile +--- lua-5.4.0.orig/Makefile 2020-04-15 07:55:07.000000000 -0500 ++++ lua-5.4.0/Makefile 2020-06-30 13:22:00.997938585 -0500 @@ -52,7 +52,7 @@ R= $V.0 all: $(PLAT) - - $(PLATS) clean: -- cd src && $(MAKE) $@ -+ cd src && $(MAKE) $@ V=$(V) R=$(R) - - test: dummy - src/lua -v -diff --git a/src/Makefile b/src/Makefile -index 2e7a412..fa5769f 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -29,6 +29,7 @@ MYOBJS= - PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris - - LUA_A= liblua.a -+LUA_SO= liblua.so - CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ - lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ - ltm.o lundump.o lvm.o lzio.o -@@ -43,7 +44,7 @@ LUAC_T= luac - LUAC_O= luac.o - - ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) --ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) -+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) - ALL_A= $(LUA_A) - - # Targets start here. -@@ -59,6 +60,12 @@ $(LUA_A): $(BASE_O) - $(AR) $@ $(BASE_O) - $(RANLIB) $@ - -+$(LUA_SO): $(CORE_O) $(LIB_O) -+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) -+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) -+ ln -sf $(LUA_SO).$(R) $(LUA_SO) -+ -+ - $(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) - -diff --git a/src/luaconf.h b/src/luaconf.h -index fd28d21..e2662cc 100644 ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -175,7 +175,7 @@ - + + $(PLATS) help test clean: +- @cd src && $(MAKE) $@ ++ @cd src && $(MAKE) $@ V=$(V) R=$(R) + + install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) +diff -Naurp lua-5.4.0.orig/src/luaconf.h lua-5.4.0/src/luaconf.h +--- lua-5.4.0.orig/src/luaconf.h 2020-06-18 09:25:54.000000000 -0500 ++++ lua-5.4.0/src/luaconf.h 2020-06-30 13:24:59.294932289 -0500 +@@ -227,7 +227,7 @@ + #else /* }{ */ - + -#define LUA_ROOT "/usr/local/" +#define LUA_ROOT "/usr/" #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" - #define LUA_PATH_DEFAULT \ + +diff -Naurp lua-5.4.0.orig/src/Makefile lua-5.4.0/src/Makefile +--- lua-5.4.0.orig/src/Makefile 2020-04-15 08:00:29.000000000 -0500 ++++ lua-5.4.0/src/Makefile 2020-06-30 13:24:15.746933827 -0500 +@@ -7,7 +7,7 @@ + PLAT= guess + + CC= gcc -std=gnu99 +-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS) ++CFLAGS= -fPIC -O0 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1 $(SYSCFLAGS) $(MYCFLAGS) + LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) + LIBS= -lm $(SYSLIBS) $(MYLIBS) + +@@ -33,6 +33,7 @@ CMCFLAGS= -Os + PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -44,7 +45,7 @@ LUAC_T= luac + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -60,6 +61,11 @@ $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,--soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + diff --git a/programming/language/lua/pspec.xml b/programming/language/lua/pspec.xml index bdf3e33ee4..121066f6cb 100644 --- a/programming/language/lua/pspec.xml +++ b/programming/language/lua/pspec.xml @@ -10,9 +10,10 @@ LGPLv2 library + lua A light-weight programming language lua is a powerful light-weight programming language designed for extending applications. - http://www.lua.org/ftp/lua-5.3.6.tar.gz + http://www.lua.org/ftp/lua-5.4.4.tar.gz lua.pc @@ -54,6 +55,13 @@ + + 2022-12-28 + 5.4.4 + Version bump. + Mustafa Cinasal + muscnsl@gmail.com + 2021-10-05 5.3.6