diff options
author | mm <mm@FreeBSD.org> | 2010-08-16 05:48:12 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2010-08-16 05:48:12 +0800 |
commit | 80f4cd21ecbe3da09e586b84facd3311d2ea0f14 (patch) | |
tree | f3833eefcfc51259554ea415a4ea00a5c22aafb0 /www/lighttpd | |
parent | bb215aef328da9be3217bd56cd0dd1dee3081c09 (diff) | |
download | freebsd-ports-gnome-80f4cd21ecbe3da09e586b84facd3311d2ea0f14.tar.gz freebsd-ports-gnome-80f4cd21ecbe3da09e586b84facd3311d2ea0f14.tar.zst freebsd-ports-gnome-80f4cd21ecbe3da09e586b84facd3311d2ea0f14.zip |
- Update to 1.4.27
- Add fdevent kqueue patch from upstream (SVN revision 2764)
- Add libev support (optional)
- Do not depend on spawn-fcgi by default
- Add IPv4 and IPv6 sockets to configuration example
Diffstat (limited to 'www/lighttpd')
-rw-r--r-- | www/lighttpd/Makefile | 31 | ||||
-rw-r--r-- | www/lighttpd/distinfo | 6 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src-connections.c | 47 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c | 20 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src__network.c | 11 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src_mod_accesslog.c | 13 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src_require.c | 20 |
7 files changed, 44 insertions, 104 deletions
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile index b3edb959aabe..3ee7811576c4 100644 --- a/www/lighttpd/Makefile +++ b/www/lighttpd/Makefile @@ -6,8 +6,7 @@ # PORTNAME= lighttpd -PORTVERSION= 1.4.26 -PORTREVISION= 4 +PORTVERSION= 1.4.27 CATEGORIES= www MASTER_SITES= http://download.lighttpd.net/lighttpd/releases-1.4.x/ @@ -36,13 +35,14 @@ OPTIONS= BZIP2 "Enable Bzip2 support" off \ GEOIP "Enable GeoIP support" off \ H264 "Enable H.264 streaming" off \ IPV6 "Enable IPV6 support" on \ + LIBEV "Enable libev support" off \ MAGNET "Enable magnet support" off \ MEMCACHE "Enable memory caching support" off \ MYSQL "Enable MYSQL support" off \ NODELAY "Set TCP_NODELAY on listening sockets" off \ OPENLDAP "Enable LDAP support" off \ OPENSSL "Enable SSL support" on \ - SPAWNFCGI "Enable spawn-fcgi utility" on \ + SPAWNFCGI "Depend on spawn-fcgi utility" off \ VALGRIND "Enable valgrind support" off \ WEBDAV "Enable WebDAV support" off @@ -111,6 +111,11 @@ CONFIGURE_ARGS+= --with-gdbm CONFIGURE_ARGS+= --disable-ipv6 .endif +.if defined(WITH_LIBEV) +CONFIGURE_ARGS+= --with-libev=${LOCALBASE} +LIB_DEPENDS+= ev.3:${PORTSDIR}/devel/libev +.endif + .if defined(WITH_MAGNET) USE_LUA= 5.1+ CONFIGURE_ARGS+= --with-lua @@ -167,12 +172,18 @@ post-patch: -e 's|#server.username.*|server.username = "www"|' \ -e 's|#server.groupname.*|server.groupname = "www"|' \ -e 's|/usr/local/bin/php|${PREFIX}/bin/php-cgi|' \ - ${WRKSRC}/doc/lighttpd.conf + ${WRKSRC}/doc/config/lighttpd.conf + @${ECHO} >> ${WRKSRC}/doc/config/lighttpd.conf + @${ECHO} "# IPv4 listening socket" >> ${WRKSRC}/doc/lighttpd.conf >> \ + ${WRKSRC}/doc/config/lighttpd.conf + @${ECHO} "\$$SERVER[\"socket\"] == \"0.0.0.0:80\" { }" >> \ + ${WRKSRC}/doc/config/lighttpd.conf .if !defined(WITHOUT_IPV6) - @${ECHO} "" >> ${WRKSRC}/doc/lighttpd.conf - @${ECHO} "# Enable IPV6 and IPV4 together" >> ${WRKSRC}/doc/lighttpd.conf - @${ECHO} "server.use-ipv6 = \"enable\"" >> ${WRKSRC}/doc/lighttpd.conf - @${ECHO} "\$$SERVER[\"socket\"] == \"0.0.0.0:80\" { }" >> ${WRKSRC}/doc/lighttpd.conf + @${ECHO} >> ${WRKSRC}/doc/config/lighttpd.conf + @${ECHO} "# IPv6 listening socket" >> ${WRKSRC}/doc/lighttpd.conf >> \ + ${WRKSRC}/doc/config/lighttpd.conf + @${ECHO} "\$$SERVER[\"socket\"] == \"[::]:80\" { }" >> \ + ${WRKSRC}/doc/config/lighttpd.conf .endif .if defined(WITH_H264) @${CAT} ${WRKSRC}/COPYING_H264 @@ -180,9 +191,9 @@ post-patch: .endif post-install: - @${INSTALL_DATA} ${WRKSRC}/doc/lighttpd.conf ${PREFIX}/etc/lighttpd.conf.sample + @${INSTALL_DATA} ${WRKSRC}/doc/config/lighttpd.conf ${PREFIX}/etc/lighttpd.conf.sample .if !exists(${PREFIX}/etc/lighttpd.conf) - @${INSTALL_DATA} ${WRKSRC}/doc/lighttpd.conf ${PREFIX}/etc/lighttpd.conf + @${INSTALL_DATA} ${WRKSRC}/doc/config/lighttpd.conf ${PREFIX}/etc/lighttpd.conf .endif @${LIBTOOL} --finish ${PREFIX}/lib .if !defined(NOPORTDOCS) diff --git a/www/lighttpd/distinfo b/www/lighttpd/distinfo index cb22d99ab1cc..f17421c51292 100644 --- a/www/lighttpd/distinfo +++ b/www/lighttpd/distinfo @@ -1,6 +1,6 @@ -MD5 (lighttpd-1.4.26.tar.bz2) = a682c8efce47a2f4263a247ba0813c9b -SHA256 (lighttpd-1.4.26.tar.bz2) = d7c25a5bb08c8dbc3e8d86f9e564c90ebf0c365d7fcf5ee801e912fb3c2357fd -SIZE (lighttpd-1.4.26.tar.bz2) = 627971 +MD5 (lighttpd-1.4.27.tar.bz2) = afece7dc547d71cb94ea2e34ee5b3f9b +SHA256 (lighttpd-1.4.27.tar.bz2) = d459a77eb91dac8bb2da080c7765ad6fbf505b316078b41c7dd7077e1745b566 +SIZE (lighttpd-1.4.27.tar.bz2) = 641718 MD5 (lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz) = 633af734ed50d42b743ab70724058951 SHA256 (lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz) = d7c3704d5253c4f3c18459f89059063b311e50096cd2c38fc982cec683c32e61 SIZE (lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz) = 44695 diff --git a/www/lighttpd/files/patch-src-connections.c b/www/lighttpd/files/patch-src-connections.c deleted file mode 100644 index 96cf9698fc7d..000000000000 --- a/www/lighttpd/files/patch-src-connections.c +++ /dev/null @@ -1,47 +0,0 @@ ---- src/connections.c.orig -+++ src/connections.c -@@ -310,6 +310,8 @@ static int connection_handle_read_ssl(server *srv, connection *con) { - /* the other end close the connection -> KEEP-ALIVE */ - - return -2; -+ } else { -+ joblist_append(srv, con); - } - - return 0; -@@ -320,6 +322,7 @@ static int connection_handle_read_ssl(server *srv, connection *con) { - #endif - } - -+/* 0: everything ok, -1: error, -2: con closed */ - static int connection_handle_read(server *srv, connection *con) { - int len; - buffer *b; -@@ -1180,15 +1183,20 @@ static handler_t connection_handle_fdevent(void *s, void *context, int revents) - - joblist_append(srv, con); - -- if (revents & FDEVENT_IN) { -- con->is_readable = 1; --#if 0 -- log_error_write(srv, __FILE__, __LINE__, "sd", "read-wait - done", con->fd); --#endif -- } -- if (revents & FDEVENT_OUT) { -- con->is_writable = 1; -- /* we don't need the event twice */ -+ if (con->conf.is_ssl) { -+ /* ssl may read and write for both reads and writes */ -+ if (revents & (FDEVENT_IN | FDEVENT_OUT)) { -+ con->is_readable = 1; -+ con->is_writable = 1; -+ } -+ } else { -+ if (revents & FDEVENT_IN) { -+ con->is_readable = 1; -+ } -+ if (revents & FDEVENT_OUT) { -+ con->is_writable = 1; -+ /* we don't need the event twice */ -+ } - } diff --git a/www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c b/www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c new file mode 100644 index 000000000000..9729c449babb --- /dev/null +++ b/www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c @@ -0,0 +1,20 @@ +Index: src/fdevent_freebsd_kqueue.c +=================================================================== +--- src/fdevent_freebsd_kqueue.c (revision 2763) ++++ src/fdevent_freebsd_kqueue.c (revision 2764) +@@ -39,12 +39,15 @@ + NULL, 0, + &ts); + ++ /* Ignore errors for now, as we remove for READ and WRITE without knowing what was registered */ ++#if 0 + if (ret == -1) { + log_error_write(ev->srv, __FILE__, __LINE__, "SS", + "kqueue event delete failed: ", strerror(errno)); + + return -1; + } ++#endif + + return -1; + } diff --git a/www/lighttpd/files/patch-src__network.c b/www/lighttpd/files/patch-src__network.c deleted file mode 100644 index 996d8002a9aa..000000000000 --- a/www/lighttpd/files/patch-src__network.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/network.c 2010-01-28 10:43:33.829209750 -0500 -+++ src/network.c 2010-01-28 10:44:22.639208732 -0500 -@@ -525,7 +525,7 @@ int network_init(server *srv) { - - if (!s->ssl_use_sslv2) { - /* disable SSLv2 */ -- if (SSL_OP_NO_SSLv2 != SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2)) { -+ if (!(SSL_OP_NO_SSLv2 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2))) { - log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:", - ERR_error_string(ERR_get_error(), NULL)); - return -1; diff --git a/www/lighttpd/files/patch-src_mod_accesslog.c b/www/lighttpd/files/patch-src_mod_accesslog.c deleted file mode 100644 index e873fcfb9022..000000000000 --- a/www/lighttpd/files/patch-src_mod_accesslog.c +++ /dev/null @@ -1,13 +0,0 @@ ---- src/mod_accesslog.c.orig 2009-11-05 12:40:58.000000000 -0200 -+++ src/mod_accesslog.c 2009-11-05 12:41:17.000000000 -0200 -@@ -162,7 +162,9 @@ - if (str->used == 0) return; - buffer_prepare_append(dest, str->used - 1); - -- for (unsigned int i = 0; i < str->used - 1; i++) { -+ unsigned int i; -+ -+ for (i = 0; i < str->used - 1; i++) { - if (str->ptr[i] >= ' ' && str->ptr[i] <= '~') { - /* printable chars */ - buffer_append_string_len(dest, &str->ptr[i], 1); diff --git a/www/lighttpd/files/patch-src_require.c b/www/lighttpd/files/patch-src_require.c deleted file mode 100644 index 7ad810855ba5..000000000000 --- a/www/lighttpd/files/patch-src_require.c +++ /dev/null @@ -1,20 +0,0 @@ ---- src/response.c.orig 2009-11-30 13:49:22.000000000 -0200 -+++ src/response.c 2009-11-30 13:52:28.000000000 -0200 -@@ -136,6 +136,7 @@ - X509 *xs; - X509_NAME *xn; - X509_NAME_ENTRY *xe; -+ int i, nentries; - if ( - SSL_get_verify_result(con->ssl) != X509_V_OK - || !(xs = SSL_get_peer_certificate(con->ssl)) -@@ -144,7 +145,8 @@ - } - - xn = X509_get_subject_name(xs); -- for (int i = 0, nentries = X509_NAME_entry_count(xn); i < nentries; ++i) { -+ nentries = X509_NAME_entry_count(xn); -+ for (i = 0; i < nentries; ++i) { - int xobjnid; - const char * xobjsn; - data_string *envds; |