summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-04-28 03:35:58 +0000
committerjlam <jlam@pkgsrc.org>2004-04-28 03:35:58 +0000
commitb4474370e36d18e04ec88df81f4b39cc4af15f77 (patch)
tree8bd681dbbef3278f6d6f3a867446d04671eb26d0 /security
parent3dc61df565afc73ad197cb3047a8904d175795f9 (diff)
downloadpkgsrc-b4474370e36d18e04ec88df81f4b39cc4af15f77.tar.gz
Add a builtin.mk file that uses pkgsrc skey except on NetBSD, unless
PREFER_PKGSRC is set appropriately.
Diffstat (limited to 'security')
-rw-r--r--security/skey/builtin.mk54
1 files changed, 54 insertions, 0 deletions
diff --git a/security/skey/builtin.mk b/security/skey/builtin.mk
new file mode 100644
index 00000000000..521879bccc9
--- /dev/null
+++ b/security/skey/builtin.mk
@@ -0,0 +1,54 @@
+# $NetBSD: builtin.mk,v 1.1 2004/04/28 03:35:58 jlam Exp $
+
+_SKEY_H= /usr/include/skey.h
+
+.if !defined(IS_BUILTIN.skey)
+IS_BUILTIN.skey= no
+. if exists(${_SKEY_H})
+IS_BUILTIN.skey= yes
+# XXX
+# XXX Consider the native skey to be skey-1.1.5.
+# XXX
+BUILTIN_PKG.skey= skey-1.1.5
+BUILDLINK_VARS+= BUILTIN_PKG.skey
+. endif
+BUILDLINK_VARS+= IS_BUILTIN.skey
+.endif # IS_BUILTIN.skey
+
+.if !defined(USE_BUILTIN.skey)
+USE_BUILTIN.skey?= ${IS_BUILTIN.skey}
+PREFER.skey?= pkgsrc
+
+. if defined(BUILTIN_PKG.skey)
+USE_BUILTIN.skey= yes
+. for _depend_ in ${BUILDLINK_DEPENDS.skey}
+. if !empty(USE_BUILTIN.skey:M[yY][eE][sS])
+USE_BUILTIN.skey!= \
+ if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.skey}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+. endfor
+. endif
+
+. if ${PREFER.skey} == "native"
+. if (${OPSYS} == "NetBSD") && exists(${_SKEY_H})
+USE_BUILTIN.skey= yes
+_INCOMPAT_SKEY?= # should be set from defs.${OPSYS}.mk
+. for _pattern_ in ${_INCOMPAT_SKEY} ${INCOMPAT_SKEY}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+USE_BUILTIN.skey= no
+. endif
+. endfor
+. endif
+. endif
+
+. if defined(USE_SKEY)
+. if !empty(IS_BUILTIN.skey:M[nN][oO]) && \
+ (${PREFER.skey} == "pkgsrc")
+USE_BUILTIN.skey= no
+. endif
+. endif
+.endif # USE_BUILTIN.skey