Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150284230
D13690.id45404.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D13690.id45404.diff
View Options
Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -1,19 +1,19 @@
+# $FreeBSD$
# Created by: GreenDog <fiziologus@gmail.com>
-# $FreeBSD$
+# Date: 2018-03-14
PORTNAME= lua
-PORTVERSION= 5.3.4
-PORTREVISION= 2
+PORTVERSION= 5.3.5
+PORTREVISION= 0
CATEGORIES= lang
-MASTER_SITES= http://www.lua.org/ftp/
+MASTER_SITES= https://www.lua.org/ftp/
PKGNAMESUFFIX= 53
MAINTAINER= russ.haley@gmail.com
-COMMENT= Small, compilable scripting language providing easy access to C code
+COMMENT= Small, embeddable scripting language providing easy access to C code
LICENSE= MIT
-USES= libedit
LUA_VER= 5.3
USE_LDCONFIG= yes
@@ -24,57 +24,124 @@
# have its settings when we get here.
# See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt
MAKE_ARGS= __MAKE_CONF=${NONEXISTENT}
-# liblua.so requires libm, so make sure it has an explicit dependency
-# so that applications need not second-guess lua's dependencies.
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -lm -pthread
+
BUILD_WRKSRC= ${WRKSRC}/src
-MAKE_ARGS+= MYCFLAGS="${CFLAGS} ${CPPFLAGS} -DLUA_USE_LINUX" \
+
+# Source, destination, and filenames to copy for the DOCS option
+# (automatically added to pkg-plist if DOCS is set)
+# We override DOCSDIR to get a per-version subdir.
+DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
+PORTDOCS= *.html *.css *.gif *.png
+BUILD_WRKDOC= ${WRKSRC}/doc
+
+LUA_PREFIX?= ${PREFIX}
+
+# 2018-03-17: AG - These should match lua.mk, but we can't include that here
+LUA_CMD?= ${PORTNAME}${PKGNAMESUFFIX}
+LUAC_CMD?= ${PORTNAME}c${PKGNAMESUFFIX}
+LUA_INCDIR?= ${LUA_PREFIX}/include/${PORTNAME}${PKGNAMESUFFIX}
+LUA_LIBDIR?= ${LUA_PREFIX}/lib
+
+LUA_LIB_STATIC=lib${PORTNAME}-${LUA_VER}.a
+LUA_LIB_SHARED=lib${PORTNAME}-${LUA_VER}.so
+LUA_PC_FILE=${PORTNAME}-${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 DOCS
+
+OPTIONS_GROUP= DOCSGROUP DEBUGGROUP
+OPTIONS_GROUP_DOCSGROUP= DOCS
+
+OPTIONS_GROUP_DEBUGGROUP= ASSERT APICHECK
+
+OPTIONS_SINGLE= EDIT
+OPTIONS_SINGLE_EDIT=EDITNONE LIBEDIT LIBEDIT_PORT READLINE
+
+# Option descriptions
+
+DEBUGGROUP_DESC = Debugging options
+ASSERT_DESC = Enable interpreter assertions
+APICHECK_DESC = Enable API checks
+
+DOCSGROUP_DESC = Documentation options
+DOCS_DESC = Install language and API reference (HTML, ~400kB)
+
+EDIT_DESC = Interactive command-line editing
+EDITNONE_DESC = No command-line editing
+LIBEDIT_DESC = Use base system libedit (recommended)
+LIBEDIT_PORT_DESC=Use libedit from ports
+READLINE_DESC = Use GNU Readline from ports
+
+# Option implementations
+
+ASSERT_EXTRA_PATCHES=${PATCHDIR}/extra-patch-assert
+APICHECK_CPPFLAGS=-DLUA_USE_APICHECK
+
+LIBEDIT_CPPFLAGS=-DLUA_USE_READLINE -I/usr/include/edit
+LIBEDIT_LIBS=-ledit
+
+LIBEDIT_PORT_USES=libedit
+# USES=libedit adds -I/usr/local/include -L/usr/local/lib itself
+LIBEDIT_PORT_CPPFLAGS=-DLUA_USE_READLINE
+LIBEDIT_PORT_LIBS=-ledit
+
+READLINE_USES=readline
+# USES=readline adds -I/usr/local/include -L/usr/local/lib itself
+READLINE_CPPFLAGS=-DLUA_USE_READLINE
+READLINE_LIBS=-lreadline
+
+# end of option vars
+
+CFLAGS+= -fPIC
+
+WITHOUT_NO_STRICT_ALIASING=yes
+
+MAKE_ARGS += CC="${CC}" \
+ MYCFLAGS="${CPPFLAGS} ${CFLAGS}" \
MYLDFLAGS="${LDFLAGS}" \
- MYLIBS="-Wl,-E -L${LOCALBASE}/lib -ledit" \
- CC="${CC}" \
- LUA_T=lua53 \
- LUAC_T=luac53 \
- LUA_A=liblua-${LUA_VER}.a \
- LUA_SO=liblua-${LUA_VER}.so \
- LUA_SONAME=liblua-${LUA_VER}.so \
- TO_BIN="lua53 luac53" \
- TO_LIB="liblua-${LUA_VER}.a liblua-${LUA_VER}.so" \
+ 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}${PREFIX}/include/lua53 \
+ INSTALL_INC=${STAGEDIR}${LUA_INCDIR} \
INSTALL_EXEC="${INSTALL_PROGRAM}"
-# Cope with the lack of support for Lua 5.2 in bsd.lua.mk. These
-# overrides, which are required below, should be removed once bsd.lua.mk
-# understands this lua version.
-LUA_PREFIX?= ${PREFIX}
-LUA_SUBDIR?= lua${PKGNAMESUFFIX}
-LUA_INCDIR?= ${LUA_PREFIX}/include/${LUA_SUBDIR}
-LUA_LIBDIR?= ${LUA_PREFIX}/lib
-
-SUB_FILES= lua-${LUA_VER}.pc
+SUB_FILES= ${LUA_PC_FILE}
SUB_LIST= version=${PORTVERSION} \
includedir=${LUA_INCDIR} \
libdir=${LUA_LIBDIR} \
- soname=lua-${LUA_VER}
+ soname=${PORTNAME}-${LUA_VER}
-CFLAGS+= -fPIC
-
post-patch:
- @${REINPLACE_CMD} -e 's,rand *(,random(,g' \
- ${WRKSRC}/src/lmathlib.c
- @${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}| ; \
- s,readline/,editline/,g ; \
- /history\.h/d" \
- ${WRKSRC}/src/luaconf.h ${WRKSRC}/src/lua.c
+ @${REINPLACE_CMD} -e "/LUA_ROOT/s,/usr/local,${LUA_PREFIX}," \
+ ${WRKSRC}/src/luaconf.h
+post-patch-LIBEDIT_PORT-on:
+ @${REINPLACE_CMD} -e "s,readline/,editline/,g ; \
+ /history\.h/d" ${WRKSRC}/src/lua.c
+
post-install:
- @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblua-${LUA_VER}.so
- @${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \
- ${STAGEDIR}${PREFIX}/man/man1/lua53.1
- @${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \
- ${STAGEDIR}${PREFIX}/man/man1/luac53.1
- ${INSTALL_DATA} ${WRKDIR}/lua-${LUA_VER}.pc \
+ ${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}
+ ${INSTALL_MAN} ${BUILD_WRKDOC}/* ${STAGEDIR}${DOCSDIR}/.
+
.include <bsd.port.mk>
Index: distinfo
===================================================================
--- distinfo
+++ distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1489025786
-SHA256 (lua-5.3.4.tar.gz) = f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c
-SIZE (lua-5.3.4.tar.gz) = 303586
+TIMESTAMP = 1531618645
+SHA256 (lua-5.3.5.tar.gz) = 0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
+SIZE (lua-5.3.5.tar.gz) = 303543
Index: files/extra-patch-assert
===================================================================
--- files/extra-patch-assert
+++ 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: files/lua-5.3.pc.in
===================================================================
--- files/lua-5.3.pc.in
+++ files/lua-5.3.pc.in
@@ -4,7 +4,7 @@
soname=%%soname%%
Name: Lua
-Description: An Extensible Extension Language
+Description: Lua is a powerful, efficient, lightweight, embeddable scripting language.
Version: ${version}
Libs: -L${libdir} -l${soname} -lm
Cflags: -I${includedir}
Index: files/patch-src__Makefile
===================================================================
--- files/patch-src__Makefile
+++ files/patch-src__Makefile
@@ -1,4 +1,4 @@
---- src/Makefile.orig 2015-01-05 16:04:52 UTC
+--- src/Makefile.orig 2018-06-25 17:46:36 UTC
+++ src/Makefile
@@ -6,12 +6,12 @@
# Your platform. See PLATS for possible values.
@@ -55,3 +55,12 @@
$(RANLIB) $@
$(LUA_T): $(LUA_O) $(LUA_A)
+@@ -102,7 +106,7 @@ c89:
+
+
+ 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 -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit"
+
+ generic: $(ALL)
+
Index: files/patch-src__ldebug.c
===================================================================
--- files/patch-src__ldebug.c
+++ files/patch-src__ldebug.c
@@ -1,10 +0,0 @@
---- src/ldebug.c.orig 2016-10-19 12:32:10 UTC
-+++ src/ldebug.c
-@@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt,
- CallInfo *ci = L->ci;
- const char *msg;
- va_list argp;
-+ luaC_checkGC(L); /* error message uses memory */
- va_start(argp, fmt);
- msg = luaO_pushvfstring(L, fmt, argp); /* format message */
- va_end(argp);
Index: files/patch-src__lgc.c
===================================================================
--- files/patch-src__lgc.c
+++ files/patch-src__lgc.c
@@ -1,13 +0,0 @@
---- src/lgc.c.orig 2016-12-22 13:08:50 UTC
-+++ src/lgc.c
-@@ -643,8 +643,9 @@ static void clearkeys (global_State *g, GCObject *l, G
- for (n = gnode(h, 0); n < limit; n++) {
- if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) {
- setnilvalue(gval(n)); /* remove value ... */
-- removeentry(n); /* and remove entry from table */
- }
-+ if (ttisnil(gval(n))) /* is entry empty? */
-+ removeentry(n); /* remove entry from table */
- }
- }
- }
Index: files/patch-src__liolib.c
===================================================================
--- files/patch-src__liolib.c
+++ files/patch-src__liolib.c
@@ -1,10 +0,0 @@
---- src/liolib.c.orig 2015-04-03 18:41:57 UTC
-+++ src/liolib.c
-@@ -16,6 +16,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <unistd.h>
-
- #include "lua.h"
-
Index: files/patch-src__lparser.c
===================================================================
--- files/patch-src__lparser.c
+++ files/patch-src__lparser.c
@@ -1,11 +0,0 @@
---- src/lparser.c.orig 2016-08-01 19:51:24 UTC
-+++ src/lparser.c
-@@ -1392,7 +1392,7 @@ static void test_then_block (LexState *ls, int *escape
- luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */
- enterblock(fs, &bl, 0); /* must enter block before 'goto' */
- gotostat(ls, v.t); /* handle goto/break */
-- skipnoopstat(ls); /* skip other no-op statements */
-+ while (testnext(ls, ';')) {} /* skip semicolons */
- if (block_follow(ls, 0)) { /* 'goto' is the entire block? */
- leaveblock(fs);
- return; /* and that is it */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 31, 9:16 PM (2 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30649812
Default Alt Text
D13690.id45404.diff (10 KB)
Attached To
Mode
D13690: lang/lua53 - Update to 5.3.5
Attached
Detach File
Event Timeline
Log In to Comment