summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-03-30 18:06:17 +0000
committerjlam <jlam@pkgsrc.org>2006-03-30 18:06:17 +0000
commitd71a98aa8eb185cc8c26f46f2502a25cb3135389 (patch)
treea4e8c404ab7153a9727f5d7f913a25bdd6b97971 /security
parent3987a638118f7f4cad35ee461afa830350d86564 (diff)
downloadpkgsrc-d71a98aa8eb185cc8c26f46f2502a25cb3135389.tar.gz
Avoid extra stat() calls by not repeatedly checking whether a file
exists on the disk -- we can just check whether a variable defined by find-files.mk is "__nonexistent__" or not.
Diffstat (limited to 'security')
-rw-r--r--security/PAM/builtin.mk4
-rw-r--r--security/heimdal/builtin.mk9
-rw-r--r--security/libdes/builtin.mk4
-rw-r--r--security/openpam/builtin.mk6
-rw-r--r--security/openssl/builtin.mk12
-rw-r--r--security/pflkm/builtin.mk6
-rw-r--r--security/skey/builtin.mk6
-rw-r--r--security/tcp_wrappers/builtin.mk6
8 files changed, 28 insertions, 25 deletions
diff --git a/security/PAM/builtin.mk b/security/PAM/builtin.mk
index 3b3c81f2e01..47c69c8a802 100644
--- a/security/PAM/builtin.mk
+++ b/security/PAM/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.12 2005/06/01 18:03:20 jlam Exp $
+# $NetBSD: builtin.mk,v 1.13 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= linux-pam
@@ -15,7 +15,7 @@ BUILTIN_FIND_GREP.H_LINUX_PAM= The Linux-PAM Framework layer API
###
.if !defined(IS_BUILTIN.linux-pam)
IS_BUILTIN.linux-pam= no
-. if empty(H_LINUX_PAM:M${LOCALBASE}/*) && exists(${H_LINUX_PAM})
+. if empty(H_LINUX_PAM:M__nonexistent__) && empty(H_LINUX_PAM:M${LOCALBASE}/*)
IS_BUILTIN.linux-pam= yes
. endif
.endif
diff --git a/security/heimdal/builtin.mk b/security/heimdal/builtin.mk
index 24256a0973d..e212ea11135 100644
--- a/security/heimdal/builtin.mk
+++ b/security/heimdal/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.7 2006/01/26 22:46:15 markd Exp $
+# $NetBSD: builtin.mk,v 1.8 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= heimdal
@@ -16,7 +16,7 @@ BUILTIN_FIND_GREP.SH_KRB5_CONFIG= ^[ ]*--version)
###
.if !defined(IS_BUILTIN.heimdal)
IS_BUILTIN.heimdal= no
-. if empty(H_HEIMDAL:M${LOCALBASE}/*) && exists(${H_HEIMDAL})
+. if empty(H_HEIMDAL:M__nonexistent__) && empty(H_HEIMDAL:M${LOCALBASE}/*)
IS_BUILTIN.heimdal= yes
. endif
.endif
@@ -28,7 +28,7 @@ MAKEVARS+= IS_BUILTIN.heimdal
###
.if !defined(BUILTIN_PKG.heimdal) && \
!empty(IS_BUILTIN.heimdal:M[yY][eE][sS])
-. if exists(${SH_KRB5_CONFIG})
+. if empty(SH_KRB5_CONFIG:M__nonexistent__)
BUILTIN_VERSION.heimdal!= ${SH_KRB5_CONFIG} --version | \
${AWK} '{ print $$2; exit }'
. else
@@ -104,7 +104,8 @@ CONFIGURE_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
MAKE_ENV+= KRB5_CONFIG=${KRB5_CONFIG:Q}
. endif
-. if !empty(USE_BUILTIN.heimdal:M[yY][eE][sS]) && !exists(${SH_KRB5_CONFIG})
+. if !empty(USE_BUILTIN.heimdal:M[yY][eE][sS]) && \
+ !empty(SH_KRB5_CONFIG:M__nonexistent__)
BUILDLINK_TARGETS+= fake-krb5-config
fake-krb5-config:
diff --git a/security/libdes/builtin.mk b/security/libdes/builtin.mk
index 710e3277265..0e383ed6c6c 100644
--- a/security/libdes/builtin.mk
+++ b/security/libdes/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.4 2005/06/01 18:03:21 jlam Exp $
+# $NetBSD: builtin.mk,v 1.5 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= libdes
@@ -13,7 +13,7 @@ BUILTIN_FIND_FILES.H_LIBDES= /usr/include/libdes.h /usr/include/des.h
###
.if !defined(IS_BUILTIN.libdes)
IS_BUILTIN.libdes= no
-. if empty(H_LIBDES:M${LOCALBASE}/*) && exists(${H_LIBDES})
+. if empty(H_LIBDES:M__nonexistent__) && empty(H_LIBDES:M${LOCALBASE}/*)
IS_BUILTIN.libdes= yes
. endif
.endif
diff --git a/security/openpam/builtin.mk b/security/openpam/builtin.mk
index 7b651c9b483..d014f858f03 100644
--- a/security/openpam/builtin.mk
+++ b/security/openpam/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.4 2005/06/09 06:07:29 jlam Exp $
+# $NetBSD: builtin.mk,v 1.5 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= openpam
@@ -13,7 +13,7 @@ BUILTIN_FIND_FILES.H_OPENPAM= /usr/include/security/openpam_version.h
###
.if !defined(IS_BUILTIN.openpam)
IS_BUILTIN.openpam= no
-. if empty(H_OPENPAM:M${LOCALBASE}/*) && exists(${H_OPENPAM})
+. if empty(H_OPENPAM:M__nonexistent__) && empty(H_OPENPAM:M${LOCALBASE}/*)
IS_BUILTIN.openpam= yes
. endif
.endif
@@ -25,7 +25,7 @@ MAKEVARS+= IS_BUILTIN.openpam
###
.if !defined(BUILTIN_PKG.openpam) && \
!empty(IS_BUILTIN.openpam:M[yY][eE][sS]) && \
- exists(${H_OPENPAM})
+ empty(H_OPENPAM:M__nonexistent__)
BUILTIN_VERSION.openpam!= \
${AWK} '/\#define[ ]*_OPENPAM_VERSION[ ]/ {print $$3; }' \
${H_OPENPAM}
diff --git a/security/openssl/builtin.mk b/security/openssl/builtin.mk
index 35aa387fe44..07c7dcd6dd9 100644
--- a/security/openssl/builtin.mk
+++ b/security/openssl/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.17 2005/10/12 02:20:10 jlam Exp $
+# $NetBSD: builtin.mk,v 1.18 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= openssl
@@ -14,7 +14,7 @@ BUILTIN_FIND_FILES.H_OPENSSL= /usr/include/openssl/opensslv.h
###
.if !defined(IS_BUILTIN.openssl)
IS_BUILTIN.openssl= no
-. if empty(H_OPENSSL:M${LOCALBASE}/*) && exists(${H_OPENSSL})
+. if empty(H_OPENSSL:M__nonexistent__) && empty(H_OPENSSL:M${LOCALBASE}/*)
IS_BUILTIN.openssl= yes
. endif
.endif
@@ -26,7 +26,7 @@ MAKEVARS+= IS_BUILTIN.openssl
###
.if !defined(BUILTIN_PKG.openssl) && \
!empty(IS_BUILTIN.openssl:M[yY][eE][sS]) && \
- exists (${H_OPENSSL})
+ empty(H_OPENSSL:M__nonexistent__)
BUILTIN_VERSION.openssl!= \
${AWK} 'BEGIN { hex="0123456789abcdef"; \
split("abcdefghijklmnopqrstuvwxyz", alpha, ""); \
@@ -54,7 +54,8 @@ BUILTIN_VERSION.openssl!= \
} \
' ${H_OPENSSL}
-. if !empty(BUILTIN_VERSION.openssl:M0\.9\.6g) && exists(${H_OPENSSL})
+. if !empty(BUILTIN_VERSION.openssl:M0\.9\.6g) && \
+ empty(H_OPENSSL:M__nonexistent__)
#
# If the native OpenSSL contains the security fixes pulled up to the
# netbsd-1-6 branch on 2003-11-07, then pretend it's openssl-0.9.6l.
@@ -79,7 +80,8 @@ BUILTIN_OPENSSL_HAS_20040401_FIX!= \
. if !empty(BUILTIN_OPENSSL_HAS_20040401_FIX:M[yY][eE][sS])
BUILTIN_VERSION.openssl= 0.9.6m
. endif
-. elif !empty(BUILTIN_VERSION.openssl:M0\.9\.7d) && exists(${H_OPENSSL})
+. elif !empty(BUILTIN_VERSION.openssl:M0\.9\.7d) && \
+ empty(H_OPENSSL:M__nonexistent__)
#
# If the native OpenSSL contains the security fixes pulled up to the
# netbsd-2-0, netbsd-2, and netbsd-3-0 branches on 2005-10-11, then
diff --git a/security/pflkm/builtin.mk b/security/pflkm/builtin.mk
index a162d1402a2..a9695aeab83 100644
--- a/security/pflkm/builtin.mk
+++ b/security/pflkm/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.8 2006/03/30 16:58:16 jlam Exp $
+# $NetBSD: builtin.mk,v 1.9 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= pflkm
@@ -14,7 +14,7 @@ BUILTIN_FIND_FILES.EXE_PFCTL+= /sbin/pfctl
#
.if !defined(PF_VERSION)
PF_VERSION= 3.7 # package default
-. if exists(${H_PFLKM})
+. if empty(H_PFLKM:M__nonexistent__)
# OpenBSD 3.8: pf_socket_lookup added
_BLTN_PF_3_8!= ${GREP} -c pf_socket_lookup ${H_PFLKM} || ${TRUE}
# OpenBSD 3.7: pf_threshold added
@@ -41,7 +41,7 @@ MAKEVARS+= PF_VERSION
###
.if !defined(IS_BUILTIN.pflkm)
IS_BUILTIN.pflkm= no
-. if empty(H_PFLKM:M${LOCALBASE}/*) && exists(${H_PFLKM})
+. if empty(H_PFLKM:M__nonexistent__) && empty(H_PFLKM:M${LOCALBASE}/*)
IS_BUILTIN.pflkm= yes
. endif
.endif
diff --git a/security/skey/builtin.mk b/security/skey/builtin.mk
index 0430d5cf856..6f79b3f79d4 100644
--- a/security/skey/builtin.mk
+++ b/security/skey/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.2 2005/06/01 18:03:21 jlam Exp $
+# $NetBSD: builtin.mk,v 1.3 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= skey
@@ -13,7 +13,7 @@ BUILTIN_FIND_FILES.H_SKEY= /usr/include/skey.h
###
.if !defined(IS_BUILTIN.skey)
IS_BUILTIN.skey= no
-. if empty(H_SKEY:M${LOCALBASE}/*) && exists(${H_SKEY})
+. if empty(H_SKEY:M__nonexistent__) && empty(H_SKEY:M${LOCALBASE}/*)
IS_BUILTIN.skey= yes
. endif
.endif
@@ -25,7 +25,7 @@ MAKEVARS+= IS_BUILTIN.skey
###
.if !defined(BUILTIN_PKG.skey) && \
!empty(IS_BUILTIN.skey:M[yY][eE][sS) && \
- exists(${H_SKEY})
+ empty(H_SKEY:M__nonexistent__)
# XXX
# XXX Consider the native skey to be skey-1.1.5.
# XXX
diff --git a/security/tcp_wrappers/builtin.mk b/security/tcp_wrappers/builtin.mk
index d571b5df8e8..8537f44cf01 100644
--- a/security/tcp_wrappers/builtin.mk
+++ b/security/tcp_wrappers/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.6 2005/06/01 18:03:21 jlam Exp $
+# $NetBSD: builtin.mk,v 1.7 2006/03/30 18:06:18 jlam Exp $
BUILTIN_PKG:= tcp_wrappers
@@ -14,8 +14,8 @@ BUILTIN_FIND_FILES.H_TCP_WRAPPERS= /usr/include/tcpd.h
###
.if !defined(IS_BUILTIN.tcp_wrappers)
IS_BUILTIN.tcp_wrappers= no
-. if empty(H_TCP_WRAPPERS:M${LOCALBASE}/*) && \
- exists(${H_TCP_WRAPPERS}) && \
+. if empty(H_TCP_WRAPPERS:M__nonexistent__) && \
+ empty(H_TCP_WRAPPERS:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.wrap:M[yY][eE][sS])
IS_BUILTIN.tcp_wrappers= yes
. endif