Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141804015
D14709.id70739.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
12 KB
Referenced Files
None
Subscribers
None
D14709.id70739.diff
View Options
Index: Mk/Uses/lua.mk
===================================================================
--- Mk/Uses/lua.mk
+++ Mk/Uses/lua.mk
@@ -51,7 +51,7 @@
# 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
Index: Mk/bsd.default-versions.mk
===================================================================
--- Mk/bsd.default-versions.mk
+++ Mk/bsd.default-versions.mk
@@ -63,7 +63,7 @@
# Please give notice to the Graphics Team (x11@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, 5.5m, 10.1m, 10.2m, 10.3m, 10.4m, 5.5p, 5.6p, 5.7p, 5.6w
MYSQL_DEFAULT?= 5.7
Index: archivers/urbackup-server/Makefile
===================================================================
--- archivers/urbackup-server/Makefile
+++ archivers/urbackup-server/Makefile
@@ -16,7 +16,7 @@
liblmdb.so:databases/lmdb
USES= autoreconf compiler:c++11-lang dos2unix fakeroot fuse \
- libtool lua:53+ pkgconfig sqlite:3
+ libtool lua:53 pkgconfig sqlite:3
USE_RC_SUBR= urbackup_server
USERS= urbackup
Index: lang/Makefile
===================================================================
--- lang/Makefile
+++ lang/Makefile
@@ -177,6 +177,7 @@
SUBDIR += lua51
SUBDIR += lua52
SUBDIR += lua53
+ SUBDIR += lua54
SUBDIR += luajit
SUBDIR += luajit-openresty
SUBDIR += malbolge
Index: lang/lua54/Makefile
===================================================================
--- /dev/null
+++ lang/lua54/Makefile
@@ -0,0 +1,151 @@
+# $FreeBSD$
+
+PORTNAME= lua
+DISTVERSION= 5.4.0-rc1
+CATEGORIES= lang
+MASTER_SITES= https://www.lua.org/work/
+PKGNAMESUFFIX= ${LUA_VER_STR}
+
+MAINTAINER= russ.haley@gmail.com
+COMMENT= Powerful, efficient, lightweight, embeddable scripting language
+
+LICENSE= MIT
+
+USES= lua:54,core
+
+USE_LDCONFIG= yes
+
+# Overriding __MAKE_CONF makes sure that we don't re-parse
+# /etc/make.conf during do-build, which would jeopardize the build
+# if, for instance, the user set CFLAGS=mumble
+# NOTE: /etc/make.conf is read BEFORE Makefile, so we already
+# have its settings when we get here.
+# See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt
+MAKE_ARGS= __MAKE_CONF=${NONEXISTENT}
+
+WRKSRC= ${WRKDIR}/lua-5.4.0
+
+BUILD_WRKSRC= ${WRKSRC}/src
+
+# Source, destination, and filenames to copy for the DOCS option
+# (automatically added to pkg-plist if DOCS is set)
+DOCSDIR= ${LUA_DOCSDIR}
+PORTDOCS= *
+BUILD_WRKDOC= ${WRKSRC}/doc
+
+LUA_LIB_STATIC= liblua-${LUA_VER}.a
+LUA_LIB_SHARED= liblua-${LUA_VER}.so
+LUA_PC_FILE= lua-${LUA_VER}.pc
+
+# using the "bsd" target rather than "freebsd" saves patching out the
+# assumption of using base libedit in order to make it configurable. "bsd"
+# is "generic" plus the POSIX and DLOPEN options, plus -Wl,-E at link time;
+# it doesn't set CC either, which makes it easier for us to control that too.
+ALL_TARGET=bsd
+
+# Options
+
+OPTIONS_DEFAULT= LIBEDIT_DL DOCS
+
+OPTIONS_GROUP= DOCSGRP DEBUGGRP
+OPTIONS_SINGLE= EDITGRP
+
+OPTIONS_GROUP_DOCSGRP= DOCS
+OPTIONS_GROUP_DEBUGGRP= ASSERT APICHECK
+
+OPTIONS_SINGLE_EDITGRP= EDITNONE LIBEDIT_DL LIBEDIT READLINE
+
+# Option descriptions
+
+DEBUGGRP_DESC= Debugging options
+ASSERT_DESC= Enable interpreter assertions
+APICHECK_DESC= Enable API checks
+
+DOCSGRP_DESC= Documentation options
+DOCS_DESC= Install language and API reference (HTML, ~400kB)
+
+EDITGRP_DESC= Interactive command-line editing
+EDITNONE_DESC= No command-line editing
+LIBEDIT_DL_DESC=Use dynamically loaded libedit (recommended)
+LIBEDIT_DESC= Use libedit (breaks lcurses)
+READLINE_DESC= Use GNU Readline (breaks lcurses)
+
+# Option implementations
+
+ASSERT_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-assert
+
+APICHECK_CPPFLAGS= -DLUA_USE_APICHECK
+
+# EDITNONE currently requires no settings
+
+LIBEDIT_DL_USES= libedit
+LIBEDIT_DL_CPPFLAGS= -DLUA_USE_READLINE_DL
+LIBEDIT_DL_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-libedit-dl
+
+LIBEDIT_USES= libedit
+LIBEDIT_CPPFLAGS= -DLUA_USE_READLINE
+LIBEDIT_LIBS= -ledit
+
+READLINE_USES= readline
+READLINE_CPPFLAGS= -DLUA_USE_READLINE
+READLINE_LIBS= -lreadline
+
+# end of option vars
+
+CFLAGS+= -fPIC
+# 2019-01-25: -pthread in LIBS is a work around for the following bug:
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235211
+LIBS+= -pthread
+
+WITHOUT_NO_STRICT_ALIASING=yes
+
+MAKE_ARGS+= CC="${CC}" \
+ CMCFLAGS="" \
+ MYCFLAGS="${CPPFLAGS} ${CFLAGS}" \
+ MYLDFLAGS="${LDFLAGS}" \
+ MYLIBS="${LIBS}" \
+ LUA_T=${LUA_CMD} \
+ LUAC_T=${LUAC_CMD} \
+ LUA_A=${LUA_LIB_STATIC} \
+ LUA_SO=${LUA_LIB_SHARED} \
+ LUA_SONAME=${LUA_LIB_SHARED} \
+ TO_BIN="${LUA_CMD} ${LUAC_CMD}" \
+ TO_LIB="${LUA_LIB_SHARED} ${LUA_LIB_STATIC}" \
+ INSTALL_TOP=${STAGEDIR}${PREFIX} \
+ INSTALL_INC=${STAGEDIR}${LUA_INCDIR} \
+ INSTALL_EXEC="${INSTALL_PROGRAM}"
+
+SUB_FILES= ${LUA_PC_FILE}
+SUB_LIST= version=${PORTVERSION} \
+ includedir=${LUA_INCDIR} \
+ libdir=${LUA_LIBDIR} \
+ soname=lua-${LUA_VER}
+
+post-patch:
+ @${REINPLACE_CMD} -e "/LUA_ROOT/s,/usr/local,${LUA_PREFIX}," \
+ ${WRKSRC}/src/luaconf.h
+
+post-patch-LIBEDIT-on:
+ @${REINPLACE_CMD} -e "s,readline/,editline/,g ; \
+ /history\.h/d" ${WRKSRC}/src/lua.c
+
+post-patch-LIBEDIT_DL-on:
+ @${REINPLACE_CMD} \
+ -e "/^#def.*LUA_READLINE_LIBPATH/s,/usr/local,${LOCALBASE}," \
+ ${WRKSRC}/src/lua.c
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${LUA_LIB_SHARED}
+ ${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \
+ ${STAGEDIR}${PREFIX}/man/man1/${LUA_CMD}.1
+ ${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
+ ${STAGEDIR}${PREFIX}/man/man1/${LUAC_CMD}.1
+ ${INSTALL_DATA} ${WRKDIR}/${LUA_PC_FILE} \
+ ${STAGEDIR}${PREFIX}/libdata/pkgconfig
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${BUILD_WRKDOC} && \
+ ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} '-not -name *\.1')
+
+.include <bsd.port.mk>
Index: lang/lua54/distinfo
===================================================================
--- /dev/null
+++ lang/lua54/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1586963715
+SHA256 (lua-5.4.0-rc1.tar.gz) = 0a4fb4cb9281d924799650a768e61723fac3f0329bca39e51b90d1acc4228e71
+SIZE (lua-5.4.0-rc1.tar.gz) = 347948
Index: lang/lua54/files/extra-patch-assert
===================================================================
--- /dev/null
+++ lang/lua54/files/extra-patch-assert
@@ -0,0 +1,11 @@
+--- src/lprefix.h.orig 2018-07-14 23:49:59.792621000 +0100
++++ src/lprefix.h 2018-07-14 23:50:20.856546000 +0100
+@@ -7,6 +7,8 @@
+ #ifndef lprefix_h
+ #define lprefix_h
+
++#include <assert.h>
++#define lua_assert(c_) assert(c_)
+
+ /*
+ ** Allows POSIX/XSI stuff
Index: lang/lua54/files/extra-patch-libedit-dl
===================================================================
--- /dev/null
+++ lang/lua54/files/extra-patch-libedit-dl
@@ -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>
Index: lang/lua54/files/lua-5.4.pc.in
===================================================================
--- /dev/null
+++ lang/lua54/files/lua-5.4.pc.in
@@ -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}
Index: lang/lua54/files/patch-src_Makefile
===================================================================
--- /dev/null
+++ lang/lua54/files/patch-src_Makefile
@@ -0,0 +1,45 @@
+--- src/Makefile.orig 2018-04-07 20:16:26 UTC
++++ src/Makefile
+@@ -7,11 +7,12 @@
+ PLAT= none
+
+ 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
+
+-AR= ar rcu
++AR= ar
+ RANLIB= ranlib
+ RM= rm -f
+
+@@ -35,12 +36,13 @@ BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
+
+ LUA_T= lua
+ LUA_O= lua.o
++LUA_SO= liblua.so
+
+ 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.
+@@ -52,8 +54,11 @@ o: $(ALL_O)
+
+ a: $(ALL_A)
+
++$(LUA_SO): $(CORE_O) $(LIB_O)
++ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(MYLDFLAGS) -shared -Wl,-soname=$(LUA_SONAME) $? $(SOLIBS)
++
+ $(LUA_A): $(BASE_O)
+- $(AR) $@ $(BASE_O)
++ $(AR) $(ARFLAGS) $@ $(BASE_O)
+ $(RANLIB) $@
+
+ $(LUA_T): $(LUA_O) $(LUA_A)
Index: lang/lua54/pkg-descr
===================================================================
--- /dev/null
+++ lang/lua54/pkg-descr
@@ -0,0 +1,21 @@
+Lua is a programming language originally designed for extending applications,
+but also frequently used as a general-purpose, stand-alone language. Lua
+combines simple procedural syntax (similar to Pascal) with powerful data
+description constructs based on associative arrays and extensible semantics.
+Lua is dynamically typed, interpreted from bytecodes, and has automatic memory
+management with garbage collection, making it ideal for configuration,
+scripting, and rapid prototyping.
+
+A fundamental concept in the design of Lua is to provide meta-mechanisms for
+implementing features, instead of providing a host of features directly in
+the language. For example, although Lua is not a pure object-oriented
+language, it does provide meta-mechanisms for implementing classes and
+inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the
+language small, while allowing the semantics to be extended in unconventional
+ways. Extensible semantics is a distinguishing feature of Lua.
+
+Lua is implemented as a small library of C functions, written in ANSI C, and
+compiles unmodified in all known platforms. The implementation goals are
+simplicity, efficiency, portability, and low embedding cost.
+
+WWW: http://www.lua.org/
Index: lang/lua54/pkg-plist
===================================================================
--- /dev/null
+++ lang/lua54/pkg-plist
@@ -0,0 +1,14 @@
+bin/lua%%LUA_VER_STR%%
+bin/luac%%LUA_VER_STR%%
+%%LUA_INCDIR%%/lauxlib.h
+%%LUA_INCDIR%%/lua.h
+%%LUA_INCDIR%%/lua.hpp
+%%LUA_INCDIR%%/luaconf.h
+%%LUA_INCDIR%%/lualib.h
+%%LUA_LIBDIR%%/liblua-%%LUA_VER%%.a
+%%LUA_LIBDIR%%/liblua-%%LUA_VER%%.so
+libdata/pkgconfig/lua-%%LUA_VER%%.pc
+man/man1/lua%%LUA_VER_STR%%.1.gz
+man/man1/luac%%LUA_VER_STR%%.1.gz
+@dir %%LUA_MODLIBDIR%%
+@dir %%LUA_MODSHAREDIR%%
Index: x11-toolkits/termit/Makefile
===================================================================
--- x11-toolkits/termit/Makefile
+++ x11-toolkits/termit/Makefile
@@ -14,7 +14,7 @@
LIB_DEPENDS= libpcre2-8.so:devel/pcre2 \
libgnutls.so:security/gnutls
-USES= cmake gnome lua:53+ pkgconfig xorg
+USES= cmake gnome lua:53 pkgconfig xorg
USE_CSTD= c99
USE_XORG= x11
USE_GNOME= cairo gdkpixbuf2 gtk30 vte3
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 11, 3:56 PM (2 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27613110
Default Alt Text
D14709.id70739.diff (12 KB)
Attached To
Mode
D14709: [new port] lang/lua54 - new port for Lua 5.4.0
Attached
Detach File
Event Timeline
Log In to Comment