source: trunk/dports/net/squid3/Portfile @ 139229

Last change on this file since 139229 was 139229, checked in by jeremyhu@…, 4 years ago

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.7 KB
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# $Id: Portfile 139229 2015-08-08 03:10:35Z jeremyhu@macports.org $
3
4PortSystem 1.0
5
6name            squid3
7version         3.5.7
8set branch      [join [lrange [split ${version} .] 0 1] .]
9categories      net
10platforms       darwin
11license         GPL-2+
12maintainers     jmr openmaintainer
13description     advanced proxy caching server for http, https, ftp, gopher
14long_description    Squid is a high-performance proxy caching server for \
15                web clients, supporting FTP, gopher, and HTTP data \
16                objects. Unlike traditional caching software, Squid \
17                handles all requests in a single, non-blocking, \
18                I/O-driven process. Squid keeps meta data and \
19                especially hot objects cached in RAM, caches DNS \
20                lookups, supports non-blocking DNS lookups, and \
21                implements negative caching of failed requests.
22
23homepage        http://www.squid-cache.org/
24master_sites    http://mirror.aarnet.edu.au/pub/squid/squid/ \
25                http://www.mirrorservice.org/sites/ftp.squid-cache.org/pub/squid/ \
26                http://ftp.ring.gr.jp/archives/net/www/squid/ \
27                ftp://ftp.is.co.za/pub/squid/ \
28                ftp://ftp1.cl.squid-cache.org/pub/squid/ \
29                http://www.squid-cache.org/Versions/v3/${branch}/ \
30                ftp://ftp.squid-cache.org/pub/squid/
31
32distname        squid-${version}
33use_xz          yes
34checksums       md5 e24943386555ca922130a7e034badba7 \
35                sha1 e7dcc0cbcee6fd10a8c8bf3e9bff0dc6359ccc48 \
36                rmd160 7284dda15e27c643cf69db1c53cc798404f6f53a
37
38patchfiles      patch-cf.data.pre.diff \
39                patch-compat_types.h.diff \
40                patch-basic_pam_auth.cc.diff
41
42platform darwin 10 {
43    # ticket #37102, /usr/include/rpcsvc/yp_prot.h tries to redefine bool
44    patchfiles-append snowleopard-bool.diff
45}
46
47depends_lib     port:zlib
48
49conflicts       squid
50
51set pidfile     ${prefix}/var/run/squid/squid.pid
52
53configure.args  --mandir=${prefix}/share/man \
54                --sysconfdir=${prefix}/etc/squid \
55                --datadir=${prefix}/share/squid \
56                --localstatedir=${prefix}/var/squid \
57                --libexecdir=${prefix}/libexec/squid \
58                --with-swapdir=${prefix}/var/squid/cache \
59                --with-pidfile=${pidfile} \
60                --disable-strict-error-checking \
61                --disable-loadable-modules \
62                --disable-arch-native \
63                --without-gnutls \
64                --without-mit-krb5 \
65                --without-heimdal-krb5 \
66                --without-gnugss \
67                --enable-delay-pools \
68                --enable-zph-qos \
69                --enable-removal-policies \
70                --enable-storeio=ufs,aufs,diskd,rock \
71                --enable-disk-io=AIO,Blocking,DiskDaemon,DiskThreads,Mmapped \
72                --enable-log-daemon-helpers \
73                --with-default-user=squid \
74                --enable-auth \
75                --enable-auth-basic \
76                --enable-auth-digest \
77                --enable-auth-negotiate="wrapper" \
78                --enable-auth-ntlm \
79                --enable-external-acl-helpers="SQL_session eDirectory_userip file_userip time_quota unix_group wbinfo_group"
80post-configure {
81    if {[variant_isset universal]} {
82        system -W ${worksrcpath} "ed - include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1"
83    }
84}
85
86startupitem.create      yes
87startupitem.name        Squid
88startupitem.netchange   yes
89startupitem.pidfile     auto ${pidfile}
90startupitem.start \
91    "cd ${prefix}/var/squid" \
92    "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \
93    "    ${prefix}/sbin/squid -s -z" \
94    "fi" \
95    "${prefix}/sbin/squid -s"
96startupitem.stop \
97    "cd ${prefix}/var/squid" \
98    "${prefix}/sbin/squid -k shutdown" \
99    "while ${prefix}/sbin/squid -k check; do" \
100    "    sleep 1" \
101    "done"
102
103add_users       squid group=squid home=${prefix}/var/squid
104
105post-destroot   {
106    xinstall -o squid -g squid -m 755 -d \
107        ${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid \
108        ${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs
109    file delete -force ${destroot}${prefix}/etc/squid/squid.conf \
110                       ${destroot}${prefix}/etc/squid/mime.conf \
111                       ${destroot}${prefix}/etc/squid/cachemgr.conf \
112                       ${destroot}${prefix}/etc/squid/errorpage.css
113}
114destroot.keepdirs   ${destroot}${prefix}/var/run/squid \
115                ${destroot}${prefix}/var/squid/cache \
116                ${destroot}${prefix}/var/squid/logs
117
118post-activate {
119    # Make sure initial conf files are present and setup correctly
120    foreach f { squid.conf mime.conf cachemgr.conf errorpage.css } {
121        if {![file exists ${prefix}/etc/squid/${f}]} {
122            file copy ${prefix}/etc/squid/${f}.default \
123                ${prefix}/etc/squid/${f}
124        }
125    }
126}
127
128variant openssl description "Enable SSL/TLS support using OpenSSL" {
129    depends_lib-append      path:lib/libssl.dylib:openssl
130    configure.args-append   --with-openssl=${prefix}
131}
132
133default_variants    +openssl
134
135variant ipfw_transparent description "Enable transparent proxy support using IPFW" {
136    configure.args-append   --enable-ipfw-transparent
137}
138
139variant kerberos description "Enable MIT kerberos support" {
140    depends_lib-append port:kerberos5
141    configure.args-delete --enable-auth-negotiate="wrapper" \
142                          --without-mit-krb5
143    configure.args-append --enable-auth-negotiate
144}
145
146livecheck.type  regex
147livecheck.url   http://www.squid-cache.org/Versions/v3/${branch}/
148livecheck.regex "squid-(\[0-9.\]+)-RELEASENOTES\\.html"
Note: See TracBrowser for help on using the repository browser.