aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-01-10 16:27:29 +0800
committerbapt <bapt@FreeBSD.org>2014-01-10 16:27:29 +0800
commit9d2ef64dbe5d4c862e981f90506f9586784d921a (patch)
tree39eab1582f15cca66e9364ae11bb3f0485c5939a /www
parent162516b2cac208eb4e6b7c53a30b2ff068940929 (diff)
downloadfreebsd-ports-gnome-9d2ef64dbe5d4c862e981f90506f9586784d921a.tar.gz
freebsd-ports-gnome-9d2ef64dbe5d4c862e981f90506f9586784d921a.tar.zst
freebsd-ports-gnome-9d2ef64dbe5d4c862e981f90506f9586784d921a.zip
Port to lua 5.2
Support stage
Diffstat (limited to 'www')
-rw-r--r--www/volta/Makefile30
-rw-r--r--www/volta/files/patch-lua.c38
2 files changed, 50 insertions, 18 deletions
diff --git a/www/volta/Makefile b/www/volta/Makefile
index 86eb6923ba85..3ff64d3fd576 100644
--- a/www/volta/Makefile
+++ b/www/volta/Makefile
@@ -10,16 +10,13 @@ MASTER_SITES= http://dl.dropbox.com/u/7234177/Releases/ \
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>
diff --git a/www/volta/files/patch-lua.c b/www/volta/files/patch-lua.c
new file mode 100644
index 000000000000..e22c9a1fc119
--- /dev/null
+++ b/www/volta/files/patch-lua.c
@@ -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 );