1 | # -*- 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 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup cxx11 1.1 |
---|
5 | |
---|
6 | name squid4 |
---|
7 | version 4.5 |
---|
8 | categories net |
---|
9 | platforms darwin |
---|
10 | license GPL-2+ |
---|
11 | maintainers {jmr @jmroot} openmaintainer |
---|
12 | description advanced proxy caching server for http, https, ftp, gopher |
---|
13 | long_description Squid is a high-performance proxy caching server for \ |
---|
14 | web clients, supporting FTP, gopher, and HTTP data \ |
---|
15 | objects. Unlike traditional caching software, Squid \ |
---|
16 | handles all requests in a single, non-blocking, \ |
---|
17 | I/O-driven process. Squid keeps meta data and \ |
---|
18 | especially hot objects cached in RAM, caches DNS \ |
---|
19 | lookups, supports non-blocking DNS lookups, and \ |
---|
20 | implements negative caching of failed requests. \ |
---|
21 | Squid 4.x is the latest release series, and needs a \ |
---|
22 | C++11 compiler to build. |
---|
23 | |
---|
24 | homepage http://www.squid-cache.org/ |
---|
25 | master_sites https://mirror.aarnet.edu.au/pub/squid/squid/ \ |
---|
26 | https://www.mirrorservice.org/sites/ftp.squid-cache.org/pub/squid/ \ |
---|
27 | http://ftp.ring.gr.jp/archives/net/www/squid/ \ |
---|
28 | ftp://ftp.is.co.za/pub/squid/ \ |
---|
29 | ftp://ftp1.cl.squid-cache.org/pub/squid/ \ |
---|
30 | http://www.squid-cache.org/Versions/v4/ \ |
---|
31 | ftp://ftp.squid-cache.org/pub/squid/ |
---|
32 | |
---|
33 | distname squid-${version} |
---|
34 | use_xz yes |
---|
35 | checksums md5 8275da5846f9f2243ad2625e5aef2ee0 \ |
---|
36 | sha1 1249cf60f1ea2a0cd145f66a790d1e9e48333c51 \ |
---|
37 | rmd160 a978922c3a096db1a883f068ab6a3e15645a1596 |
---|
38 | |
---|
39 | patchfiles patch-cf.data.pre.diff \ |
---|
40 | patch-compat_types.h.diff \ |
---|
41 | patch-basic_pam_auth.cc.diff \ |
---|
42 | kerberos_ldap_group_Makefile.in.diff |
---|
43 | |
---|
44 | platform darwin 10 { |
---|
45 | # ticket #37102, /usr/include/rpcsvc/yp_prot.h tries to redefine bool |
---|
46 | patchfiles-append snowleopard-bool.diff |
---|
47 | } |
---|
48 | |
---|
49 | depends_build port:pkgconfig |
---|
50 | depends_lib port:expat port:zlib |
---|
51 | |
---|
52 | conflicts squid2 squid3 |
---|
53 | |
---|
54 | configure.args --mandir=${prefix}/share/man \ |
---|
55 | --sysconfdir=${prefix}/etc/squid \ |
---|
56 | --datadir=${prefix}/share/squid \ |
---|
57 | --localstatedir=${prefix}/var/squid \ |
---|
58 | --libexecdir=${prefix}/libexec/squid \ |
---|
59 | --with-swapdir=${prefix}/var/squid/cache \ |
---|
60 | --with-pidfile=${prefix}/var/run/squid/squid.pid \ |
---|
61 | --disable-strict-error-checking \ |
---|
62 | --disable-loadable-modules \ |
---|
63 | --disable-arch-native \ |
---|
64 | --without-cppunit \ |
---|
65 | --without-gnugss \ |
---|
66 | --without-gnutls \ |
---|
67 | --without-libxml2 \ |
---|
68 | --without-mit-krb5 \ |
---|
69 | --without-heimdal-krb5 \ |
---|
70 | --without-nettle \ |
---|
71 | --without-openssl \ |
---|
72 | --enable-delay-pools \ |
---|
73 | --enable-zph-qos \ |
---|
74 | --enable-removal-policies \ |
---|
75 | --enable-storeio=ufs,aufs,diskd,rock \ |
---|
76 | --enable-log-daemon-helpers \ |
---|
77 | --with-default-user=squid \ |
---|
78 | --enable-auth \ |
---|
79 | --enable-auth-basic \ |
---|
80 | --enable-auth-digest \ |
---|
81 | --enable-auth-negotiate="wrapper" \ |
---|
82 | --enable-auth-ntlm \ |
---|
83 | --enable-http-violations |
---|
84 | post-configure { |
---|
85 | if {[variant_isset universal]} { |
---|
86 | system -W ${worksrcpath} "ed - include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1" |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | startupitem.create yes |
---|
91 | startupitem.name Squid |
---|
92 | startupitem.netchange yes |
---|
93 | startupitem.executable ${prefix}/sbin/squid -s --foreground |
---|
94 | |
---|
95 | add_users squid group=squid home=${prefix}/var/squid |
---|
96 | |
---|
97 | notes "Before starting $name for the first time, create the cache directories\ |
---|
98 | with: |
---|
99 | ${prefix}/sbin/squid -s -z --foreground" |
---|
100 | |
---|
101 | post-destroot { |
---|
102 | xinstall -o squid -g squid -m 755 -d \ |
---|
103 | ${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid \ |
---|
104 | ${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs |
---|
105 | file delete -force ${destroot}${prefix}/etc/squid/squid.conf \ |
---|
106 | ${destroot}${prefix}/etc/squid/mime.conf \ |
---|
107 | ${destroot}${prefix}/etc/squid/cachemgr.conf \ |
---|
108 | ${destroot}${prefix}/etc/squid/errorpage.css |
---|
109 | } |
---|
110 | destroot.keepdirs ${destroot}${prefix}/var/run/squid \ |
---|
111 | ${destroot}${prefix}/var/squid/cache \ |
---|
112 | ${destroot}${prefix}/var/squid/logs |
---|
113 | |
---|
114 | post-activate { |
---|
115 | # Make sure initial conf files are present and setup correctly |
---|
116 | foreach f { squid.conf mime.conf cachemgr.conf errorpage.css } { |
---|
117 | if {![file exists ${prefix}/etc/squid/${f}]} { |
---|
118 | file copy ${prefix}/etc/squid/${f}.default \ |
---|
119 | ${prefix}/etc/squid/${f} |
---|
120 | } |
---|
121 | } |
---|
122 | } |
---|
123 | |
---|
124 | variant openssl conflicts gnutls description "Enable SSL/TLS support using OpenSSL" { |
---|
125 | # This release does not work with LibreSSL. |
---|
126 | #depends_lib-append path:lib/libssl.dylib:openssl |
---|
127 | depends_lib-append port:openssl |
---|
128 | configure.args-delete --without-openssl |
---|
129 | configure.args-append --with-openssl=${prefix} |
---|
130 | } |
---|
131 | |
---|
132 | if {![variant_isset gnutls]} { |
---|
133 | default_variants +openssl |
---|
134 | } |
---|
135 | |
---|
136 | variant gnutls conflicts openssl description "Enable SSL/TLS support using GnuTLS (experimental)" { |
---|
137 | depends_lib-append port:gnutls |
---|
138 | configure.args-delete --without-gnutls |
---|
139 | } |
---|
140 | |
---|
141 | variant ipfw_transparent description "Enable transparent proxy support using IPFW" { |
---|
142 | configure.args-append --enable-ipfw-transparent |
---|
143 | } |
---|
144 | |
---|
145 | variant kerberos description "Enable MIT kerberos support" { |
---|
146 | depends_lib-append port:kerberos5 |
---|
147 | configure.args-delete --enable-auth-negotiate="wrapper" \ |
---|
148 | --without-mit-krb5 |
---|
149 | configure.args-append --enable-auth-negotiate |
---|
150 | } |
---|
151 | |
---|
152 | livecheck.type regex |
---|
153 | livecheck.url http://www.squid-cache.org/Versions/v4/ |
---|
154 | livecheck.regex "squid-(\[0-9.\]+)-RELEASENOTES\\.html" |
---|