Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2015 07:48:36 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r395750 - in branches/2015Q3/www/lighttpd: . files
Message-ID:  <201509010748.t817ma7v068635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Tue Sep  1 07:48:35 2015
New Revision: 395750
URL: https://svnweb.freebsd.org/changeset/ports/395750

Log:
  MFH: r394667
  
  www/lighttpd: modernize, support lua 5.2+
  
  - Use USE OPTIONs helpers
  - add support for lua 5.2+
  
  PR:                  202302
  Submitted by:        pkubaj@riseup.net (maintainer)
  
  Needed to complete merge done in r395736.
  
  Approved by:	ports-secteam (delphij)

Added:
  branches/2015Q3/www/lighttpd/files/patch-src_mod__cml__lua.c
     - copied unchanged from r394667, head/www/lighttpd/files/patch-src_mod__cml__lua.c
  branches/2015Q3/www/lighttpd/files/patch-src_mod__magnet.c
     - copied unchanged from r394667, head/www/lighttpd/files/patch-src_mod__magnet.c
Modified:
  branches/2015Q3/www/lighttpd/Makefile
Directory Properties:
  branches/2015Q3/   (props changed)

Modified: branches/2015Q3/www/lighttpd/Makefile
==============================================================================
--- branches/2015Q3/www/lighttpd/Makefile	Tue Sep  1 07:44:43 2015	(r395749)
+++ branches/2015Q3/www/lighttpd/Makefile	Tue Sep  1 07:48:35 2015	(r395750)
@@ -111,35 +111,6 @@ CONFIGURE_ARGS+=	--with-openssl \
 			--with-openssl-libs=${OPENSSLLIB}
 .endif
 
-.if ${PORT_OPTIONS:MBZIP2}
-CONFIGURE_ARGS+=	--with-bzip2
-.endif
-
-.if ${PORT_OPTIONS:MGDBM}
-LIB_DEPENDS+=		libgdbm.so:${PORTSDIR}/databases/gdbm
-CONFIGURE_ARGS+=	--with-gdbm
-.endif
-
-.if empty(PORT_OPTIONS:MIPV6)
-CONFIGURE_ARGS+=	--disable-ipv6
-.endif
-
-.if ${PORT_OPTIONS:MLIBEV}
-CONFIGURE_ARGS+=	--with-libev=${LOCALBASE}
-LIB_DEPENDS+=		libev.so:${PORTSDIR}/devel/libev
-.endif
-
-.if ${PORT_OPTIONS:MLUA}
-USES+=			lua:51
-CONFIGURE_ARGS+=	--with-lua
-CONFIGURE_ENV+=		LUA_CFLAGS="-I${LUA_INCDIR}" LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}"
-.endif
-
-.if ${PORT_OPTIONS:MMEMCACHE}
-LIB_DEPENDS+=		libmemcache.so:${PORTSDIR}/databases/libmemcache
-CONFIGURE_ARGS+=	--with-memcache
-.endif
-
 .if ${PORT_OPTIONS:MMYSQL}
 USE_MYSQL=		yes
 CONFIGURE_ARGS+=	--with-mysql
@@ -165,16 +136,6 @@ CONFIGURE_ARGS+=	--with-ldap
 _REQUIRE+=		slapd
 .endif
 
-.if ${PORT_OPTIONS:MSPAWNFCGI}
-RUN_DEPENDS+=		spawn-fcgi:${PORTSDIR}/www/spawn-fcgi
-.endif
-
-.if ${PORT_OPTIONS:MVALGRIND}
-BUILD_DEPENDS+=		valgrind:${PORTSDIR}/devel/valgrind
-RUN_DEPENDS+=		valgrind:${PORTSDIR}/devel/valgrind
-CONFIGURE_ARGS+=	--with-valgrind
-.endif
-
 .if ${PORT_OPTIONS:MWEBDAV}
 USE_GNOME+=		libxml2
 LIB_DEPENDS+=		libuuid.so:${PORTSDIR}/misc/e2fsprogs-libuuid \

Copied: branches/2015Q3/www/lighttpd/files/patch-src_mod__cml__lua.c (from r394667, head/www/lighttpd/files/patch-src_mod__cml__lua.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2015Q3/www/lighttpd/files/patch-src_mod__cml__lua.c	Tue Sep  1 07:48:35 2015	(r395750, copy of r394667, head/www/lighttpd/files/patch-src_mod__cml__lua.c)
@@ -0,0 +1,25 @@
+--- src/mod_cml_lua.c.orig	2015-07-26 10:36:36 UTC
++++ src/mod_cml_lua.c
+@@ -28,6 +28,10 @@ typedef char HASHHEX[HASHHEXLEN+1];
+ #include <lualib.h>
+ #include <lauxlib.h>
+ 
++#if LUA_VERSION_NUM >= 502
++#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
++#endif
++
+ typedef struct {
+ 	stream st;
+ 	int done;
+@@ -291,7 +295,11 @@ int cache_parse_lua(server *srv, connect
+ 	lua_settable(L, LUA_GLOBALSINDEX);
+ 
+ 	/* load lua program */
++#if LUA_VERSION_NUM >= 502
++	if (lua_load(L, load_file, &rm, fn->ptr, NULL) || lua_pcall(L,0,1,0)) {
++#else
+ 	if (lua_load(L, load_file, &rm, fn->ptr) || lua_pcall(L,0,1,0)) {
++#endif
+ 		log_error_write(srv, __FILE__, __LINE__, "s",
+ 				lua_tostring(L,-1));
+ 

Copied: branches/2015Q3/www/lighttpd/files/patch-src_mod__magnet.c (from r394667, head/www/lighttpd/files/patch-src_mod__magnet.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2015Q3/www/lighttpd/files/patch-src_mod__magnet.c	Tue Sep  1 07:48:35 2015	(r395750, copy of r394667, head/www/lighttpd/files/patch-src_mod__magnet.c)
@@ -0,0 +1,13 @@
+--- src/mod_magnet.c.orig	2015-07-26 10:36:36 UTC
++++ src/mod_magnet.c
+@@ -24,6 +24,10 @@
+ #define MAGNET_CONFIG_PHYSICAL_PATH "magnet.attract-physical-path-to"
+ #define MAGNET_RESTART_REQUEST      99
+ 
++#if LUA_VERSION_NUM >= 502
++#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
++#endif
++
+ /* plugin config for all request/connections */
+ 
+ static jmp_buf exceptionjmp;



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