diff options
author | jlam <jlam@pkgsrc.org> | 2005-01-09 23:59:26 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-01-09 23:59:26 +0000 |
commit | c1a8410ae8142d11fd24754cd7427a590cdd43e0 (patch) | |
tree | 5ccb82dc72f75c315d04519d3450dd4274af39fe /mk/krb5.buildlink3.mk | |
parent | 691395aa89336833872026a37af0653bda870f1d (diff) | |
download | pkgsrc-c1a8410ae8142d11fd24754cd7427a590cdd43e0.tar.gz |
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 (limited to 'mk/krb5.buildlink3.mk')
-rw-r--r-- | mk/krb5.buildlink3.mk | 78 |
1 files changed, 19 insertions, 59 deletions
diff --git a/mk/krb5.buildlink3.mk b/mk/krb5.buildlink3.mk index 7183369d552..fa0c1225418 100644 --- a/mk/krb5.buildlink3.mk +++ b/mk/krb5.buildlink3.mk @@ -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 @@ KRB5_BUILDLINK3_MK:= ${KRB5_BUILDLINK3_MK}+ .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_PKGS?= heimdal mit-krb5 _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_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} +. if !empty(_KRB5_ACCEPTED:M${_KRB5_TYPE}) +KRB5_TYPE= ${_KRB5_TYPE} +. else +KRB5_TYPE= none . endif +KRB5BASE= ${BUILDLINK_PREFIX.${KRB5_TYPE}} -KRB5_TYPE= ${_KRB5_TYPE} BUILD_DEFS+= KRB5_TYPE +BUILD_DEFS+= KRB5BASE -.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 + +.endif # KRB5_BUILDLINK3_MK + +.if ${KRB5_TYPE} == "none" +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 |