From e81cb679d77abe53cfaf4d149b053953db5144c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Malde?= Date: Mon, 18 Oct 2021 19:26:31 +0200 Subject: groups/221.native_packages_dev.group: lua: bump to v5.4.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ørjan Malde --- patches/lua-5.4.3_pre.local.patch | 126 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 patches/lua-5.4.3_pre.local.patch (limited to 'patches/lua-5.4.3_pre.local.patch') diff --git a/patches/lua-5.4.3_pre.local.patch b/patches/lua-5.4.3_pre.local.patch new file mode 100644 index 00000000..7c9314cb --- /dev/null +++ b/patches/lua-5.4.3_pre.local.patch @@ -0,0 +1,126 @@ +diff -ru lua-5.4.3.orig/Makefile lua-5.4.3/Makefile +--- lua-5.4.3.orig/Makefile 2021-03-02 21:04:35.000000000 +0100 ++++ lua-5.4.3/Makefile 2021-10-18 18:33:35.605852816 +0200 +@@ -10,13 +10,14 @@ + # so take care if INSTALL_TOP is not an absolute path. See the local target. + # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. +-INSTALL_TOP= /usr/local +-INSTALL_BIN= $(INSTALL_TOP)/bin +-INSTALL_INC= $(INSTALL_TOP)/include +-INSTALL_LIB= $(INSTALL_TOP)/lib +-INSTALL_MAN= $(INSTALL_TOP)/man/man1 +-INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V ++PREFIX= / ++INSTALL_TOP= $(PREFIX) ++INSTALL_BIN= $(DESTDIR)$(INSTALL_TOP)/bin ++INSTALL_INC= $(DESTDIR)$(INSTALL_TOP)/include/lua$V ++INSTALL_LIB= $(DESTDIR)$(INSTALL_TOP)/lib ++INSTALL_MAN= $(DESTDIR)$(INSTALL_TOP)/man/man1 ++INSTALL_LMOD= $(DESTDIR)$(INSTALL_TOP)/share/lua/$V ++INSTALL_CMOD= $(DESTDIR)$(INSTALL_TOP)/lib/lua/$V + + # How to install. If your install program does not support "-p", then + # you may have to run ranlib on the installed liblua.a. +@@ -54,12 +55,11 @@ + $(PLATS) help test clean: + @cd src && $(MAKE) $@ + +-install: dummy +- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) +- cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) +- cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) +- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) +- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) ++install: ++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua luac $(INSTALL_BIN) ++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.la $(INSTALL_LIB) + + uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) +diff -ru lua-5.4.3.orig/src/luaconf.h lua-5.4.3/src/luaconf.h +--- lua-5.4.3.orig/src/luaconf.h 2021-03-15 14:32:52.000000000 +0100 ++++ lua-5.4.3/src/luaconf.h 2021-10-18 18:34:55.701853395 +0200 +@@ -217,7 +217,7 @@ + + #else /* }{ */ + +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/" + #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" + #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" + +diff -ru lua-5.4.3.orig/src/Makefile lua-5.4.3/src/Makefile +--- lua-5.4.3.orig/src/Makefile 2021-02-09 19:47:17.000000000 +0100 ++++ lua-5.4.3/src/Makefile 2021-10-18 19:07:15.598332456 +0200 +@@ -7,8 +7,8 @@ + PLAT= guess + + CC= gcc -std=gnu99 +-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS) +-LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) ++CFLAGS ?= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS) ++LDFLAGS ?= $(SYSLDFLAGS) $(MYLDFLAGS) + LIBS= -lm $(SYSLIBS) $(MYLIBS) + + AR= ar rcu +@@ -50,7 +50,8 @@ + # Targets start here. + default: $(PLAT) + +-all: $(ALL_T) ++#all: $(ALL_T) ++all: gentoo_all + + o: $(ALL_O) + +@@ -60,10 +61,10 @@ + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) ++origin$(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) ++origin$(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + + test: +@@ -220,3 +221,33 @@ + lobject.h ltm.h lzio.h + + # (end of Makefile) ++ ++LIBTOOL = /usr/bin/libtool --quiet --tag=CC ++LIB_VERSION = 9:3:4 ++RPATH = /lib ++V = 5.4 ++R = $V.3 ++ ++# The following rules use libtool for compiling and linking in order to ++# provide shared library support. ++ ++LIB_NAME = liblua.la ++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) ++ ++%.lo %.o: %.c ++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< ++ ++$(LIB_NAME): $(LIB_OBJS) ++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ ++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) ++ ++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS) ++ ++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME) ++ ++gentoo_clean: ++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac ++ ++gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T) -- cgit v1.2.3