Fix building without IPv6 and packaging without SSL.

This commit is contained in:
schmonz 2017-10-29 00:34:29 +00:00
parent 4fdeb2e7e4
commit a630375045
5 changed files with 28 additions and 6 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.64 2017/10/24 07:27:34 adam Exp $
# $NetBSD: Makefile,v 1.65 2017/10/29 00:34:29 schmonz Exp $
DISTNAME= lighttpd-1.4.47
CATEGORIES= www
@ -58,7 +58,7 @@ SUBST_FILES.path= doc/config/lighttpd.conf
SUBST_VARS.path= LIGHTTPD_LOGDIR LIGHTTPD_STATEDIR LIGHTTPD_USER \
LIGHTTPD_GROUP PKG_SYSCONFDIR
PLIST_VARS+= gdbm geoip gssapi ldap lua mysql
PLIST_VARS+= gdbm geoip gssapi ldap lua mysql ssl
post-install:
set -e; cd ${WRKSRC}/doc; \

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.14 2017/10/24 07:27:34 adam Exp $
@comment $NetBSD: PLIST,v 1.15 2017/10/29 00:34:29 schmonz Exp $
lib/lighttpd/mod_access.la
lib/lighttpd/mod_accesslog.la
lib/lighttpd/mod_alias.la
@ -22,7 +22,7 @@ ${PLIST.geoip}lib/lighttpd/mod_geoip.la
lib/lighttpd/mod_indexfile.la
${PLIST.lua}lib/lighttpd/mod_magnet.la
${PLIST.mysql}lib/lighttpd/mod_mysql_vhost.la
lib/lighttpd/mod_openssl.la
${PLIST.ssl}lib/lighttpd/mod_openssl.la
lib/lighttpd/mod_proxy.la
lib/lighttpd/mod_redirect.la
lib/lighttpd/mod_rewrite.la

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.40 2017/10/25 14:27:20 fhajny Exp $
$NetBSD: distinfo,v 1.41 2017/10/29 00:34:29 schmonz Exp $
SHA1 (lighttpd-1.4.47.tar.xz) = 57dcbdcc42d52f113bd46e09b3fb895e2a076b4f
RMD160 (lighttpd-1.4.47.tar.xz) = 8cadb881745f4deae5101c5227c208e4b12f429c
@ -6,3 +6,4 @@ SHA512 (lighttpd-1.4.47.tar.xz) = 9fac3acc428d9faf69fca2768578dca619f778889e8a37
Size (lighttpd-1.4.47.tar.xz) = 703012 bytes
SHA1 (patch-doc_config_lighttpd.conf) = de14fd0aa0ed2cac5846d810b5c89af4036f1b70
SHA1 (patch-src_fdevent__solaris__port.c) = c31f457dd6f25dba01710faf34c45a636519320f
SHA1 (patch-src_network.c) = ad982b124f00f35ed06f6f45f77e4aca17f2e0fb

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.17 2017/06/22 03:06:26 schmonz Exp $
# $NetBSD: options.mk,v 1.18 2017/10/29 00:34:29 schmonz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.lighttpd
PKG_SUPPORTED_OPTIONS= bzip2 fam gdbm inet6 ldap lua mysql ssl memcached geoip gssapi webdav
@ -87,6 +87,7 @@ PLIST.mysql= yes
.if !empty(PKG_OPTIONS:Mssl)
. include "../../security/openssl/buildlink3.mk"
CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q}
PLIST.ssl= yes
.endif
###

View file

@ -0,0 +1,20 @@
$NetBSD: patch-src_network.c,v 1.1 2017/10/29 00:34:30 schmonz Exp $
Fix build without IPv6 (from https://redmine.lighttpd.net/issues/2832).
--- src/network.c.orig 2017-10-22 20:09:57.000000000 +0000
+++ src/network.c
@@ -77,9 +77,13 @@ static void network_host_normalize_addr_
if (addr->plain.sa_family == AF_INET6)
buffer_append_string_len(host, CONST_STR_LEN("]"));
if (addr->plain.sa_family != AF_UNIX) {
+ #ifdef HAVE_IPV6
unsigned short port = (addr->plain.sa_family == AF_INET)
? ntohs(addr->ipv4.sin_port)
: ntohs(addr->ipv6.sin6_port);
+ #else
+ unsigned short port = ntohs(addr->ipv4.sin_port);
+ #endif
buffer_append_string_len(host, CONST_STR_LEN(":"));
buffer_append_int(host, (int)port);
}