svn commit: r552438 - in head: Mk Mk/Uses lang lang/lua54 lang/lua54/files
Kyle Evans
kevans at FreeBSD.org
Thu Oct 15 17:55:22 UTC 2020
Author: kevans
Date: Thu Oct 15 17:55:20 2020
New Revision: 552438
URL: https://svnweb.freebsd.org/changeset/ports/552438
Log:
[NEW PORT] lang/lua54 - Lua 5.4.1
Highlights for this version:
- new generational mode for garbage collection
- to-be-closed variables
- const variables
- complete list: https://www.lua.org/manual/5.4/readme.html#changes
The Lua Manual can be found here: https://www.lua.org/manual/5.4/
Incompatibilities from the previous version are specifically documented
here: https://www.lua.org/manual/5.4/manual.html#8
Submitted by: Russ Haley <russ haley gmail com>
Co-submitted by: Andrew Gierth <andrew_tao173 riddles org uk>
Differential Revision: https://reviews.freebsd.org/D14709
Added:
head/lang/lua54/
- copied from r552436, head/lang/lua53/
head/lang/lua54/files/extra-patch-libedit-dl (contents, props changed)
head/lang/lua54/files/lua-5.4.pc.in (contents, props changed)
Deleted:
head/lang/lua54/files/extra-patch-assert
head/lang/lua54/files/lua-5.3.pc.in
head/lang/lua54/files/patch-src_lua.c
Modified:
head/Mk/Uses/lua.mk
head/Mk/bsd.default-versions.mk
head/lang/Makefile
head/lang/lua54/Makefile
head/lang/lua54/distinfo
head/lang/lua54/files/patch-src_Makefile
Modified: head/Mk/Uses/lua.mk
==============================================================================
--- head/Mk/Uses/lua.mk Thu Oct 15 17:53:46 2020 (r552437)
+++ head/Mk/Uses/lua.mk Thu Oct 15 17:55:20 2020 (r552438)
@@ -57,7 +57,7 @@ _INCLUDE_USES_LUA_MK= yes
# When adding a version, please keep the comment in
# Mk/bsd.default-versions.mk in sync.
-_LUA_VALID_VERSIONS:= 53 52 51
+_LUA_VALID_VERSIONS:= 54 53 52 51
.if defined(_LUA_EXTRA_VER)
_LUA_VALID_VERSIONS+= ${_LUA_EXTRA_VER}
.endif
Modified: head/Mk/bsd.default-versions.mk
==============================================================================
--- head/Mk/bsd.default-versions.mk Thu Oct 15 17:53:46 2020 (r552437)
+++ head/Mk/bsd.default-versions.mk Thu Oct 15 17:55:20 2020 (r552438)
@@ -67,7 +67,7 @@ LINUX_DEFAULT?= c7
# Please give notice to the Graphics Team (x11 at FreeBSD.org) in advance before
# bumping the LLVM version.
LLVM_DEFAULT?= 90
-# Possible values: 5.1, 5.2, 5.3
+# Possible values: 5.1, 5.2, 5.3, 5.4
LUA_DEFAULT?= 5.2
# Possible values: 5.5, 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.5p, 5.6p, 5.7p, 5.6w, 5.7w
MYSQL_DEFAULT?= 5.7
Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile Thu Oct 15 17:53:46 2020 (r552437)
+++ head/lang/Makefile Thu Oct 15 17:55:20 2020 (r552438)
@@ -168,6 +168,7 @@
SUBDIR += lua51
SUBDIR += lua52
SUBDIR += lua53
+ SUBDIR += lua54
SUBDIR += luajit
SUBDIR += luajit-openresty
SUBDIR += malbolge
Modified: head/lang/lua54/Makefile
==============================================================================
--- head/lang/lua53/Makefile Thu Oct 15 17:47:48 2020 (r552436)
+++ head/lang/lua54/Makefile Thu Oct 15 17:55:20 2020 (r552438)
@@ -1,8 +1,7 @@
-# Created by: GreenDog <fiziologus at gmail.com>
# $FreeBSD$
PORTNAME= lua
-DISTVERSION= 5.3.6
+DISTVERSION= 5.4.1
CATEGORIES= lang
MASTER_SITES= https://www.lua.org/ftp/
PKGNAMESUFFIX= ${LUA_VER_STR}
@@ -12,7 +11,7 @@ COMMENT= Powerful, efficient, lightweight, embeddable
LICENSE= MIT
-USES= lua:core,53
+USES= lua:core,54
USE_LDCONFIG= yes
# Overriding __MAKE_CONF makes sure that we don't re-parse
@@ -41,6 +40,7 @@ LIBS+= -pthread
WITHOUT_NO_STRICT_ALIASING=yes
MAKE_ARGS+= CC="${CC}" \
+ CMCFLAGS="" \
MYCFLAGS="${CPPFLAGS} ${CFLAGS}" \
MYLDFLAGS="${LDFLAGS}" \
MYLIBS="${LIBS}" \
@@ -103,7 +103,7 @@ READLINE_DESC= Use GNU Readline (breaks lcurses)
# Option implementations
APICHECK_CPPFLAGS= -DLUA_USE_APICHECK
-ASSERT_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-assert
+ASSERT_CPPFLAGS= -DLUAI_ASSERT
# EDITNONE currently requires no settings
@@ -113,6 +113,7 @@ LIBEDIT_LIBS= -ledit
LIBEDIT_DL_USES= libedit
LIBEDIT_DL_CPPFLAGS= -DLUA_USE_READLINE_DL
+LIBEDIT_DL_EXTRA_PATCHES=${PATCHDIR}/extra-patch-libedit-dl
READLINE_USES= readline
READLINE_CPPFLAGS= -DLUA_USE_READLINE
Modified: head/lang/lua54/distinfo
==============================================================================
--- head/lang/lua53/distinfo Thu Oct 15 17:47:48 2020 (r552436)
+++ head/lang/lua54/distinfo Thu Oct 15 17:55:20 2020 (r552438)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1601041108
-SHA256 (lua-5.3.6.tar.gz) = fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60
-SIZE (lua-5.3.6.tar.gz) = 303770
+TIMESTAMP = 1602265420
+SHA256 (lua-5.4.1.tar.gz) = 4ba786c3705eb9db6567af29c91a01b81f1c0ac3124fdbf6cd94bdd9e53cca7d
+SIZE (lua-5.4.1.tar.gz) = 353965
Added: head/lang/lua54/files/extra-patch-libedit-dl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/lua54/files/extra-patch-libedit-dl Thu Oct 15 17:55:20 2020 (r552438)
@@ -0,0 +1,58 @@
+--- src/lua.c.orig 2018-03-16 14:23:08 UTC
++++ src/lua.c
+@@ -379,7 +379,54 @@ static int handle_luainit (lua_State *L)
+ */
+ #if !defined(lua_readline) /* { */
+
+-#if defined(LUA_USE_READLINE) /* { */
++#if defined(LUA_USE_READLINE_DL)/* { */
++
++#include <dlfcn.h>
++
++#ifndef LUA_READLINE_LIBPATH
++#define LUA_READLINE_LIBPATH "/usr/local/lib/libedit.so"
++#endif
++
++typedef char *readline_functype(const char *);
++typedef int add_history_functype(const char *);
++
++static readline_functype *lua_readline_p = NULL;
++static add_history_functype *lua_saveline_p = NULL;
++
++static void lua_initreadline(lua_State *L)
++{
++ void *editlib = NULL;
++ union dl_func_hack {
++ void *ptr;
++ readline_functype *rlfunc;
++ add_history_functype *ahfunc;
++ char **rlnamevar;
++ int *icompvar;
++ } u;
++ (void) L;
++ if ((editlib = dlopen(LUA_READLINE_LIBPATH, RTLD_LAZY | RTLD_LOCAL))) {
++ u.ptr = dlsym(editlib, "readline");
++ lua_readline_p = u.rlfunc;
++ u.ptr = dlsym(editlib, "add_history");
++ lua_saveline_p = u.ahfunc;
++ if ((u.ptr = dlsym(editlib, "rl_readline_name")))
++ *u.rlnamevar = "lua";
++ if ((u.ptr = dlsym(editlib, "rl_inhibit_completion")))
++ *u.icompvar = 1;
++ }
++}
++
++#define lua_readline(L,b,p) \
++ ((void)L, \
++ (lua_readline_p) \
++ ? (((b)=lua_readline_p(p)) != NULL) \
++ : (fputs(p, stdout), fflush(stdout), fgets(b, LUA_MAXINPUT, stdin) != NULL))
++#define lua_saveline(L,line) \
++ do { (void)L; if (lua_saveline_p) lua_saveline_p(line); } while(0)
++#define lua_freeline(L,b) \
++ do { (void)L; if (lua_readline_p) free(b); } while(0)
++
++#elif defined(LUA_USE_READLINE) /* { */
+
+ #include <readline/readline.h>
+ #include <readline/history.h>
Added: head/lang/lua54/files/lua-5.4.pc.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/lua54/files/lua-5.4.pc.in Thu Oct 15 17:55:20 2020 (r552438)
@@ -0,0 +1,10 @@
+version=%%version%%
+libdir=%%libdir%%
+includedir=%%includedir%%
+soname=%%soname%%
+
+Name: Lua
+Description: Powerful, efficient, lightweight, embeddable scripting language.
+Version: ${version}
+Libs: -L${libdir} -l${soname} -lm
+Cflags: -I${includedir}
Modified: head/lang/lua54/files/patch-src_Makefile
==============================================================================
--- head/lang/lua53/files/patch-src_Makefile Thu Oct 15 17:47:48 2020 (r552436)
+++ head/lang/lua54/files/patch-src_Makefile Thu Oct 15 17:55:20 2020 (r552438)
@@ -1,13 +1,11 @@
---- src/Makefile.orig 2018-06-25 17:46:36 UTC
+--- src/Makefile.orig 2020-04-15 13:00:29 UTC
+++ src/Makefile
-@@ -6,12 +6,13 @@
- # Your platform. See PLATS for possible values.
- PLAT= none
+@@ -7,11 +7,12 @@
+ PLAT= guess
--CC= gcc -std=gnu99
--CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
-+CC?= gcc -std=gnu99
-+CFLAGS= -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
+ CC= gcc -std=gnu99
+-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
++CFLAGS= -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
+SOLIBS= -lm
@@ -16,20 +14,9 @@
+AR= ar
RANLIB= ranlib
RM= rm -f
+ UNAME= uname
+@@ -39,12 +40,13 @@ BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
-@@ -19,8 +20,8 @@ SYSCFLAGS=
- SYSLDFLAGS=
- SYSLIBS=
-
--MYCFLAGS=
--MYLDFLAGS=
-+MYCFLAGS?=
-+MYLDFLAGS?=
- MYLIBS=
- MYOBJS=
-
-@@ -38,12 +39,13 @@ BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
-
LUA_T= lua
LUA_O= lua.o
+LUA_SO= liblua.so
@@ -43,7 +30,7 @@
ALL_A= $(LUA_A)
# Targets start here.
-@@ -55,8 +57,11 @@ o: $(ALL_O)
+@@ -56,8 +58,11 @@ o: $(ALL_O)
a: $(ALL_A)
More information about the svn-ports-all
mailing list