Thu May 5 08:36:30 2022 UTC ()
squid4: Remove redundant NetBSD version check


(nia)
diff -r1.4 -r1.5 pkgsrc/www/squid4/options.mk

cvs diff -r1.4 -r1.5 pkgsrc/www/squid4/options.mk (switch to unified diff)

--- pkgsrc/www/squid4/options.mk 2020/06/21 16:05:55 1.4
+++ pkgsrc/www/squid4/options.mk 2022/05/05 08:36:30 1.5
@@ -1,243 +1,243 @@ @@ -1,243 +1,243 @@
1# $NetBSD: options.mk,v 1.4 2020/06/21 16:05:55 taca Exp $ 1# $NetBSD: options.mk,v 1.5 2022/05/05 08:36:30 nia Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.squid4 3PKG_OPTIONS_VAR= PKG_OPTIONS.squid4
4PKG_SUPPORTED_OPTIONS= inet6 snmp squid-backend-aufs \ 4PKG_SUPPORTED_OPTIONS= inet6 snmp squid-backend-aufs \
5 squid-backend-diskd squid-backend-rock \ 5 squid-backend-diskd squid-backend-rock \
6 squid-backend-ufs squid-ecap squid-esi \ 6 squid-backend-ufs squid-ecap squid-esi \
7 squid-unlinkd squid-kerberos-helper \ 7 squid-unlinkd squid-kerberos-helper \
8 squid-ldap-helper squid-pam-helper 8 squid-ldap-helper squid-pam-helper
9PKG_OPTIONS_REQUIRED_GROUPS= ssl 9PKG_OPTIONS_REQUIRED_GROUPS= ssl
10PKG_OPTIONS_GROUP.ssl= openssl gnutls 10PKG_OPTIONS_GROUP.ssl= openssl gnutls
11PKG_OPTIONS_LEGACY_OPTS+= diskd:squid-backend-diskd \ 11PKG_OPTIONS_LEGACY_OPTS+= diskd:squid-backend-diskd \
12 ecap:squid-ecap esi:squid-esi \ 12 ecap:squid-ecap esi:squid-esi \
13 null:squid-backend-null ufs:squid-backend-ufs \ 13 null:squid-backend-null ufs:squid-backend-ufs \
14 linux-netfilter:squid-netfilter \ 14 linux-netfilter:squid-netfilter \
15 ipf-transparent:squid-ipf \ 15 ipf-transparent:squid-ipf \
16 pf-transparent:squid-pf unlinkd:squid-unlinkd \ 16 pf-transparent:squid-pf unlinkd:squid-unlinkd \
17 arp-acl:squid-arp-acl \ 17 arp-acl:squid-arp-acl \
18 pam-helper:squid-pam-helper 18 pam-helper:squid-pam-helper
19 19
20PLIST_VARS+= ba_LDAP ba_NCSA ba_PAM ba_getpwnam 20PLIST_VARS+= ba_LDAP ba_NCSA ba_PAM ba_getpwnam
21PLIST_VARS+= da_LDAP da_file diskd 21PLIST_VARS+= da_LDAP da_file diskd
22PLIST_VARS+= eacl_LDAP_group eacl_file_userip eacl_unix_group 22PLIST_VARS+= eacl_LDAP_group eacl_file_userip eacl_unix_group
23PLIST_VARS+= openssl ta_kerberos unlinkd 23PLIST_VARS+= openssl ta_kerberos unlinkd
24 24
25PKG_SUGGESTED_OPTIONS= inet6 openssl snmp squid-backend-aufs \ 25PKG_SUGGESTED_OPTIONS= inet6 openssl snmp squid-backend-aufs \
26 squid-backend-diskd squid-backend-ufs \ 26 squid-backend-diskd squid-backend-ufs \
27 squid-esi squid-pam-helper squid-unlinkd 27 squid-esi squid-pam-helper squid-unlinkd
28 28
29.include "../../mk/bsd.prefs.mk" 29.include "../../mk/bsd.prefs.mk"
30 30
31.if ${OPSYS} == "Linux" 31.if ${OPSYS} == "Linux"
32PKG_SUPPORTED_OPTIONS+= squid-netfilter 32PKG_SUPPORTED_OPTIONS+= squid-netfilter
33.endif 33.endif
34 34
35# some release of NetBSD lacks <ipl.h> header of IP Filter 4.x 35# some release of NetBSD lacks <ipl.h> header of IP Filter 4.x
36.if ${OPSYS} != "NetBSD" || ${OS_VERSION:M[01].*} || exists(/usr/include/netinet/ipl.h) 36.if ${OPSYS} != "NetBSD" || exists(/usr/include/netinet/ipl.h)
37PKG_SUPPORTED_OPTIONS+= squid-ipf 37PKG_SUPPORTED_OPTIONS+= squid-ipf
38.endif 38.endif
39 39
40.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || \ 40.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || \
41 ${OPSYS} == "Darwin" || ${OPSYS} == "DragonFly" 41 ${OPSYS} == "Darwin" || ${OPSYS} == "DragonFly"
42PKG_SUPPORTED_OPTIONS+= squid-pf 42PKG_SUPPORTED_OPTIONS+= squid-pf
43.endif 43.endif
44 44
45.if (${OPSYS} == "NetBSD") && \ 45.if (${OPSYS} == "NetBSD") && \
46 !empty(PKG_SUPPORTED_OPTIONS:Msquid-ipf) 46 !empty(PKG_SUPPORTED_OPTIONS:Msquid-ipf)
47PKG_SUGGESTED_OPTIONS+= squid-ipf 47PKG_SUGGESTED_OPTIONS+= squid-ipf
48.endif 48.endif
49 49
50PKG_SUGGESTED_OPTIONS.OpenBSD+= squid-pf 50PKG_SUGGESTED_OPTIONS.OpenBSD+= squid-pf
51 51
52PKG_SUPPORTED_OPTIONS.Darwin+= squid-ipfw 52PKG_SUPPORTED_OPTIONS.Darwin+= squid-ipfw
53PKG_SUGGESTED_OPTIONS.Darwin+= squid-ipfw 53PKG_SUGGESTED_OPTIONS.Darwin+= squid-ipfw
54 54
55# limited platform support squid-arp-acl 55# limited platform support squid-arp-acl
56.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "SunOS" 56.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
57PKG_SUPPORTED_OPTIONS+= squid-arp-acl 57PKG_SUPPORTED_OPTIONS+= squid-arp-acl
58.endif 58.endif
59 59
60.include "../../mk/bsd.options.mk" 60.include "../../mk/bsd.options.mk"
61 61
62# Note: NIS helper cannot be build; it requires crypt.h header file. 62# Note: NIS helper cannot be build; it requires crypt.h header file.
63SQUID_BASIC_AUTH_HELPERS?= DB NCSA PAM fake getpwnam 63SQUID_BASIC_AUTH_HELPERS?= DB NCSA PAM fake getpwnam
64SQUID_DIGEST_AUTH_HELPERS?= file 64SQUID_DIGEST_AUTH_HELPERS?= file
65SQUID_NTLM_AUTH_HELPERS?= SMB_LM fake 65SQUID_NTLM_AUTH_HELPERS?= SMB_LM fake
66SQUID_EXTERNAL_ACL_HELPERS?= file_userip unix_group 66SQUID_EXTERNAL_ACL_HELPERS?= file_userip unix_group
67 67
68# squid's code has preference as: 68# squid's code has preference as:
69# squid-ipf > squid-pf > squid-netfilter 69# squid-ipf > squid-pf > squid-netfilter
70# So, options.mk introduce preference as: 70# So, options.mk introduce preference as:
71# squid-netfilter > squid-pf > squid-ipf 71# squid-netfilter > squid-pf > squid-ipf
72.if !empty(PKG_OPTIONS:Msquid-netfilter) 72.if !empty(PKG_OPTIONS:Msquid-netfilter)
73CONFIGURE_ARGS+= --enable-linux-netfilter 73CONFIGURE_ARGS+= --enable-linux-netfilter
74.elif !empty(PKG_OPTIONS:Msquid-pf) 74.elif !empty(PKG_OPTIONS:Msquid-pf)
75CONFIGURE_ARGS+= --enable-pf-transparent 75CONFIGURE_ARGS+= --enable-pf-transparent
76. if ${OPSYS} == "NetBSD" 76. if ${OPSYS} == "NetBSD"
77CONFIGURE_ARGS+= --with-nat-devpf 77CONFIGURE_ARGS+= --with-nat-devpf
78. endif 78. endif
79.elif !empty(PKG_OPTIONS:Msquid-ipf) 79.elif !empty(PKG_OPTIONS:Msquid-ipf)
80CONFIGURE_ARGS+= --enable-ipf-transparent 80CONFIGURE_ARGS+= --enable-ipf-transparent
81.elif !empty(PKG_OPTIONS:Msquid-ipfw) 81.elif !empty(PKG_OPTIONS:Msquid-ipfw)
82CONFIGURE_ARGS+= --enable-ipfw-transparent 82CONFIGURE_ARGS+= --enable-ipfw-transparent
83.endif 83.endif
84 84
85.if !empty(PKG_OPTIONS:Msquid-arp-acl) 85.if !empty(PKG_OPTIONS:Msquid-arp-acl)
86CONFIGURE_ARGS+= --enable-arp-acl 86CONFIGURE_ARGS+= --enable-arp-acl
87.endif 87.endif
88 88
89.if !empty(PKG_OPTIONS:Msquid-ecap) 89.if !empty(PKG_OPTIONS:Msquid-ecap)
90CONFIGURE_ARGS+= --enable-ecap 90CONFIGURE_ARGS+= --enable-ecap
91USE_TOOLS+= pkg-config 91USE_TOOLS+= pkg-config
92CHECK_WRKREF_SKIP+= sbin/squid 92CHECK_WRKREF_SKIP+= sbin/squid
93USE_LANGUAGES+= c++11 93USE_LANGUAGES+= c++11
94.include "../../www/libecap/buildlink3.mk" 94.include "../../www/libecap/buildlink3.mk"
95.else 95.else
96CONFIGURE_ARGS+= --disable-ecap 96CONFIGURE_ARGS+= --disable-ecap
97.endif 97.endif
98 98
99.if !empty(PKG_OPTIONS:Msquid-esi) 99.if !empty(PKG_OPTIONS:Msquid-esi)
100CONFIGURE_ARGS+= --enable-esi 100CONFIGURE_ARGS+= --enable-esi
101.include "../../textproc/expat/buildlink3.mk" 101.include "../../textproc/expat/buildlink3.mk"
102.else 102.else
103CONFIGURE_ARGS+= --disable-esi 103CONFIGURE_ARGS+= --disable-esi
104.endif 104.endif
105 105
106.if !empty(PKG_SUPPORTED_OPTIONS:Minet6) && empty(PKG_OPTIONS:Minet6) 106.if !empty(PKG_SUPPORTED_OPTIONS:Minet6) && empty(PKG_OPTIONS:Minet6)
107CONFIGURE_ARGS+= --disable-ipv6 107CONFIGURE_ARGS+= --disable-ipv6
108.endif 108.endif
109 109
110.if !empty(PKG_OPTIONS:Msquid-kerberos-helper) 110.if !empty(PKG_OPTIONS:Msquid-kerberos-helper)
111.include "../../mk/krb5.buildlink3.mk" 111.include "../../mk/krb5.buildlink3.mk"
112CONFIGURE_ENV+= ac_cv_path_krb5_config=${KRB5_CONFIG:Q} 112CONFIGURE_ENV+= ac_cv_path_krb5_config=${KRB5_CONFIG:Q}
113SQUID_NEGOTIATE_AUTH_HELPERS+= kerberos 113SQUID_NEGOTIATE_AUTH_HELPERS+= kerberos
114.else 114.else
115CONFIGURE_ENV+= ac_cv_path_krb5_config=no 115CONFIGURE_ENV+= ac_cv_path_krb5_config=no
116CONFIGURE_ARGS+= --without-mit-krb5 116CONFIGURE_ARGS+= --without-mit-krb5
117CONFIGURE_ARGS+= --without-heimdal-krb5 117CONFIGURE_ARGS+= --without-heimdal-krb5
118.endif 118.endif
119 119
120.if !empty(PKG_OPTIONS:Msquid-ldap-helper) 120.if !empty(PKG_OPTIONS:Msquid-ldap-helper)
121.include "../../databases/openldap-client/buildlink3.mk" 121.include "../../databases/openldap-client/buildlink3.mk"
122SQUID_BASIC_AUTH_HELPERS+= LDAP 122SQUID_BASIC_AUTH_HELPERS+= LDAP
123SQUID_DIGEST_AUTH_HELPERS+= LDAP 123SQUID_DIGEST_AUTH_HELPERS+= LDAP
124SQUID_EXTERNAL_ACL_HELPERS+= LDAP_group 124SQUID_EXTERNAL_ACL_HELPERS+= LDAP_group
125.endif 125.endif
126 126
127.if !empty(PKG_OPTIONS:Msquid-pam-helper) 127.if !empty(PKG_OPTIONS:Msquid-pam-helper)
128. include "../../mk/pam.buildlink3.mk" 128. include "../../mk/pam.buildlink3.mk"
129SQUID_BASIC_AUTH_HELPERS+= PAM 129SQUID_BASIC_AUTH_HELPERS+= PAM
130.endif 130.endif
131 131
132.if !empty(PKG_OPTIONS:Msnmp) 132.if !empty(PKG_OPTIONS:Msnmp)
133CONFIGURE_ARGS+= --enable-snmp 133CONFIGURE_ARGS+= --enable-snmp
134.else 134.else
135CONFIGURE_ARGS+= --disable-snmp 135CONFIGURE_ARGS+= --disable-snmp
136.endif 136.endif
137 137
138.if !empty(PKG_OPTIONS:Mopenssl) 138.if !empty(PKG_OPTIONS:Mopenssl)
139CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q} 139CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q}
140CONFIGURE_ARGS+= --enable-ssl-crtd --without-gnutls 140CONFIGURE_ARGS+= --enable-ssl-crtd --without-gnutls
141. include "../../security/openssl/buildlink3.mk" 141. include "../../security/openssl/buildlink3.mk"
142PLIST.openssl= yes 142PLIST.openssl= yes
143.endif 143.endif
144 144
145.if !empty(PKG_OPTIONS:Mgnutls) 145.if !empty(PKG_OPTIONS:Mgnutls)
146CONFIGURE_ARGS+= --with-gnutls=${PREFIX:Q} 146CONFIGURE_ARGS+= --with-gnutls=${PREFIX:Q}
147CONFIGURE_ARGS+= --without-openssl 147CONFIGURE_ARGS+= --without-openssl
148. include "../../security/gnutls/buildlink3.mk" 148. include "../../security/gnutls/buildlink3.mk"
149.endif 149.endif
150 150
151.if !empty(PKG_OPTIONS:Msquid-backend-aufs) 151.if !empty(PKG_OPTIONS:Msquid-backend-aufs)
152SQUID_BACKENDS+= aufs 152SQUID_BACKENDS+= aufs
153. include "../../mk/pthread.buildlink3.mk" 153. include "../../mk/pthread.buildlink3.mk"
154.endif 154.endif
155 155
156.if !empty(PKG_OPTIONS:Msquid-backend-diskd) 156.if !empty(PKG_OPTIONS:Msquid-backend-diskd)
157SQUID_BACKENDS+= diskd 157SQUID_BACKENDS+= diskd
158PLIST.diskd= yes 158PLIST.diskd= yes
159.endif 159.endif
160 160
161.if !empty(PKG_OPTIONS:Msquid-backend-rock) 161.if !empty(PKG_OPTIONS:Msquid-backend-rock)
162SQUID_BACKENDS+= rock 162SQUID_BACKENDS+= rock
163.endif 163.endif
164 164
165.if !empty(PKG_OPTIONS:Msquid-backend-ufs) 165.if !empty(PKG_OPTIONS:Msquid-backend-ufs)
166SQUID_BACKENDS+= ufs 166SQUID_BACKENDS+= ufs
167.endif 167.endif
168 168
169.if !empty(PKG_OPTIONS:Msquid-unlinkd) 169.if !empty(PKG_OPTIONS:Msquid-unlinkd)
170PLIST.unlinkd= yes 170PLIST.unlinkd= yes
171.else 171.else
172CONFIGURE_ARGS+= --disable-unlinkd 172CONFIGURE_ARGS+= --disable-unlinkd
173.endif 173.endif
174 174
175.if empty(SQUID_BASIC_AUTH_HELPERS) 175.if empty(SQUID_BASIC_AUTH_HELPERS)
176CONFIGURE_ARGS+= --disable-auth-basic 176CONFIGURE_ARGS+= --disable-auth-basic
177.else 177.else
178CONFIGURE_ARGS+= --enable-auth-basic=${SQUID_BASIC_AUTH_HELPERS:Q} 178CONFIGURE_ARGS+= --enable-auth-basic=${SQUID_BASIC_AUTH_HELPERS:Q}
179. for i in ${SQUID_BASIC_AUTH_HELPERS} 179. for i in ${SQUID_BASIC_AUTH_HELPERS}
180PLIST.ba_${i}= yes 180PLIST.ba_${i}= yes
181. endfor 181. endfor
182.PHONY: squid-enable-helper-basic_auth 182.PHONY: squid-enable-helper-basic_auth
183pre-configure: squid-enable-helper-basic_auth 183pre-configure: squid-enable-helper-basic_auth
184squid-enable-helper-basic_auth: 184squid-enable-helper-basic_auth:
185. for i in ${SQUID_BASIC_AUTH_HELPERS} 185. for i in ${SQUID_BASIC_AUTH_HELPERS}
186# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/basic/${i}/config.test 186# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/basic/${i}/config.test
187. endfor 187. endfor
188.endif 188.endif
189 189
190.if empty(SQUID_DIGEST_AUTH_HELPERS) 190.if empty(SQUID_DIGEST_AUTH_HELPERS)
191CONFIGURE_ARGS+= --disable-auth-digest 191CONFIGURE_ARGS+= --disable-auth-digest
192.else 192.else
193CONFIGURE_ARGS+= --enable-auth-digest=${SQUID_DIGEST_AUTH_HELPERS:Q} 193CONFIGURE_ARGS+= --enable-auth-digest=${SQUID_DIGEST_AUTH_HELPERS:Q}
194. for i in ${SQUID_DIGEST_AUTH_HELPERS} 194. for i in ${SQUID_DIGEST_AUTH_HELPERS}
195PLIST.da_${i}= yes 195PLIST.da_${i}= yes
196. endfor 196. endfor
197pre-configure: 197pre-configure:
198. for i in ${SQUID_DIGEST_AUTH_HELPERS} 198. for i in ${SQUID_DIGEST_AUTH_HELPERS}
199# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/digest/${i}/config.test 199# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/digest/${i}/config.test
200. endfor 200. endfor
201.endif 201.endif
202 202
203.if empty(SQUID_NEGOTIATE_AUTH_HELPERS) 203.if empty(SQUID_NEGOTIATE_AUTH_HELPERS)
204CONFIGURE_ARGS+= --disable-auth-negotiate 204CONFIGURE_ARGS+= --disable-auth-negotiate
205.else 205.else
206CONFIGURE_ARGS+= --enable-auth-negotiate=${SQUID_NEGOTIATE_AUTH_HELPERS:Q} 206CONFIGURE_ARGS+= --enable-auth-negotiate=${SQUID_NEGOTIATE_AUTH_HELPERS:Q}
207. for i in ${SQUID_NEGOTIATE_AUTH_HELPERS} 207. for i in ${SQUID_NEGOTIATE_AUTH_HELPERS}
208PLIST.ta_${i}= yes 208PLIST.ta_${i}= yes
209. endfor 209. endfor
210.PHONY: squid-enable-helper-negotiate_auth 210.PHONY: squid-enable-helper-negotiate_auth
211pre-configure: squid-enable-helper-negotiate_auth 211pre-configure: squid-enable-helper-negotiate_auth
212squid-enable-helper-negotiate_auth: 212squid-enable-helper-negotiate_auth:
213. for i in ${SQUID_NEGOTIATE_AUTH_HELPERS} 213. for i in ${SQUID_NEGOTIATE_AUTH_HELPERS}
214# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/negotiate/${i}/config.test 214# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/negotiate/${i}/config.test
215. endfor 215. endfor
216.endif 216.endif
217 217
218.if empty(SQUID_NTLM_AUTH_HELPERS) 218.if empty(SQUID_NTLM_AUTH_HELPERS)
219CONFIGURE_ARGS+= --disable-auth-ntlm 219CONFIGURE_ARGS+= --disable-auth-ntlm
220.else 220.else
221CONFIGURE_ARGS+= --enable-auth-ntlm=${SQUID_NTLM_AUTH_HELPERS:Q} 221CONFIGURE_ARGS+= --enable-auth-ntlm=${SQUID_NTLM_AUTH_HELPERS:Q}
222.PHONY: squid-enable-helper-ntlm_auth 222.PHONY: squid-enable-helper-ntlm_auth
223pre-configure: squid-enable-helper-ntlm_auth 223pre-configure: squid-enable-helper-ntlm_auth
224squid-enable-helper-ntlm_auth: 224squid-enable-helper-ntlm_auth:
225. for i in ${SQUID_NTLM_AUTH_HELPERS} 225. for i in ${SQUID_NTLM_AUTH_HELPERS}
226# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/ntlm/${i}/config.test 226# ${ECHO} "exit 0" > ${WRKSRC}/src/auth/ntlm/${i}/config.test
227. endfor 227. endfor
228.endif 228.endif
229 229
230.if empty(SQUID_EXTERNAL_ACL_HELPERS) 230.if empty(SQUID_EXTERNAL_ACL_HELPERS)
231CONFIGURE_ARGS+= --disable-external-acl-helpers 231CONFIGURE_ARGS+= --disable-external-acl-helpers
232.else 232.else
233CONFIGURE_ARGS+= --enable-external-acl-helpers=${SQUID_EXTERNAL_ACL_HELPERS:Q} 233CONFIGURE_ARGS+= --enable-external-acl-helpers=${SQUID_EXTERNAL_ACL_HELPERS:Q}
234. for i in ${SQUID_EXTERNAL_ACL_HELPERS} 234. for i in ${SQUID_EXTERNAL_ACL_HELPERS}
235PLIST.eacl_${i}= yes 235PLIST.eacl_${i}= yes
236. endfor 236. endfor
237.PHONY: squid-enable-helper-external_acl 237.PHONY: squid-enable-helper-external_acl
238pre-configure: squid-enable-helper-external_acl 238pre-configure: squid-enable-helper-external_acl
239squid-enable-helper-external_acl: 239squid-enable-helper-external_acl:
240. for i in ${SQUID_EXTERNAL_ACL_HELPERS} 240. for i in ${SQUID_EXTERNAL_ACL_HELPERS}
241# ${ECHO} "exit 0" > ${WRKSRC}/src/acl/external/${i}/config.test 241# ${ECHO} "exit 0" > ${WRKSRC}/src/acl/external/${i}/config.test
242. endfor 242. endfor
243.endif 243.endif