diff options
author | krion <krion@FreeBSD.org> | 2004-04-10 02:54:13 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-04-10 02:54:13 +0800 |
commit | 3328e1611f20a6ba0afe278193dd0b82b6117a1c (patch) | |
tree | d1fb3f025272f7f8f809a67c51c37d746c8998b3 /www/squid31 | |
parent | f17c72b8f95374dd22de4111298ae135627f895a (diff) | |
download | freebsd-ports-gnome-3328e1611f20a6ba0afe278193dd0b82b6117a1c.tar.gz freebsd-ports-gnome-3328e1611f20a6ba0afe278193dd0b82b6117a1c.tar.zst freebsd-ports-gnome-3328e1611f20a6ba0afe278193dd0b82b6117a1c.zip |
- Integrate two new vendor patches, please see
<http://www.squid-cache.org/Versions/v2/2.5/bugs/> for details
- Correct OpenSSL support and, while at it, clean up CFLAGS and
LDFLAGS handling (thanks to dinoex for lots of helpful advice!).
- better be safe than sorry and pass PTHREAD_CFLAGS through in
case we are compiling with threads
- try to remove the errorpages directory silently since user
defined directories might legitimately be present
- clean up shell scripting:
+ do not use too many variables
+ use /bin/sh's features instead of external commands
PR: ports/65356
Submitted by: maintainer
Diffstat (limited to 'www/squid31')
-rw-r--r-- | www/squid31/Makefile | 35 | ||||
-rw-r--r-- | www/squid31/distinfo | 4 | ||||
-rw-r--r-- | www/squid31/files/squid.sh | 2 | ||||
-rw-r--r-- | www/squid31/pkg-install | 4 |
4 files changed, 32 insertions, 13 deletions
diff --git a/www/squid31/Makefile b/www/squid31/Makefile index 45eb961ba064..896629336d38 100644 --- a/www/squid31/Makefile +++ b/www/squid31/Makefile @@ -29,7 +29,7 @@ PORTNAME= squid PORTVERSION= 2.5.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= \ ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ @@ -47,7 +47,9 @@ PATCHFILES= squid-2.5.STABLE5-ntlm_assert.patch \ squid-2.5.STABLE5-helper_warning.patch \ squid-2.5.STABLE5-vary.patch \ squid-2.5.STABLE5-deny_info.patch \ - squid-2.5.STABLE5-CONNECT_timeout.patch + squid-2.5.STABLE5-CONNECT_timeout.patch \ + squid-2.5.STABLE5-cache_swap_log.patch \ + squid-2.5.STABLE5-ntlm_warning.patch PATCH_DIST_STRIP= -p1 MAINTAINER= tmseck@netcologne.de @@ -110,8 +112,8 @@ external_acl= ip_user unix_group wbinfo_group winbind_group MAN8+= pam_auth.8 squid_unix_group.8 .if defined(WITH_SQUID_LDAP_AUTH) USE_OPENLDAP= yes -CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib MAN8+= squid_ldap_auth.8 squid_ldap_group.8 basic_auth+= LDAP external_acl+= ldap_group @@ -128,7 +130,9 @@ store_types= ufs diskd null .if defined(WITH_SQUID_AUFS) store_types+= aufs # Nil aufs threads is default, set any other value via SQUID_CONFIGURE_ARGS -CONFIGURE_ARGS+= --enable-async-io --with-pthreads +CONFIGURE_ARGS+= --enable-async-io \ + --with-pthreads +CFLAGS+= ${PTHREAD_CFLAGS} .endif .if defined(WITH_SQUID_COSS) store_types+= coss @@ -148,7 +152,14 @@ CONFIGURE_ARGS+= --enable-snmp CONFIGURE_ARGS+= --enable-carp .endif .if defined(WITH_SQUID_SSL) -CONFIGURE_ARGS+= --enable-ssl +# we need to .include bsd.openssl.mk manually here because USE_OPENSSL only +# works when it is defined before bsd.port{.pre}.mk is .included and this is +# not possible when using OPTIONS +.include "${PORTSDIR}/Mk/bsd.openssl.mk" +CONFIGURE_ARGS+= --enable-ssl \ + --with-openssl="${OPENSSLBASE}" +CFLAGS+= -I${OPENSSLINC} +LDFLAGS+= -I${LOCALBASE}/lib .endif .if defined(WITH_SQUID_PINGER) CONFIGURE_ARGS+= --enable-icmp @@ -189,8 +200,8 @@ CONFIGURE_ARGS+= --enable-arp-acl .if defined(WITH_SQUID_PF) .if ${OSVERSION} >= 502106 # This will work only systems where PF is part of the base system for now. -# If someone is eager to teach autoconf to pick up the pf port -# on 5.[0-2] systems instead, go on, I will integrate your patch. +# If someone is eager to teach squid's configure script how to pick up the pf +# port on 5.[0-2] systems instead, go on, I will integrate your patch. CONFIGURE_ARGS+= --enable-pf-transparent .else IGNORE= WITH_SQUID_PF only works on systems where pf is part of the base system. @@ -253,6 +264,9 @@ CONFIGURE_ARGS+= --enable-err-languages="${SQUID_LANGUAGES}" \ CONFIGURE_ARGS+= ${SQUID_CONFIGURE_ARGS} +CONFIGURE_ENV+= CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" + post-patch: @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|g' ${WRKSRC}/doc/squid.8 @@ -270,7 +284,7 @@ pre-install: >${WRKDIR}/squid.sh pre-su-install: - @${SETENV} SQUID_USER=${SQUID_UID} SQUID_GROUP=${SQUID_GID} \ + @${SETENV} squid_user=${SQUID_UID} squid_group=${SQUID_GID} \ PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: @@ -297,7 +311,8 @@ post-install: >>${TMPPLIST} @${ECHO_CMD} "@dirrm etc/squid/errors/${d}" >>${TMPPLIST} .endfor - @${ECHO_CMD} "@dirrm etc/squid/errors" >>${TMPPLIST} + @${ECHO_CMD} "@unexec rmdir etc/squid/errors 2>/dev/null || true" \ + >>${TMPPLIST} changeuser: # Recover from the problem that earlier versions of this port created the diff --git a/www/squid31/distinfo b/www/squid31/distinfo index ccb086c6897f..ec16de9f290b 100644 --- a/www/squid31/distinfo +++ b/www/squid31/distinfo @@ -12,3 +12,7 @@ MD5 (squid2.5/squid-2.5.STABLE5-deny_info.patch) = bf73b60d02964ad9e410565389e73 SIZE (squid2.5/squid-2.5.STABLE5-deny_info.patch) = 1282 MD5 (squid2.5/squid-2.5.STABLE5-CONNECT_timeout.patch) = b6aa700c75a061dc9658d8dc198a9183 SIZE (squid2.5/squid-2.5.STABLE5-CONNECT_timeout.patch) = 2531 +MD5 (squid2.5/squid-2.5.STABLE5-cache_swap_log.patch) = 8009bc493487a98b5f3deb01add66734 +SIZE (squid2.5/squid-2.5.STABLE5-cache_swap_log.patch) = 1245 +MD5 (squid2.5/squid-2.5.STABLE5-ntlm_warning.patch) = 57ec2b3e27dcff757412d6d0a6d3c778 +SIZE (squid2.5/squid-2.5.STABLE5-ntlm_warning.patch) = 900 diff --git a/www/squid31/files/squid.sh b/www/squid31/files/squid.sh index 5fbf1f3d24ba..73fb0504db7a 100644 --- a/www/squid31/files/squid.sh +++ b/www/squid31/files/squid.sh @@ -61,7 +61,7 @@ else fi ;; *) - echo "usage: `basename $0` {start|stop}" >&2 + echo "usage: ${0##*/} {start|stop}" >&2 exit 64 ;; esac diff --git a/www/squid31/pkg-install b/www/squid31/pkg-install index e22d6b02f09f..4eaff14137dd 100644 --- a/www/squid31/pkg-install +++ b/www/squid31/pkg-install @@ -7,8 +7,8 @@ PATH=/bin:/usr/bin:/usr/sbin pkgname=$1 squid_base=${PKG_PREFIX:-/usr/local}/squid squid_confdir=${PKG_PREFIX:-/usr/local}/etc/squid -squid_user=${SQUID_USER:=squid} -squid_group=${SQUID_GROUP:=squid} +: ${squid_user:=squid} +: ${squid_group:=squid} squid_gid=100 squid_uid=100 # Try to catch the case where the $squid_user might have been created with an |