liblua54: update to 5.4.3

This commit is contained in:
Leonid Pliushch 2021-05-05 12:22:35 +00:00
parent b353fb8769
commit 00641c1b69
No known key found for this signature in database
GPG Key ID: 45F2964132545795
4 changed files with 20 additions and 26 deletions

View File

@ -28,7 +28,7 @@ diff -uNr lua-5.4.1/Makefile lua-5.4.1.mod/Makefile
+# Lua version and release.
+V= 5.4
+R= $V.2
+R= $V.3
+
# What to install.
TO_BIN= lua luac
@ -39,7 +39,7 @@ diff -uNr lua-5.4.1/Makefile lua-5.4.1.mod/Makefile
-# Lua version and release.
-V= 5.4
-R= $V.2
-R= $V.3
-
# Targets start here.
all: $(PLAT)

View File

@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.lua.org/
TERMUX_PKG_DESCRIPTION="Shared library for the Lua interpreter"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=5.4.2
TERMUX_PKG_VERSION=5.4.3
TERMUX_PKG_SRCURL=https://www.lua.org/ftp/lua-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=11570d97e9d7303c0a59567ed1ac7c648340cd0db10d5fd594c09223ef2f524f
TERMUX_PKG_SHA256=f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb
TERMUX_PKG_EXTRA_MAKE_ARGS=linux
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_BREAKS="liblua-dev"

View File

@ -1,15 +0,0 @@
--- ./src/loslib.c.orig 2019-06-07 23:19:03.666887235 +0000
+++ ./src/loslib.c 2019-06-07 23:19:47.295164822 +0000
@@ -112,10 +112,10 @@
#include <unistd.h>
-#define LUA_TMPNAMBUFSIZE 32
+#define LUA_TMPNAMBUFSIZE 128
#if !defined(LUA_TMPNAMTEMPLATE)
-#define LUA_TMPNAMTEMPLATE "/tmp/lua_XXXXXX"
+#define LUA_TMPNAMTEMPLATE "@TERMUX_PREFIX@/tmp/lua_XXXXXX"
#endif
#define lua_tmpnam(b,e,s) { \

View File

@ -1,22 +1,31 @@
--- ./src/loslib.c 2017-11-18 15:51:35.425137997 +0000
+++ ../loslib.c 2017-11-18 16:20:36.202578294 +0000
@@ -118,8 +118,8 @@
#define LUA_TMPNAMTEMPLATE "@TERMUX_PREFIX@/tmp/lua_XXXXXX"
diff -uNr lua-5.4.3/src/loslib.c lua-5.4.3.mod/src/loslib.c
--- lua-5.4.3/src/loslib.c 2021-03-15 13:32:51.000000000 +0000
+++ lua-5.4.3.mod/src/loslib.c 2021-05-05 12:18:56.029456408 +0000
@@ -114,14 +114,14 @@
#include <unistd.h>
-#define LUA_TMPNAMBUFSIZE 32
+#define LUA_TMPNAMBUFSIZE 256
#if !defined(LUA_TMPNAMTEMPLATE)
-#define LUA_TMPNAMTEMPLATE "/tmp/lua_XXXXXX"
+#define LUA_TMPNAMTEMPLATE "@TERMUX_PREFIX@/tmp/lua_XXXXXX"
#endif
-#define lua_tmpnam(b,e) { \
- strcpy(b, LUA_TMPNAMTEMPLATE); \
+#define lua_tmpnam(b,e,s) { \
+#define lua_tmpnam(b,e,s) { \
+ strncpy(b, LUA_TMPNAMTEMPLATE, s); \
e = mkstemp(b); \
if (e != -1) close(e); \
e = (e == -1); }
@@ -166,7 +166,7 @@
@@ -169,7 +169,7 @@
static int os_tmpname (lua_State *L) {
char buff[LUA_TMPNAMBUFSIZE];
int err;
- lua_tmpnam(buff, err);
+ lua_tmpnam(buff, err, LUA_TMPNAMBUFSIZE - 1);
if (err)
if (l_unlikely(err))
return luaL_error(L, "unable to generate a unique filename");
lua_pushstring(L, buff);