Index: head/lang/lua53/Makefile =================================================================== --- head/lang/lua53/Makefile (revision 453970) +++ head/lang/lua53/Makefile (revision 453971) @@ -1,79 +1,80 @@ # Created by: GreenDog # $FreeBSD$ PORTNAME= lua PORTVERSION= 5.3.4 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= http://www.lua.org/ftp/ PKGNAMESUFFIX= 53 MAINTAINER= gmesalazar@gmail.com COMMENT= Small, compilable scripting language providing easy access to C code LICENSE= MIT USES= libedit LUA_VER= 5.3 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} # 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" \ 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" \ INSTALL_TOP=${STAGEDIR}${PREFIX} \ INSTALL_INC=${STAGEDIR}${PREFIX}/include/lua53 \ 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_LIST= version=${PORTVERSION} \ includedir=${LUA_INCDIR} \ libdir=${LUA_LIBDIR} \ soname=lua-${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 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 \ ${STAGEDIR}${PREFIX}/libdata/pkgconfig .include Index: head/lang/lua53/files/patch-src__ldebug.c =================================================================== --- head/lang/lua53/files/patch-src__ldebug.c (nonexistent) +++ head/lang/lua53/files/patch-src__ldebug.c (revision 453971) @@ -0,0 +1,10 @@ +--- 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); Property changes on: head/lang/lua53/files/patch-src__ldebug.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/lua53/files/patch-src__lgc.c =================================================================== --- head/lang/lua53/files/patch-src__lgc.c (nonexistent) +++ head/lang/lua53/files/patch-src__lgc.c (revision 453971) @@ -0,0 +1,13 @@ +--- 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 */ + } + } + } Property changes on: head/lang/lua53/files/patch-src__lgc.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/lua53/files/patch-src__lparser.c =================================================================== --- head/lang/lua53/files/patch-src__lparser.c (nonexistent) +++ head/lang/lua53/files/patch-src__lparser.c (revision 453971) @@ -0,0 +1,11 @@ +--- 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 */ Property changes on: head/lang/lua53/files/patch-src__lparser.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property