Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2014 08:27:30 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r339324 - in head/www/volta: . files
Message-ID:  <201401100827.s0A8RUQ8096778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Jan 10 08:27:29 2014
New Revision: 339324
URL: http://svnweb.freebsd.org/changeset/ports/339324

Log:
  Port to lua 5.2
  Support stage

Added:
  head/www/volta/files/patch-lua.c   (contents, props changed)
Modified:
  head/www/volta/Makefile

Modified: head/www/volta/Makefile
==============================================================================
--- head/www/volta/Makefile	Fri Jan 10 08:27:20 2014	(r339323)
+++ head/www/volta/Makefile	Fri Jan 10 08:27:29 2014	(r339324)
@@ -10,16 +10,13 @@ MASTER_SITES=	http://dl.dropbox.com/u/72
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	mahlon@martini.nu
-COMMENT=	A high performance, low resource URI rewriter for Squid
+COMMENT=	High performance, low resource URI rewriter for Squid
 
-LICENSE=	BSD
-LICENSE_FILE=	${WRKSRC}/LICENSE
+LICENSE=	BSD3CLAUSE
 
 LIB_DEPENDS=	libcdb.so:${PORTSDIR}/databases/tinycdb
 
-USES=		pkgconfig
-USE_GMAKE=	yes
-USE_LUA=	5.1
+USES=		gmake pkgconfig lua
 ALL_TARGET=	${PORTNAME}
 NO_INSTALL=	yes
 
@@ -30,18 +27,15 @@ PLIST_FILES=	bin/volta
 PORTDOCS=	README INSTALL LICENSE ChangeLog
 SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
+post-patch:
+	@${REINPLACE_CMD} -e "s/5.1/${LUA_VER}/g" ${WRKSRC}/Makefile
+
 post-install:
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR}
-.endif
-	${INSTALL_PROGRAM} ${WRKSRC}/volta ${PREFIX}/bin
-	@${ECHO_CMD} ""
-	@${CAT} ${PKGMESSAGE}
-	@${ECHO_CMD} ""
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/INSTALL ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/LICENSE ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/ChangeLog ${STAGEDIR}${DOCSDIR}
+	${INSTALL_PROGRAM} ${WRKSRC}/volta ${STAGEDIR}${PREFIX}/bin
 
 .include <bsd.port.mk>

Added: head/www/volta/files/patch-lua.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/volta/files/patch-lua.c	Fri Jan 10 08:27:29 2014	(r339324)
@@ -0,0 +1,38 @@
+--- ./lua.c.orig	2012-05-04 06:21:02.000000000 +0200
++++ ./lua.c	2014-01-10 09:17:46.000000000 +0100
+@@ -79,14 +79,12 @@
+ 	luaL_openlibs( lua ); /* include lua standard libraries */
+ 
+ 	/* Predeclare the request table. */
+-	lua_pushstring( lua, "request" );
+ 	lua_createtable( lua, 0, 7 );
+-	lua_settable( lua, LUA_GLOBALSINDEX );
++	lua_setglobal(lua, "request");
+ 
+ 	/* Predeclare a table for shared data */
+-	lua_pushstring( lua, "shared" );
+ 	lua_newtable( lua );
+-	lua_settable( lua, LUA_GLOBALSINDEX );
++	lua_setglobal(lua, "shared");
+ 
+ 	/* replace the lua print() function with one that calls debug() instead */
+ 	lua_register( lua, "print", luaV_print );
+@@ -97,7 +95,8 @@
+     lua_setfield( lua, -2, "__newindex");
+     lua_pushboolean( lua, 0 );
+     lua_setfield( lua, -2, "__metatable");
+-    lua_setmetatable( lua, LUA_GLOBALSINDEX );
++	lua_setmetatable(lua, -2);
++
+ 
+ 	lua_settop( lua, 0 );  /* wipe the stack */
+ 	return( lua );
+@@ -111,7 +110,7 @@
+ void
+ luaV_setup_request( parsed *request )
+ {
+-	lua_getfield( v.lua, LUA_GLOBALSINDEX, "request" );
++	lua_getglobal(v.lua, "request");
+ 	lua_pushstring( v.lua, request->scheme );
+ 	lua_setfield( v.lua, 1, "scheme" );
+ 	lua_pushstring( v.lua, request->host );



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401100827.s0A8RUQ8096778>