mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
lua: add new package with version 5.4
Add new lua version 5.4 required by new version of nmap. Patches are copied from lua 5.3. - Readline patch has to be reworked as lua 5.4 now supports no readline for Linux but still needs some tweaks for macOS and bsd systems. - Patch shared lib required some rework. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
committed by
Josef Schlehofer
parent
c3f21bfc78
commit
da176d58ee
65
lang/lua5.4/patches-host/001-include-version-number.patch
Normal file
65
lang/lua5.4/patches-host/001-include-version-number.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 21 Jun 2019 14:08:38 +0200
|
||||
Subject: [PATCH] include version number
|
||||
|
||||
Including it allows multiple lua versions to coexist.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,7 +12,7 @@ PLAT= guess
|
||||
# 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_INC= $(INSTALL_TOP)/include/lua$V
|
||||
INSTALL_LIB= $(INSTALL_TOP)/lib
|
||||
INSTALL_MAN= $(INSTALL_TOP)/man/man1
|
||||
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
|
||||
@@ -39,10 +39,10 @@ RM= rm -f
|
||||
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
||||
|
||||
# What to install.
|
||||
-TO_BIN= lua luac
|
||||
+TO_BIN= lua$V luac$V
|
||||
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.a
|
||||
+TO_MAN= lua$V.1 luac$V.1
|
||||
|
||||
# Lua version and release.
|
||||
V= 5.4
|
||||
@@ -52,7 +52,7 @@ R= $V.6
|
||||
all: $(PLAT)
|
||||
|
||||
$(PLATS) help test clean:
|
||||
- @cd src && $(MAKE) $@
|
||||
+ @cd src && $(MAKE) $@ V=$V
|
||||
|
||||
install: dummy
|
||||
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -32,15 +32,15 @@ CMCFLAGS=
|
||||
|
||||
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
||||
|
||||
-LUA_A= liblua.a
|
||||
+LUA_A= liblua$V.a
|
||||
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)
|
||||
|
||||
-LUA_T= lua
|
||||
+LUA_T= lua$V
|
||||
LUA_O= lua.o
|
||||
|
||||
-LUAC_T= luac
|
||||
+LUAC_T= luac$V
|
||||
LUAC_O= luac.o
|
||||
|
||||
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
||||
27
lang/lua5.4/patches-host/100-no_readline.patch
Normal file
27
lang/lua5.4/patches-host/100-no_readline.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -126,7 +126,7 @@ c89:
|
||||
@echo ''
|
||||
|
||||
FreeBSD NetBSD OpenBSD freebsd:
|
||||
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc"
|
||||
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX $(if $(USE_READLINE), -DLUA_USE_READLINE) -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc"
|
||||
|
||||
generic: $(ALL)
|
||||
|
||||
@@ -136,13 +136,13 @@ ios:
|
||||
Linux linux: linux-noreadline
|
||||
|
||||
linux-noreadline:
|
||||
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl"
|
||||
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX $(if $(USE_READLINE), -DLUA_USE_READLINE)" SYSLIBS="-Wl,-E -ldl $(if $(USE_READLINE), -lreadline)"
|
||||
|
||||
linux-readline:
|
||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline"
|
||||
|
||||
Darwin macos macosx:
|
||||
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline"
|
||||
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX $(if $(USE_READLINE), -DLUA_USE_READLINE)" SYSLIBS="$(if $(USE_READLINE), -lreadline)"
|
||||
|
||||
mingw:
|
||||
$(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \
|
||||
Reference in New Issue
Block a user