summaryrefslogtreecommitdiff
path: root/www/squid31
diff options
context:
space:
mode:
authortron <tron>2009-04-20 21:27:40 +0000
committertron <tron>2009-04-20 21:27:40 +0000
commit18560f0d832d3afed5721ab876625d84a5e33082 (patch)
treeb811204ef3b036df0cf589a3214bcfcbc80ff717 /www/squid31
parentca6dc2eaaa1cea49532db4a60c227cd8b79c0efc (diff)
downloadpkgsrc-18560f0d832d3afed5721ab876625d84a5e33082.tar.gz
Import Squid 3.1.0.7 as "squid31" package:
* New Version Numbering System * Minimal squid.conf improvements * Native IPv6 Support * Error Page Localization * Connection Pinning (for NTLM Auth Passthrough) * Quality of Service (QoS) Flow support * SSL Bump (for HTTPS Filtering and Adaptation) * eCAP Adaptation Module support This package is heavily based on work by Michael van Elst which includes fixes for the IPv6 support.
Diffstat (limited to 'www/squid31')
-rw-r--r--www/squid31/DESCR11
-rw-r--r--www/squid31/Makefile31
-rw-r--r--www/squid31/PLIST40
-rw-r--r--www/squid31/PLIST.common_end5
-rw-r--r--www/squid31/distinfo21
-rw-r--r--www/squid31/patches/patch-aa17
-rw-r--r--www/squid31/patches/patch-ab40
-rw-r--r--www/squid31/patches/patch-ac42
-rw-r--r--www/squid31/patches/patch-ad18
-rw-r--r--www/squid31/patches/patch-af27
-rw-r--r--www/squid31/patches/patch-ag16
-rw-r--r--www/squid31/patches/patch-ah15
-rw-r--r--www/squid31/patches/patch-ai17
-rw-r--r--www/squid31/patches/patch-aj26
-rw-r--r--www/squid31/patches/patch-ak28
-rw-r--r--www/squid31/patches/patch-al13
-rw-r--r--www/squid31/patches/patch-am151
-rw-r--r--www/squid31/patches/patch-an29
-rw-r--r--www/squid31/patches/patch-ao29
-rw-r--r--www/squid31/patches/patch-ap13
-rw-r--r--www/squid31/patches/patch-aq13
21 files changed, 602 insertions, 0 deletions
diff --git a/www/squid31/DESCR b/www/squid31/DESCR
new file mode 100644
index 00000000000..dd8b6c05081
--- /dev/null
+++ b/www/squid31/DESCR
@@ -0,0 +1,11 @@
+Squid 3.1 represents a new feature release above 3.0.
+
+The most important of these new features are:
+* New Version Numbering System
+* Minimal squid.conf improvements
+* Native IPv6 Support
+* Error Page Localization
+* Connection Pinning (for NTLM Auth Passthrough)
+* Quality of Service (QoS) Flow support
+* SSL Bump (for HTTPS Filtering and Adaptation)
+* eCAP Adaptation Module support
diff --git a/www/squid31/Makefile b/www/squid31/Makefile
new file mode 100644
index 00000000000..723a256b797
--- /dev/null
+++ b/www/squid31/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+DISTNAME= squid-3.1.0.7
+PKGNAME= ${DISTNAME} # Necessary for "pkgsrc/www/squid/options.mk"
+CATEGORIES= www
+MASTER_SITES= http://www.squid-cache.org/Versions/v3/3.1/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= tron@NetBSD.org
+HOMEPAGE= http://www.squid-cache.org/
+COMMENT= Post-Harvest_cached WWW proxy cache and accelerator
+
+LICENSE= gnu-gpl-v2
+USE_LANGUAGES= c c++
+USE_TOOLS+= perl gmake
+GNU_CONFIGURE= yes
+PKG_DESTDIR_SUPPORT= destdir
+
+.include "../../www/squid/Makefile.squid"
+
+CONFIGURE_ARGS+= --with-default-user=${SQUID_USER}
+
+SQUID_BACKENDS?= ufs
+SQUID_NTLM_AUTH_HELPERS?= fakeauth
+.include "../../www/squid/options.mk"
+
+post-build:
+ ${CP} -pf ${WRKSRC}/src/squid.conf.documented \
+ ${WRKSRC}/src/squid.conf.default
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/squid31/PLIST b/www/squid31/PLIST
new file mode 100644
index 00000000000..fca5f5ec250
--- /dev/null
+++ b/www/squid31/PLIST
@@ -0,0 +1,40 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+bin/squidclient
+libexec/cachemgr.cgi
+${PLIST.da_ldap}libexec/digest_ldap_auth
+${PLIST.da_password}libexec/digest_pw_auth
+${PLIST.diskd}libexec/diskd
+${PLIST.na_fakeauth}libexec/fakeauth_auth
+${PLIST.ba_getpwnam}libexec/getpwname_auth
+${PLIST.eacl_ip_user}libexec/ip_user_check
+${PLIST.ba_MSNT}libexec/msnt_auth
+${PLIST.ba_NCSA}libexec/ncsa_auth
+${PLIST.na_SMB}libexec/ntlm_auth
+${PLIST.ba_PAM}libexec/pam_auth
+libexec/pinger
+${PLIST.ba_LDAP}libexec/squid_ldap_auth
+${PLIST.eacl_ldap_group}libexec/squid_ldap_group
+${PLIST.eacl_unix_group}libexec/squid_unix_group
+${PLIST.unlinkd}libexec/unlinkd
+${PLIST.ba_YP}libexec/yp_auth
+man/man8/cachemgr.cgi.8
+${PLIST.ba_NCSA}man/man8/ncsa_auth.8
+${PLIST.ba_PAM}man/man8/pam_auth.8
+man/man8/squid.8
+${PLIST.ba_LDAP}man/man8/squid_ldap_auth.8
+${PLIST.eacl_ldap_group}man/man8/squid_ldap_group.8
+${PLIST.eacl_unix_group}man/man8/squid_unix_group.8
+sbin/squid
+share/doc/squid/ChangeLog
+share/doc/squid/README.FreeBSD
+share/doc/squid/README.NetBSD
+share/doc/squid/README.OpenBSD
+share/doc/squid/README.Solaris
+share/doc/squid/RELEASENOTES.html
+share/doc/squid/debug-sections.txt
+share/examples/rc.d/squid
+share/examples/squid/cachemgr.conf
+share/examples/squid/mime.conf
+share/examples/squid/msntauth.conf
+share/examples/squid/squid.conf
+${PLIST.snmp}share/squid/mib.txt
diff --git a/www/squid31/PLIST.common_end b/www/squid31/PLIST.common_end
new file mode 100644
index 00000000000..0d3ebfaf9f1
--- /dev/null
+++ b/www/squid31/PLIST.common_end
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST.common_end,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+@dirrm share/squid/icons
+@dirrm share/squid
+@dirrm share/doc/squid
+@dirrm share/examples/squid
diff --git a/www/squid31/distinfo b/www/squid31/distinfo
new file mode 100644
index 00000000000..0a14ef53c61
--- /dev/null
+++ b/www/squid31/distinfo
@@ -0,0 +1,21 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+SHA1 (squid-3.1.0.7.tar.bz2) = feba409242548f0ca2041ac1c968873453f3e0c6
+RMD160 (squid-3.1.0.7.tar.bz2) = a58496c69ee54e8495f2f959452ef8bed51a6f9e
+Size (squid-3.1.0.7.tar.bz2) = 2254073 bytes
+SHA1 (patch-aa) = 5f040d8e35cc1640633e0997363a6a615ae769b2
+SHA1 (patch-ab) = 7b89982f19c97398684dfca192a56e7077bfa21f
+SHA1 (patch-ac) = bf2508739b8917d9d7bebba3deae01b8b49986da
+SHA1 (patch-ad) = 6e67574732b38d2ddf8b351854abfd78a5903420
+SHA1 (patch-af) = 4f584a053df4f59c55af7f06a31787c9e36c8aa6
+SHA1 (patch-ag) = 1d4172d406d3e34a9582d60ebab649dbe369d985
+SHA1 (patch-ah) = e4cb16cbd65f558146204e450e794ab247c7b617
+SHA1 (patch-ai) = 0390e101199a81f782aa94815098351000f300cf
+SHA1 (patch-aj) = fbdde957ef10fc87dad7b4486aba5a0f3625e49b
+SHA1 (patch-ak) = 8cb0aaa7ea9d2241096cf82cf3640eea060ae85c
+SHA1 (patch-al) = cd8eca5a945de8901d84beb432c3be59a6814e9c
+SHA1 (patch-am) = ca5280be592db8b4037f6f8e11866972cd44a6b9
+SHA1 (patch-an) = 940c7a212a5ecfc3a2ae3bb545d4c3de8a6d6e08
+SHA1 (patch-ao) = 38e056cbffccf0c38731403f6319cc0a51af0325
+SHA1 (patch-ap) = 3b307114608b898d6462ef193c0a8be8ac074772
+SHA1 (patch-aq) = 3a13380ab91a3d4fb15ff3548c6511990cde0bbc
diff --git a/www/squid31/patches/patch-aa b/www/squid31/patches/patch-aa
new file mode 100644
index 00000000000..2fff7788b3c
--- /dev/null
+++ b/www/squid31/patches/patch-aa
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+Add DESTDIR support.
+
+--- Makefile.in.orig 2009-01-21 10:59:00.000000000 +0900
++++ Makefile.in
+@@ -770,8 +770,8 @@ dist-hook:
+ fi
+
+ install-pinger:
+- chown root $(DEFAULT_PINGER)
+- chmod 4711 $(DEFAULT_PINGER)
++ chown root $(DESTDIR)$(DEFAULT_PINGER)
++ chmod 4711 $(DESTDIR)$(DEFAULT_PINGER)
+
+ all-am:
+ @echo "Build Successful."
diff --git a/www/squid31/patches/patch-ab b/www/squid31/patches/patch-ab
new file mode 100644
index 00000000000..42636696964
--- /dev/null
+++ b/www/squid31/patches/patch-ab
@@ -0,0 +1,40 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- configure.in.orig 2009-04-08 12:51:47.000000000 +0200
++++ configure.in
+@@ -2231,6 +2231,7 @@ AC_CHECK_HEADERS( \
+ libc.h \
+ libgen.h \
+ limits.h \
++ machine/byte_swap.h \
+ malloc.h \
+ math.h \
+ memory.h \
+@@ -2320,6 +2321,7 @@ AC_CHECK_HEADERS( \
+ netinet/ip_icmp.h \
+ netinet/ip_nat.h\
+ netinet/ipl.h \
++ net/pf/pfvar.h \
+ net/pfvar.h \
+ sys/mount.h\
+ resolv.h \
+@@ -2770,8 +2772,8 @@ if test "$GCC" = "yes"; then
+ GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
+ case "$GCCVER" in
+ [2.95.[123]])
+- AC_MSG_NOTICE([Removing -O for gcc on $host with GCC $GCCVER])
+- CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
++ echo "Making -O\[[2-9\]] to -O for gcc on $host with GCC $GCCVER"
++ CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*/-O/'`"
+ ;;
+ esac
+ fi
+@@ -3131,7 +3133,7 @@ dnl PF support requires a header file.
+ if test "$PF_TRANSPARENT" ; then
+ AC_MSG_CHECKING(if PF header file is installed)
+ # hold on to your hats...
+- if test "$ac_cv_header_net_pfvar_h" = "yes"; then
++ if test "$ac_cv_header_net_pfvar_h" = "yes" || test "$ac_cv_header_net_pf_pfvar_h" = "yes"; then
+ PF_TRANSPARENT="yes"
+ AC_DEFINE(PF_TRANSPARENT, 1)
+ else
diff --git a/www/squid31/patches/patch-ac b/www/squid31/patches/patch-ac
new file mode 100644
index 00000000000..a03c54ebab7
--- /dev/null
+++ b/www/squid31/patches/patch-ac
@@ -0,0 +1,42 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- configure.orig 2009-04-08 12:51:47.000000000 +0200
++++ configure
+@@ -27447,6 +27447,7 @@ for ac_header in \
+ libc.h \
+ libgen.h \
+ limits.h \
++ machine/byte_swap.h \
+ malloc.h \
+ math.h \
+ memory.h \
+@@ -27779,6 +27780,7 @@ for ac_header in \
+ netinet/ip_icmp.h \
+ netinet/ip_nat.h\
+ netinet/ipl.h \
++ net/pf/pfvar.h \
+ net/pfvar.h \
+ sys/mount.h\
+ resolv.h \
+@@ -46608,9 +46610,9 @@ if test "$GCC" = "yes"; then
+ GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'`
+ case "$GCCVER" in
+ 2.95.[123])
+- { $as_echo "$as_me:$LINENO: Removing -O for gcc on $host with GCC $GCCVER" >&5
+-$as_echo "$as_me: Removing -O for gcc on $host with GCC $GCCVER" >&6;}
+- CFLAGS="`echo $CFLAGS | sed -e 's/-O[0-9]*//'`"
++ { $as_echo "$as_me:$LINENO: Making -O\[[2-9\]] to -O for gcc on $host with GCC $GCCVER" >&5
++$as_echo "$as_me: Making -O\[[2-9\]] to -O for gcc on $host with GCC $GCCVER" >&6;}
++ CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*/-O/'`"
+ ;;
+ esac
+ fi
+@@ -47708,7 +47710,7 @@ if test "$PF_TRANSPARENT" ; then
+ { $as_echo "$as_me:$LINENO: checking if PF header file is installed" >&5
+ $as_echo_n "checking if PF header file is installed... " >&6; }
+ # hold on to your hats...
+- if test "$ac_cv_header_net_pfvar_h" = "yes"; then
++ if test "$ac_cv_header_net_pfvar_h" = "yes" || test "$ac_cv_header_net_pf_pfvar_h" = "yes"; then
+ PF_TRANSPARENT="yes"
+ cat >>confdefs.h <<\_ACEOF
+ #define PF_TRANSPARENT 1
diff --git a/www/squid31/patches/patch-ad b/www/squid31/patches/patch-ad
new file mode 100644
index 00000000000..33ed236e62e
--- /dev/null
+++ b/www/squid31/patches/patch-ad
@@ -0,0 +1,18 @@
+$NetBSD: patch-ad,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+Don't install configuration files.
+
+--- helpers/basic_auth/MSNT/Makefile.in.orig 2008-06-22 12:35:48.000000000 +0900
++++ helpers/basic_auth/MSNT/Makefile.in
+@@ -590,9 +590,9 @@ info: info-am
+
+ info-am:
+
+-install-data-am: install-data-local
++install-data-am:
+
+-install-exec-am: install-libexecPROGRAMS install-sysconfDATA
++install-exec-am: install-libexecPROGRAMS
+
+ install-info: install-info-am
+
diff --git a/www/squid31/patches/patch-af b/www/squid31/patches/patch-af
new file mode 100644
index 00000000000..7820d6a7b44
--- /dev/null
+++ b/www/squid31/patches/patch-af
@@ -0,0 +1,27 @@
+$NetBSD: patch-af,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+Add support of existence of header files:
+ machine/byte_swap.h and net/pf/pfvar.h.
+
+--- include/autoconf.h.in.orig 2009-04-11 17:35:37.000000000 +0900
++++ include/autoconf.h.in
+@@ -306,6 +306,9 @@
+ /* Define to 1 if you have the `lrand48' function. */
+ #undef HAVE_LRAND48
+
++/* Define if you have the <machine/byte_swap.h> header file. */
++#undef HAVE_MACHINE_BYTE_SWAP_H
++
+ /* Define to 1 if you have the `mallinfo' function. */
+ #undef HAVE_MALLINFO
+
+@@ -393,6 +396,9 @@
+ /* Define to 1 if you have the <net/pfvar.h> header file. */
+ #undef HAVE_NET_PFVAR_H
+
++/* Define to 1 if you have the <net/pf/pfvar.h> header file. */
++#undef HAVE_NET_PF_PFVAR_H
++
+ /* off_t is defined by the system headers */
+ #undef HAVE_OFF_T
+
diff --git a/www/squid31/patches/patch-ag b/www/squid31/patches/patch-ag
new file mode 100644
index 00000000000..dad27b85f70
--- /dev/null
+++ b/www/squid31/patches/patch-ag
@@ -0,0 +1,16 @@
+$NetBSD: patch-ag,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+Add support of machine/byte_swap.h.
+
+--- include/squid_endian.h.orig 2008-06-22 12:35:50.000000000 +0900
++++ include/squid_endian.h
+@@ -68,6 +68,9 @@
+ #if HAVE_BYTESWAP_H
+ # include <byteswap.h>
+ #endif /* HAVE_BYTESWAP_H */
++#ifdef HAVE_MACHINE_BYTE_SWAP_H
++#include <machine/byte_swap.h>
++#endif /* HAVE_MACHINE_BYTE_SWAP_H */
+ #if HAVE_SYS_BSWAP_H
+ # include <sys/bswap.h>
+ #endif /* HAVE_MACHINE_BSWAP_H */
diff --git a/www/squid31/patches/patch-ah b/www/squid31/patches/patch-ah
new file mode 100644
index 00000000000..97ab0e4cf30
--- /dev/null
+++ b/www/squid31/patches/patch-ah
@@ -0,0 +1,15 @@
+$NetBSD: patch-ah,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+Don't install startup scripts.
+
+--- scripts/Makefile.in.orig 2008-07-18 19:02:51.000000000 +0900
++++ scripts/Makefile.in
+@@ -431,7 +431,7 @@ info-am:
+
+ install-data-am:
+
+-install-exec-am: install-binSCRIPTS
++install-exec-am:
+
+ install-info: install-info-am
+
diff --git a/www/squid31/patches/patch-ai b/www/squid31/patches/patch-ai
new file mode 100644
index 00000000000..accfc2c82f7
--- /dev/null
+++ b/www/squid31/patches/patch-ai
@@ -0,0 +1,17 @@
+$NetBSD: patch-ai,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- src/ip/IpIntercept.cc.orig 2009-04-08 12:51:05.000000000 +0200
++++ src/ip/IpIntercept.cc
+@@ -79,7 +79,12 @@
+ #include <sys/fcntl.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
++#ifdef HAVE_NET_PF_PFVAR_H
++#include <net/pf/pfvar.h>
++#endif /* HAVE_NET_PF_PFVAR_H */
++#ifdef HAVE_NET_PFVAR_H
+ #include <net/pfvar.h>
++#endif /* HAVE_NET_PFVAR_H */
+ #endif /* PF_TRANSPARENT required headers */
+
+ #if LINUX_NETFILTER
diff --git a/www/squid31/patches/patch-aj b/www/squid31/patches/patch-aj
new file mode 100644
index 00000000000..c16f37f89d6
--- /dev/null
+++ b/www/squid31/patches/patch-aj
@@ -0,0 +1,26 @@
+$NetBSD: patch-aj,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- src/Makefile.in.orig 2009-04-08 12:51:29.000000000 +0200
++++ src/Makefile.in
+@@ -1899,7 +1899,7 @@ DEFAULT_LOG_PREFIX = @DEFAULT_LOG_DIR@
+ DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log
+ DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log
+ DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log
+-DEFAULT_PID_FILE = $(DEFAULT_LOG_PREFIX)/squid.pid
++DEFAULT_PID_FILE = $(VARBASE)/run/squid.pid
+ DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state
+ DEFAULT_SWAP_DIR = $(localstatedir)/cache
+ DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
+@@ -4297,10 +4297,10 @@ info: info-recursive
+
+ info-am:
+
+-install-data-am: install-data-local install-dataDATA
++install-data-am: install-dataDATA
+
+ install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+- install-sbinPROGRAMS install-sysconfDATA
++ install-sbinPROGRAMS
+
+ install-info: install-info-recursive
+
diff --git a/www/squid31/patches/patch-ak b/www/squid31/patches/patch-ak
new file mode 100644
index 00000000000..4f8c7da3b02
--- /dev/null
+++ b/www/squid31/patches/patch-ak
@@ -0,0 +1,28 @@
+$NetBSD: patch-ak,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- src/ssl_support.cc.orig 2008-09-10 01:06:45.000000000 +0900
++++ src/ssl_support.cc
+@@ -535,7 +535,11 @@ SSL_CTX *
+ sslCreateServerContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *clientCA, const char *CAfile, const char *CApath, const char *CRLfile, const char *dhfile, const char *context)
+ {
+ int ssl_error;
++#if OPENSSL_VERSION_NUMBER < 0x00909000L
+ SSL_METHOD *method;
++#else
++ const SSL_METHOD *method;
++#endif
+ SSL_CTX *sslContext;
+ long fl = ssl_parse_flags(flags);
+
+@@ -732,7 +736,11 @@ SSL_CTX *
+ sslCreateClientContext(const char *certfile, const char *keyfile, int version, const char *cipher, const char *options, const char *flags, const char *CAfile, const char *CApath, const char *CRLfile)
+ {
+ int ssl_error;
++#if OPENSSL_VERSION_NUMBER < 0x00909000L
+ SSL_METHOD *method;
++#else
++ const SSL_METHOD *method;
++#endif
+ SSL_CTX *sslContext;
+ long fl = ssl_parse_flags(flags);
+
diff --git a/www/squid31/patches/patch-al b/www/squid31/patches/patch-al
new file mode 100644
index 00000000000..1ecdd904604
--- /dev/null
+++ b/www/squid31/patches/patch-al
@@ -0,0 +1,13 @@
+$NetBSD: patch-al,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- tools/Makefile.in.orig 2008-06-22 12:35:54.000000000 +0900
++++ tools/Makefile.in
+@@ -794,7 +794,7 @@ info: info-recursive
+
+ info-am:
+
+-install-data-am: install-data-local
++install-data-am:
+
+ install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
+
diff --git a/www/squid31/patches/patch-am b/www/squid31/patches/patch-am
new file mode 100644
index 00000000000..3b1b1b83f48
--- /dev/null
+++ b/www/squid31/patches/patch-am
@@ -0,0 +1,151 @@
+--- src/ip/IpAddress.cc.orig 2009-04-18 15:12:22.000000000 +0200
++++ src/ip/IpAddress.cc 2009-04-18 15:38:23.000000000 +0200
+@@ -247,11 +247,7 @@
+ #if USE_IPV6
+
+ return IsAnyAddr() || IsNoAddr() ||
+- ( m_SocketAddr.sin6_addr.s6_addr32[0] == htonl(0x00000000) &&
+- m_SocketAddr.sin6_addr.s6_addr32[1] == htonl(0x00000000) &&
+- m_SocketAddr.sin6_addr.s6_addr32[2] == htonl(0x0000FFFF)
+- );
+-
++ IN6_IS_ADDR_V4MAPPED( &m_SocketAddr.sin6_addr );
+ #else
+ return true; // enforce IPv4 in IPv4-only mode.
+ #endif
+@@ -262,10 +258,7 @@
+ #if USE_IPV6
+
+ return IsAnyAddr() || IsNoAddr() ||
+- !( m_SocketAddr.sin6_addr.s6_addr32[0] == htonl(0x00000000) &&
+- m_SocketAddr.sin6_addr.s6_addr32[1] == htonl(0x00000000) &&
+- m_SocketAddr.sin6_addr.s6_addr32[2] == htonl(0x0000FFFF)
+- );
++ !IN6_IS_ADDR_V4MAPPED( &m_SocketAddr.sin6_addr );
+ #else
+ return false; // enforce IPv4 in IPv4-only mode.
+ #endif
+@@ -274,11 +267,7 @@
+ bool IpAddress::IsAnyAddr() const
+ {
+ #if USE_IPV6
+- return m_SocketAddr.sin6_addr.s6_addr32[0] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[1] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[2] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[3] == 0
+- ;
++ return IN6_IS_ADDR_UNSPECIFIED( &m_SocketAddr.sin6_addr );
+ #else
+
+ return (INADDR_ANY == m_SocketAddr.sin_addr.s_addr);
+@@ -304,15 +293,20 @@
+ bool IpAddress::SetIPv4()
+ {
+ #if USE_IPV6
++ static const struct in6_addr v4_localhost =
++ {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++ 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}};
++ static const struct in6_addr v4_any =
++ {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}};
+
+ if ( IsLocalhost() ) {
+- m_SocketAddr.sin6_addr.s6_addr32[2] = htonl(0xffff);
+- m_SocketAddr.sin6_addr.s6_addr32[3] = htonl(0x7F000001);
++ m_SocketAddr.sin6_addr = v4_localhost;
+ return true;
+ }
+
+ if ( IsAnyAddr() ) {
+- m_SocketAddr.sin6_addr.s6_addr32[2] = htonl(0xffff);
++ m_SocketAddr.sin6_addr = v4_any;
+ return true;
+ }
+
+@@ -329,17 +323,13 @@
+ bool IpAddress::IsLocalhost() const
+ {
+ #if USE_IPV6
+- return ( m_SocketAddr.sin6_addr.s6_addr32[0] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[1] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[2] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[3] == htonl(0x1)
+- )
++ static const struct in6_addr v4_localhost =
++ {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++ 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}};
++
++ return IN6_IS_ADDR_LOOPBACK( &m_SocketAddr.sin6_addr )
+ ||
+- ( m_SocketAddr.sin6_addr.s6_addr32[0] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[1] == 0
+- && m_SocketAddr.sin6_addr.s6_addr32[2] == htonl(0xffff)
+- && m_SocketAddr.sin6_addr.s6_addr32[3] == htonl(0x7F000001)
+- );
++ IN6_ARE_ADDR_EQUAL( &m_SocketAddr.sin6_addr, &v4_localhost );
+ #else
+
+ return (htonl(0x7F000001) == m_SocketAddr.sin_addr.s_addr);
+@@ -363,11 +353,11 @@
+ {
+ // IFF the address == 0xff..ff (all ones)
+ #if USE_IPV6
+- return m_SocketAddr.sin6_addr.s6_addr32[0] == 0xFFFFFFFF
+- && m_SocketAddr.sin6_addr.s6_addr32[1] == 0xFFFFFFFF
+- && m_SocketAddr.sin6_addr.s6_addr32[2] == 0xFFFFFFFF
+- && m_SocketAddr.sin6_addr.s6_addr32[3] == 0xFFFFFFFF
+- ;
++ static const struct in6_addr v6_noaddr =
++ {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
++ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}};
++
++ return IN6_ARE_ADDR_EQUAL( &m_SocketAddr.sin6_addr, &v6_noaddr );
+ #else
+
+ return 0xFFFFFFFF == m_SocketAddr.sin_addr.s_addr;
+@@ -440,7 +430,7 @@
+ if (show_type == AF_INET && IsIPv4()) {
+ #if USE_IPV6
+
+- return GetReverseString4(buf, *(struct in_addr*)&m_SocketAddr.sin6_addr.s6_addr32[3] );
++ return GetReverseString4(buf, *(struct in_addr*)&m_SocketAddr.sin6_addr.s6_addr[12] );
+ } else if ( show_type == AF_INET6 && IsIPv6() ) {
+ return GetReverseString6(buf, m_SocketAddr.sin6_addr);
+ #else
+@@ -1157,17 +1147,17 @@
+ } else if ( in.s_addr == 0xFFFFFFFF) {
+ /* NOADDR */
+
+- out.s6_addr32[0] = 0xFFFFFFFF;
+- out.s6_addr32[1] = 0xFFFFFFFF;
+- out.s6_addr32[2] = 0xFFFFFFFF;
+- out.s6_addr32[3] = 0xFFFFFFFF;
+-
++ memset(&out, 255, sizeof(struct in6_addr));
+ } else {
+ /* general */
+
+ memset(&out, 0, sizeof(struct in6_addr));
+- out.s6_addr32[2] = htonl(0xFFFF);
+- out.s6_addr32[3] = in.s_addr;
++ out.s6_addr[10] = 0xFF;
++ out.s6_addr[11] = 0xFF;
++ out.s6_addr[12] = ((uint8_t *)&in.s_addr)[0];
++ out.s6_addr[13] = ((uint8_t *)&in.s_addr)[1];
++ out.s6_addr[14] = ((uint8_t *)&in.s_addr)[2];
++ out.s6_addr[15] = ((uint8_t *)&in.s_addr)[3];
+ }
+ }
+
+@@ -1177,7 +1167,10 @@
+ /* general */
+
+ memset(&out, 0, sizeof(struct in_addr));
+- out.s_addr = in.s6_addr32[3];
++ ((uint8_t *)&out.s_addr)[0] = in.s6_addr[12];
++ ((uint8_t *)&out.s_addr)[1] = in.s6_addr[13];
++ ((uint8_t *)&out.s_addr)[2] = in.s6_addr[14];
++ ((uint8_t *)&out.s_addr)[3] = in.s6_addr[15];
+ }
+
+ #endif
diff --git a/www/squid31/patches/patch-an b/www/squid31/patches/patch-an
new file mode 100644
index 00000000000..d37f4cc80a6
--- /dev/null
+++ b/www/squid31/patches/patch-an
@@ -0,0 +1,29 @@
+$NetBSD: patch-an,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- helpers/negotiate_auth/squid_kerb_auth/configure.in.orig 2009-04-08 12:50:56.000000000 +0200
++++ helpers/negotiate_auth/squid_kerb_auth/configure.in
+@@ -286,21 +286,21 @@ if test "$enable_arg" = "no"; then
+ AC_CHECK_PROG(ac_krb5_config,krb5-config,yes,no)
+ case $sys in
+ Linux) rpm -q heimdal-lib >/dev/null 2>&1
+- if test $? == 0 ; then
++ if test $? = 0 ; then
+ check_heimdal
+ else
+ check_mit
+ fi
+ ;;
+ AIX) lslpp -L krb5.client.rte >/dev/null 2>&1
+- if test $? == 0 ; then
++ if test $? = 0 ; then
+ check_nas
+ else
+ check_mit
+ fi
+ ;;
+ SunOS) pkginfo SUNWgss >/dev/null 2>&1
+- if test $? == 0 ; then
++ if test $? = 0 ; then
+ check_seam
+ else
+ check_mit
diff --git a/www/squid31/patches/patch-ao b/www/squid31/patches/patch-ao
new file mode 100644
index 00000000000..f320fd213d6
--- /dev/null
+++ b/www/squid31/patches/patch-ao
@@ -0,0 +1,29 @@
+$NetBSD: patch-ao,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- helpers/negotiate_auth/squid_kerb_auth/configure.orig 2009-04-08 12:51:47.000000000 +0200
++++ helpers/negotiate_auth/squid_kerb_auth/configure
+@@ -6330,21 +6330,21 @@ fi
+
+ case $sys in
+ Linux) rpm -q heimdal-lib >/dev/null 2>&1
+- if test $? == 0 ; then
++ if test $? = 0 ; then
+ check_heimdal
+ else
+ check_mit
+ fi
+ ;;
+ AIX) lslpp -L krb5.client.rte >/dev/null 2>&1
+- if test $? == 0 ; then
++ if test $? = 0 ; then
+ check_nas
+ else
+ check_mit
+ fi
+ ;;
+ SunOS) pkginfo SUNWgss >/dev/null 2>&1
+- if test $? == 0 ; then
++ if test $? = 0 ; then
+ check_seam
+ else
+ check_mit
diff --git a/www/squid31/patches/patch-ap b/www/squid31/patches/patch-ap
new file mode 100644
index 00000000000..c36c0237c76
--- /dev/null
+++ b/www/squid31/patches/patch-ap
@@ -0,0 +1,13 @@
+$NetBSD: patch-ap,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- test-suite/testheaders.sh.orig 2009-04-08 12:51:07.000000000 +0200
++++ test-suite/testheaders.sh
+@@ -10,7 +10,7 @@
+ #
+ cc="${1}"
+
+-if [ "${2}" == "" ]; then
++if [ "${2}" = "" ]; then
+ dir="."
+ else
+ dir="${2}"
diff --git a/www/squid31/patches/patch-aq b/www/squid31/patches/patch-aq
new file mode 100644
index 00000000000..c059c72beab
--- /dev/null
+++ b/www/squid31/patches/patch-aq
@@ -0,0 +1,13 @@
+$NetBSD: patch-aq,v 1.1.1.1 2009/04/20 21:27:40 tron Exp $
+
+--- errors/Makefile.in.orig 2009-04-08 12:51:20.000000000 +0200
++++ errors/Makefile.in
+@@ -280,7 +280,7 @@ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ errordir = $(datadir)/errors
+ DEFAULT_ERROR_DIR = $(errordir)
+-DEFAULT_STYLESHEET = $(sysconfdir)/errorpage.css
++DEFAULT_STYLESHEET = $(EGDIR)/errorpage.css
+
+ # List of automated translations possible:
+ TRANSLATIONS = \