summaryrefslogtreecommitdiff
path: root/security/heimdal
diff options
context:
space:
mode:
authorjlam <jlam>2004-03-10 17:57:14 +0000
committerjlam <jlam>2004-03-10 17:57:14 +0000
commitdcc66b8df5c6733d79956b8b5a9fd3a9c8d948f7 (patch)
tree1226d07b8f66083168895189decc88848b70903f /security/heimdal
parente21a48d5290393121554d500c5350afe393cefba (diff)
downloadpkgsrc-dcc66b8df5c6733d79956b8b5a9fd3a9c8d948f7.tar.gz
Split out the code that deals with checking whether the software is
built-in or not into a separate builtin.mk file. The code to deal checking for built-in software is much simpler to deal with in pkgsrc. The buildlink3.mk file for a package will be of the usual format regardless of the package, which makes it simpler for packagers to update a package. The builtin.mk file for a package must define a single yes/no variable USE_BUILTIN.<pkg> that is used by bsd.buildlink3.mk to decide whether to use the built-in software or to use the pkgsrc software.
Diffstat (limited to 'security/heimdal')
-rw-r--r--security/heimdal/buildlink3.mk118
-rw-r--r--security/heimdal/builtin.mk80
2 files changed, 87 insertions, 111 deletions
diff --git a/security/heimdal/buildlink3.mk b/security/heimdal/buildlink3.mk
index f7575d77e61..a9d0d9d22d3 100644
--- a/security/heimdal/buildlink3.mk
+++ b/security/heimdal/buildlink3.mk
@@ -1,123 +1,19 @@
-# $NetBSD: buildlink3.mk,v 1.13 2004/02/18 16:35:27 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.14 2004/03/10 17:57:14 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
HEIMDAL_BUILDLINK3_MK:= ${HEIMDAL_BUILDLINK3_MK}+
-.include "../../mk/bsd.prefs.mk"
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= heimdal
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nheimdal}
+BUILDLINK_PACKAGES+= heimdal
.if !empty(HEIMDAL_BUILDLINK3_MK:M+)
-BUILDLINK_PACKAGES+= heimdal
BUILDLINK_DEPENDS.heimdal+= heimdal>=0.4e
BUILDLINK_PKGSRCDIR.heimdal?= ../../security/heimdal
BUILDLINK_INCDIRS.heimdal?= include/krb5
.endif # HEIMDAL_BUILDLINK3_MK
-BUILDLINK_CHECK_BUILTIN.heimdal?= NO
-
-_KRB5_KRB5_H= /usr/include/krb5/krb5.h
-
-.if !defined(BUILDLINK_IS_BUILTIN.heimdal)
-BUILDLINK_IS_BUILTIN.heimdal= NO
-. if exists(${_KRB5_KRB5_H})
-_IS_BUILTIN.heimdal!= \
- if ${GREP} -q heimdal_version ${_KRB5_KRB5_H}; then \
- ${ECHO} "YES"; \
- else \
- ${ECHO} "NO"; \
- fi
-BUILDLINK_IS_BUILTIN.heimdal= ${_IS_BUILTIN.heimdal}
-. if !empty(BUILDLINK_CHECK_BUILTIN.heimdal:M[nN][oO]) && \
- !empty(_IS_BUILTIN.heimdal:M[yY][eE][sS])
-#
-# Create an appropriate name for the built-in package distributed
-# with the system. This package name can be used to check against
-# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc
-# version or if the built-in one is sufficient.
-#
-# heimdal<=0.6 doesn't have a method of checking the headers to discover
-# the version number of the software. Match up heimdal versions with
-# OS versions for an approximate determination of the heimdal version.
-#
-. if !defined(_HEIMDAL_VERSION)
-_HEIMDAL_VERSIONS= 0.6 0.5 0.4e 0.3f 0.3e
-_HEIMDAL_0.6= NetBSD-1.6[U-Z]-* NetBSD-1.6Z*-* NetBSD-[2-9]*-*
-_HEIMDAL_0.5= NetBSD-1.6[I-T]-*
-_HEIMDAL_0.4e= NetBSD-1.6[A-H]-* \
- NetBSD-1.6-* NetBSD-1.6_*-* NetBSD-1.6.*-* \
- NetBSD-1.5[YZ]-* NetBSD-1.5Z*-*
-_HEIMDAL_0.3f= NetBSD-1.5X-*
-_HEIMDAL_0.3e= NetBSD-1.5[UVW]-* \
- NetBSD-1.5.*-*
-. for _heimdal_version_ in ${_HEIMDAL_VERSIONS}
-. for _pattern_ in ${_HEIMDAL_${_heimdal_version_}}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
-_HEIMDAL_VERSION?= ${_heimdal_version_}
-. endif
-. endfor
-. endfor
-_HEIMDAL_VERSION?= 0.2t
-. endif
-_HEIMDAL_PKG= heimdal-${_HEIMDAL_VERSION}
-BUILDLINK_IS_BUILTIN.heimdal?= YES
-. for _depend_ in ${BUILDLINK_DEPENDS.heimdal}
-. if !empty(BUILDLINK_IS_BUILTIN.heimdal:M[yY][eE][sS])
-BUILDLINK_IS_BUILTIN.heimdal!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${_HEIMDAL_PKG}; then \
- ${ECHO} "YES"; \
- else \
- ${ECHO} "NO"; \
- fi
-. endif
-. endfor
-. endif
-. endif
-MAKEFLAGS+= BUILDLINK_IS_BUILTIN.heimdal=${BUILDLINK_IS_BUILTIN.heimdal}
-.endif
-
-.if !empty(BUILDLINK_CHECK_BUILTIN.heimdal:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.heimdal= YES
-.endif
-
-.if !defined(BUILDLINK_USE_BUILTIN.heimdal)
-. if !empty(BUILDLINK_IS_BUILTIN.heimdal:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.heimdal= YES
-. else
-BUILDLINK_USE_BUILTIN.heimdal= NO
-. endif
-
-. if !empty(PREFER_NATIVE:M[yY][eE][sS]) && \
- !empty(BUILDLINK_IS_BUILTIN.heimdal:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.heimdal= YES
-. endif
-. if !empty(PREFER_PKGSRC:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.heimdal= NO
-. endif
-. if !empty(PREFER_NATIVE:Mheimdal) && \
- !empty(BUILDLINK_IS_BUILTIN.heimdal:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.heimdal= YES
-. endif
-. if !empty(PREFER_PKGSRC:Mheimdal)
-BUILDLINK_USE_BUILTIN.heimdal= NO
-. endif
-.endif
-
-.if !empty(BUILDLINK_USE_BUILTIN.heimdal:M[nN][oO])
-#
-# If we depend on the package, depend on the latest version with a library
-# major number bump.
-#
-BUILDLINK_DEPENDS.heimdal+= heimdal>=0.6
-. if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= heimdal
-. endif
-.endif
-
-.if !empty(HEIMDAL_BUILDLINK3_MK:M+)
-. if !empty(BUILDLINK_USE_BUILTIN.heimdal:M[nN][oO])
-KRB5_CONFIG?= ${BUILDLINK_PREFIX.heimdal}/bin/krb5-config
-CONFIGURE_ENV+= KRB5_CONFIG="${KRB5_CONFIG}"
-MAKE_ENV+= KRB5_CONFIG="${KRB5_CONFIG}"
-. endif
-.endif # HEIMDAL_BUILDLINK3_MK
-
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/security/heimdal/builtin.mk b/security/heimdal/builtin.mk
new file mode 100644
index 00000000000..5267e9e0b75
--- /dev/null
+++ b/security/heimdal/builtin.mk
@@ -0,0 +1,80 @@
+# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $
+
+_KRB5_KRB5_H= /usr/include/krb5/krb5.h
+
+.if !defined(IS_BUILTIN.heimdal)
+IS_BUILTIN.heimdal= no
+. if exists(${_KRB5_KRB5_H})
+IS_BUILTIN.heimdal!= \
+ if ${GREP} -q heimdal_version ${_KRB5_KRB5_H}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. if !empty(IS_BUILTIN.heimdal:M[yY][eE][sS])
+#
+# Create an appropriate name for the built-in package distributed
+# with the system. This package name can be used to check against
+# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc
+# version or if the built-in one is sufficient.
+#
+# heimdal<=0.6 doesn't have a method of checking the headers to discover
+# the version number of the software. Match up heimdal versions with
+# OS versions for an approximate determination of the heimdal version.
+#
+. if !defined(_HEIMDAL_VERSION)
+_HEIMDAL_VERSIONS= 0.6 0.5 0.4e 0.3f 0.3e
+_HEIMDAL_0.6= NetBSD-1.6[U-Z]-* NetBSD-1.6Z*-* NetBSD-[2-9]*-*
+_HEIMDAL_0.5= NetBSD-1.6[I-T]-*
+_HEIMDAL_0.4e= NetBSD-1.6[A-H]-* \
+ NetBSD-1.6-* NetBSD-1.6_*-* NetBSD-1.6.*-* \
+ NetBSD-1.5[YZ]-* NetBSD-1.5Z*-*
+_HEIMDAL_0.3f= NetBSD-1.5X-*
+_HEIMDAL_0.3e= NetBSD-1.5[UVW]-* \
+ NetBSD-1.5.*-*
+. for _heimdal_version_ in ${_HEIMDAL_VERSIONS}
+. for _pattern_ in ${_HEIMDAL_${_heimdal_version_}}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_HEIMDAL_VERSION?= ${_heimdal_version_}
+. endif
+. endfor
+. endfor
+_HEIMDAL_VERSION?= 0.2t
+. endif
+BUILTIN_PKG.heimdal= heimdal-${_HEIMDAL_VERSION}
+MAKEFLAGS+= BUILTIN_PKG.heimdal=${BUILTIN_PKG.heimdal}
+. endif
+. endif
+MAKEFLAGS+= IS_BUILTIN.heimdal=${IS_BUILTIN.heimdal}
+.endif
+
+CHECK_BUILTIN.heimdal?= no
+.if !empty(CHECK_BUILTIN.heimdal:M[yY][eE][sS])
+USE_BUILTIN.heimdal= yes
+.endif
+
+.if !defined(USE_BUILTIN.heimdal)
+USE_BUILTIN.heimdal?= ${IS_BUILTIN.heimdal}
+
+. if defined(BUILTIN_PKG.heimdal)
+USE_BUILTIN.heimdal= yes
+. for _depend_ in ${BUILDLINK_DEPENDS.heimdal}
+. if !empty(USE_BUILTIN.heimdal:M[yY][eE][sS])
+USE_BUILTIN.heimdal!= \
+ if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.heimdal}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+. endfor
+. endif
+.endif # USE_BUILTIN.heimdal
+
+.if !empty(USE_BUILTIN.heimdal:M[nN][oO])
+BUILDLINK_DEPENDS.heimdal+= heimdal>=0.6
+
+KRB5_CONFIG?= ${BUILDLINK_PREFIX.heimdal}/bin/krb5-config
+CONFIGURE_ENV+= KRB5_CONFIG="${KRB5_CONFIG}"
+MAKE_ENV+= KRB5_CONFIG="${KRB5_CONFIG}"
+.endif # HEIMDAL_BUILDLINK3_MK