2018-07-22 13:46:55 +10:00
|
|
|
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
|
|
|
|
|
|
PortSystem 1.0
|
|
|
|
|
|
|
|
|
|
name squid2
|
|
|
|
|
version 2.7.STABLE9
|
2021-11-04 22:26:10 +00:00
|
|
|
revision 2
|
2018-07-22 13:46:55 +10:00
|
|
|
set branch [join [lrange [split ${version} .] 0 1] .]
|
|
|
|
|
categories net
|
|
|
|
|
license GPL-2+
|
|
|
|
|
maintainers {jmr @jmroot} openmaintainer
|
|
|
|
|
description advanced proxy caching server for http, https, ftp, gopher
|
|
|
|
|
long_description Squid is a high-performance proxy caching server for \
|
|
|
|
|
web clients, supporting FTP, gopher, and HTTP data \
|
|
|
|
|
objects. Unlike traditional caching software, Squid \
|
|
|
|
|
handles all requests in a single, non-blocking, \
|
|
|
|
|
I/O-driven process. Squid keeps meta data and \
|
|
|
|
|
especially hot objects cached in RAM, caches DNS \
|
|
|
|
|
lookups, supports non-blocking DNS lookups, and \
|
|
|
|
|
implements negative caching of failed requests. \
|
|
|
|
|
Squid 2.x is an old release series, which is mostly \
|
|
|
|
|
obsolete but still has a few features that have not \
|
2023-08-24 00:43:53 +10:00
|
|
|
yet been ported to 6.x.
|
2018-07-22 13:46:55 +10:00
|
|
|
|
|
|
|
|
homepage http://www.squid-cache.org/
|
|
|
|
|
master_sites https://mirror.aarnet.edu.au/pub/squid/squid/ \
|
|
|
|
|
https://www.mirrorservice.org/sites/ftp.squid-cache.org/pub/squid/ \
|
|
|
|
|
http://ftp.ring.gr.jp/archives/net/www/squid/ \
|
|
|
|
|
ftp://ftp.is.co.za/pub/squid/ \
|
|
|
|
|
ftp://ftp1.cl.squid-cache.org/pub/squid/ \
|
|
|
|
|
http://www.squid-cache.org/Versions/v2/${branch}/ \
|
|
|
|
|
ftp://ftp.squid-cache.org/pub/squid/
|
|
|
|
|
|
|
|
|
|
distname squid-${version}
|
|
|
|
|
dist_subdir squid
|
|
|
|
|
checksums md5 3c6642c85470b1079207d43bba25a819 \
|
|
|
|
|
sha1 bd389da9b74fd338e358f6b3f83bd3a1ed4d4f6f \
|
|
|
|
|
rmd160 bfa7c3dc3ede68646603f3379de35f44d7d8e97d
|
|
|
|
|
|
|
|
|
|
use_bzip2 yes
|
|
|
|
|
patchfiles patch-cf.data.pre.diff \
|
|
|
|
|
patch-configure.diff \
|
|
|
|
|
patch-pam_auth.c.diff \
|
2021-11-10 00:27:49 +11:00
|
|
|
src__ssl_support.c.diff \
|
|
|
|
|
implicit.diff
|
2018-07-22 13:46:55 +10:00
|
|
|
|
|
|
|
|
depends_lib port:zlib
|
|
|
|
|
|
2025-01-11 09:17:38 +11:00
|
|
|
conflicts squid squid3
|
2018-07-22 13:46:55 +10:00
|
|
|
|
2021-11-10 00:27:49 +11:00
|
|
|
# replace old config.{guess,sub} with recent versions from automake
|
|
|
|
|
depends_build-append port:automake
|
|
|
|
|
post-patch {
|
|
|
|
|
set automake_dirs [glob -directory ${prefix}/share automake-*]
|
|
|
|
|
set automake_dir [lindex [lsort -command vercmp $automake_dirs] end]
|
|
|
|
|
copy -force ${automake_dir}/config.guess ${automake_dir}/config.sub \
|
|
|
|
|
${worksrcpath}/cfgaux/
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-22 13:46:55 +10:00
|
|
|
configure.args --with-pthreads \
|
|
|
|
|
--mandir=${prefix}/share/man \
|
|
|
|
|
--sysconfdir=${prefix}/etc/squid \
|
|
|
|
|
--datadir=${prefix}/share/squid \
|
|
|
|
|
--localstatedir=${prefix}/var/squid \
|
|
|
|
|
--libexecdir=${prefix}/libexec/squid \
|
|
|
|
|
--enable-delay-pools \
|
|
|
|
|
--enable-removal-policies \
|
|
|
|
|
--enable-storeio=ufs,aufs,diskd,coss,null \
|
|
|
|
|
--enable-auth=negotiate,ntlm,digest,basic \
|
|
|
|
|
--enable-negotiate-auth-helpers=squid_kerb_auth \
|
|
|
|
|
--enable-ntlm-auth-helpers=SMB,fakeauth,no_check \
|
|
|
|
|
--enable-digest-auth-helpers=eDirectory,ldap,password \
|
|
|
|
|
--enable-basic-auth-helpers=DB,LDAP,MSNT,NCSA,PAM,POP3,SASL,SMB,YP,getpwnam,multi-domain-NTLM,squid_radius_auth
|
|
|
|
|
post-configure {
|
2021-01-31 07:05:59 +11:00
|
|
|
if {[variant_exists universal] && [variant_isset universal]} {
|
2018-07-22 13:46:55 +10:00
|
|
|
system "cd ${worksrcpath} && ed - ${worksrcpath}/include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set pidfile ${prefix}/var/run/squid/squid.pid
|
|
|
|
|
|
|
|
|
|
build.args DEFAULT_PID_FILE=${pidfile}
|
|
|
|
|
|
|
|
|
|
startupitem.create yes
|
|
|
|
|
startupitem.name Squid
|
|
|
|
|
startupitem.netchange yes
|
|
|
|
|
startupitem.pidfile auto ${pidfile}
|
|
|
|
|
startupitem.start \
|
|
|
|
|
"cd ${prefix}/var/squid" \
|
|
|
|
|
"if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \
|
|
|
|
|
" ${prefix}/sbin/squid -s -z" \
|
|
|
|
|
"fi" \
|
|
|
|
|
"${prefix}/sbin/squid -s"
|
|
|
|
|
startupitem.stop \
|
|
|
|
|
"cd ${prefix}/var/squid" \
|
|
|
|
|
"${prefix}/sbin/squid -k shutdown" \
|
|
|
|
|
"while ${prefix}/sbin/squid -k check; do" \
|
|
|
|
|
" sleep 1" \
|
|
|
|
|
"done"
|
|
|
|
|
|
|
|
|
|
add_users squid group=squid home=${prefix}/var/squid
|
|
|
|
|
|
|
|
|
|
post-destroot {
|
|
|
|
|
xinstall -o squid -g squid -m 755 -d \
|
|
|
|
|
${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid \
|
|
|
|
|
${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs
|
|
|
|
|
file delete -force ${destroot}${prefix}/etc/squid/squid.conf \
|
|
|
|
|
${destroot}${prefix}/etc/squid/mime.conf \
|
|
|
|
|
${destroot}${prefix}/etc/squid/msntauth.conf
|
|
|
|
|
move ${destroot}${prefix}/etc/squid/cachemgr.conf \
|
|
|
|
|
${destroot}${prefix}/etc/squid/cachemgr.conf.default
|
|
|
|
|
}
|
|
|
|
|
destroot.keepdirs ${destroot}${prefix}/var/run/squid \
|
|
|
|
|
${destroot}${prefix}/var/squid/cache \
|
|
|
|
|
${destroot}${prefix}/var/squid/logs
|
|
|
|
|
|
|
|
|
|
post-activate {
|
|
|
|
|
# Make sure initial conf files are present and setup correctly
|
|
|
|
|
foreach f { squid.conf mime.conf cachemgr.conf msntauth.conf } {
|
|
|
|
|
if {![file exists ${prefix}/etc/squid/${f}]} {
|
|
|
|
|
file copy ${prefix}/etc/squid/${f}.default \
|
|
|
|
|
${prefix}/etc/squid/${f}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variant openssl description "Enable SSL/TLS support using OpenSSL" {
|
|
|
|
|
depends_lib-append path:lib/libssl.dylib:openssl
|
|
|
|
|
configure.args-append --with-openssl=${prefix} \
|
|
|
|
|
--enable-ssl
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default_variants +openssl
|
|
|
|
|
|
|
|
|
|
livecheck.type regex
|
|
|
|
|
livecheck.url http://www.squid-cache.org/Versions/v2/${branch}/
|
|
|
|
|
livecheck.regex squid-(${branch}\\.STABLE\[0-9\\.\]+)-RELEASENOTES
|