summaryrefslogtreecommitdiff
path: root/security/mit-krb5
diff options
context:
space:
mode:
authortron <tron>2006-04-10 15:04:44 +0000
committertron <tron>2006-04-10 15:04:44 +0000
commit02a319f1a043a3296dae63c3a086f74df1cd91f5 (patch)
tree98a5d9a91957502abbdc527ac6edd896c22514f9 /security/mit-krb5
parent656dbc0da418b60e4479b7463e3a7b20abaf3069 (diff)
downloadpkgsrc-02a319f1a043a3296dae63c3a086f74df1cd91f5.tar.gz
Teach Kerberos 5 to detect the MIT Kerberos 5 bundled with Mac OS X.
This stops the "gnome-vfs2" package from pulling in the "heimdal" package. This fixes PR pkg/29946 by Juha-Matti Liukkonen.
Diffstat (limited to 'security/mit-krb5')
-rw-r--r--security/mit-krb5/builtin.mk70
1 files changed, 70 insertions, 0 deletions
diff --git a/security/mit-krb5/builtin.mk b/security/mit-krb5/builtin.mk
new file mode 100644
index 00000000000..ce0d50e7ac1
--- /dev/null
+++ b/security/mit-krb5/builtin.mk
@@ -0,0 +1,70 @@
+# $NetBSD: builtin.mk,v 1.1 2006/04/10 15:04:44 tron Exp $
+
+BUILTIN_PKG:= mit-krb5
+
+BUILTIN_FIND_FILES_VAR:= KRB5_CONFIG
+BUILTIN_FIND_FILES.KRB5_CONFIG= /usr/bin/krb5-config
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Figure out the version of MIT Kerberos V installed on the system.
+###
+
+.if !defined(BUILTIN_VERSION.mit-krb5) && \
+ empty(KRB5_CONFIG:M__nonexistent__) && \
+ empty(KRB5_CONFIG:M${LOCALBASE}/*)
+BUILTIN_VERSION.mit-krb5!= ${KRB5_CONFIG} --version | \
+ ${SED} -e 's/.*release //' -e 's/-.*//'
+.endif
+MAKEVARS+= BUILTIN_VERSION.mit-krb5
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.mit-krb5)
+IS_BUILTIN.mit-krb5= no
+. if defined(BUILTIN_VERSION.mit-krb5)
+IS_BUILTIN.mit-krb5= yes
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.mit-krb5
+
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.mit-krb5) && \
+ !empty(IS_BUILTIN.mit-krb5:M[yY][eE][sS]) && \
+ defined(BUILTIN_VERSION.mit-krb5)
+BUILTIN_PKG.mit-krb5= mit-krb5-${BUILTIN_VERSION.mit-krb5}
+.endif
+MAKEVARS+= BUILTIN_PKG.mit-krb5
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.mit-krb5)
+. if ${PREFER.mit-krb5} == "pkgsrc"
+USE_BUILTIN.mit-krb5= no
+. else
+USE_BUILTIN.mit-krb5= ${IS_BUILTIN.mit-krb5}
+. if defined(BUILTIN_PKG.mit-krb5) && \
+ !empty(IS_BUILTIN.mit-krb5:M[yY][eE][sS])
+USE_BUILTIN.mit-krb5= yes
+. for _dep_ in ${BUILDLINK_API_DEPENDS.mit-krb5}
+. if !empty(USE_BUILTIN.mit-krb5:M[yY][eE][sS])
+USE_BUILTIN.mit-krb5!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.mit-krb5:Q}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+. endfor
+. endif
+. endif
+.endif
+MAKEVARS+= USE_BUILTIN.mit-krb5