pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Modify krb5.buildlink3.mk so that we choose a singl...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b09787437e5c
branches: trunk
changeset: 487135:b09787437e5c
user: jlam <jlam%pkgsrc.org@localhost>
date: Sun Jan 09 23:59:26 2005 +0000
description:
Modify krb5.buildlink3.mk so that we choose a single, well-known
package (heimdal) for all Kerberos 5 dependencies instead of choosing
the best installed Kerberos 5 package by default. This can be overridden
with the following variables:
KRB5_DEFAULT is a user-settable variable whose value is the default
Kerberos 5 implementation to use.
KRB5_ACCEPTED is a package-settable list of Kerberos 5 implementations
that may be used by the package.
diffstat:
mk/krb5.buildlink3.mk | 84 +++++++++++++-------------------------------------
1 files changed, 22 insertions(+), 62 deletions(-)
diffs (109 lines):
diff -r 0aa21e0b8672 -r b09787437e5c mk/krb5.buildlink3.mk
--- a/mk/krb5.buildlink3.mk Sun Jan 09 23:56:21 2005 +0000
+++ b/mk/krb5.buildlink3.mk Sun Jan 09 23:59:26 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: krb5.buildlink3.mk,v 1.7 2004/03/30 18:09:43 jlam Exp $
+# $NetBSD: krb5.buildlink3.mk,v 1.8 2005/01/09 23:59:26 jlam Exp $
#
# This Makefile fragment is meant to be included by packages that
# require a Kerberos 5 implementation. krb5.buildlink3.mk will:
@@ -20,7 +20,7 @@
.include "../../mk/bsd.prefs.mk"
.if !empty(KRB5_BUILDLINK3_MK:M+)
-KRB5_DEFAULT?= # empty
+KRB5_DEFAULT?= heimdal
KRB5_ACCEPTED?= ${_KRB5_PKGS}
# This is an exhaustive list of all of the Kerberos 5 implementations
@@ -31,70 +31,30 @@
_KRB5_DEFAULT= ${KRB5_DEFAULT}
_KRB5_ACCEPTED= ${KRB5_ACCEPTED}
-# Mark the acceptable Kerberos 5 packages and check which, if any, are
-# already installed.
-#
-. for _krb5_ in ${_KRB5_ACCEPTED}
-_KRB5_OK.${_krb5_}= yes
-. if !defined(_KRB5_INSTALLED.${_krb5_})
-_KRB5_INSTALLED.${_krb5_}!= \
- if ${PKG_INFO} -qe ${_krb5_}; then \
- ${ECHO} "yes"; \
- else \
- ${ECHO} "no"; \
- fi
-MAKEFLAGS+= _KRB5_INSTALLED.${_krb5_}=${_KRB5_INSTALLED.${_krb5_}}
-. endif
-. endfor
+_KRB5_TYPE?= ${_KRB5_DEFAULT}
-. if !defined(_KRB5_TYPE)
-#
-# Prefer the default one if it's accepted,...
+. if !empty(_KRB5_ACCEPTED:M${_KRB5_TYPE})
+KRB5_TYPE= ${_KRB5_TYPE}
+. else
+KRB5_TYPE= none
+. endif
+KRB5BASE= ${BUILDLINK_PREFIX.${KRB5_TYPE}}
+
+BUILD_DEFS+= KRB5_TYPE
+BUILD_DEFS+= KRB5BASE
+
+# Packages that use Kerberos are automatically categorized as restricted
+# packages.
#
-. if !empty(_KRB5_DEFAULT) && \
- defined(_KRB5_OK.${_KRB5_DEFAULT}) && \
- !empty(_KRB5_OK.${_KRB5_DEFAULT}:M[yY][eE][sS])
-_KRB5_TYPE= ${_KRB5_DEFAULT}
-. endif
-#
-# ...otherwise, use one of the installed Kerberos 5 packages,...
-#
-. for _krb5_ in ${_KRB5_ACCEPTED}
-. if !empty(_KRB5_INSTALLED.${_krb5_}:M[yY][eE][sS])
-_KRB5_TYPE?= ${_krb5_}
-. else
-_KRB5_FIRSTACCEPTED?= ${_krb5_}
-. endif
-. endfor
-#
-# ...otherwise, just use the first accepted Kerberos 5 package.
-#
-. if defined(_KRB5_FIRSTACCEPTED)
-_KRB5_TYPE?= ${_KRB5_FIRSTACCEPTED}
-. endif
-_KRB5_TYPE?= none
-MAKEFLAGS+= _KRB5_TYPE=${_KRB5_TYPE}
-. endif
-
-KRB5_TYPE= ${_KRB5_TYPE}
-BUILD_DEFS+= KRB5_TYPE
+CRYPTO+= uses Kerberos encryption code
.endif # KRB5_BUILDLINK3_MK
.if ${KRB5_TYPE} == "none"
-PKG_FAIL_REASON= "No acceptable Kerberos 5 implementation found."
-.else
-#
-# Packages that use Kerberos are automatically categorized as restricted
-# packages.
-#
-CRYPTO+= uses Kerberos encryption code
-. if ${KRB5_TYPE} == "heimdal"
-KRB5BASE= ${BUILDLINK_PREFIX.heimdal}
-. include "../../security/heimdal/buildlink3.mk"
-. elif ${KRB5_TYPE} == "mit-krb5"
-KRB5BASE= ${BUILDLINK_PREFIX.mit-krb5}
-. include "../../security/mit-krb5/buildlink3.mk"
-. endif
+PKG_FAIL_REASON= \
+ "${_KRB5_TYPE} is not an acceptable Kerberos 5 type for ${PKGNAME}."
+.elif ${KRB5_TYPE} == "heimdal"
+. include "../../security/heimdal/buildlink3.mk"
+.elif ${KRB5_TYPE} == "mit-krb5"
+. include "../../security/mit-krb5/buildlink3.mk"
.endif
-BUILD_DEFS+= KRB5BASE
Home |
Main Index |
Thread Index |
Old Index