Ticket #58019: Portfile

File Portfile, 6.0 KB (added by essandess (Steve Smith), 5 years ago)

Modified squid4 port file with --enable-http-violations configure flag

Line 
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
3PortSystem 1.0
4PortGroup cxx11 1.1
5
6name            squid4
7version         4.5
8categories      net
9platforms       darwin
10license         GPL-2+
11maintainers     {jmr @jmroot} openmaintainer
12description     advanced proxy caching server for http, https, ftp, gopher
13long_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
24homepage        http://www.squid-cache.org/
25master_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
33distname        squid-${version}
34use_xz          yes
35checksums       md5 8275da5846f9f2243ad2625e5aef2ee0 \
36                sha1 1249cf60f1ea2a0cd145f66a790d1e9e48333c51 \
37                rmd160 a978922c3a096db1a883f068ab6a3e15645a1596
38
39patchfiles      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
44platform darwin 10 {
45    # ticket #37102, /usr/include/rpcsvc/yp_prot.h tries to redefine bool
46    patchfiles-append snowleopard-bool.diff
47}
48
49depends_build   port:pkgconfig
50depends_lib     port:expat port:zlib
51
52conflicts       squid2 squid3
53
54configure.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
84post-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
90startupitem.create      yes
91startupitem.name        Squid
92startupitem.netchange   yes
93startupitem.executable  ${prefix}/sbin/squid -s --foreground
94
95add_users       squid group=squid home=${prefix}/var/squid
96
97notes "Before starting $name for the first time, create the cache directories\
98with:
99    ${prefix}/sbin/squid -s -z --foreground"
100
101post-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}
110destroot.keepdirs   ${destroot}${prefix}/var/run/squid \
111                ${destroot}${prefix}/var/squid/cache \
112                ${destroot}${prefix}/var/squid/logs
113
114post-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
124variant 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
132if {![variant_isset gnutls]} {
133    default_variants    +openssl
134}
135
136variant 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
141variant ipfw_transparent description "Enable transparent proxy support using IPFW" {
142    configure.args-append   --enable-ipfw-transparent
143}
144
145variant 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
152livecheck.type  regex
153livecheck.url   http://www.squid-cache.org/Versions/v4/
154livecheck.regex "squid-(\[0-9.\]+)-RELEASENOTES\\.html"