diff options
author | dholland <dholland@pkgsrc.org> | 2011-10-06 08:48:00 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-10-06 08:48:00 +0000 |
commit | 1736f7ced7516728c3ca5c94f79fda3cf4abf5cc (patch) | |
tree | 51551f9cd2d14d0f740c428e425f4ca4e5ca747a /net | |
parent | 4fbb953bbfbdb19510b7cdb8cb3a4b68b72373cd (diff) | |
download | pkgsrc-1736f7ced7516728c3ca5c94f79fda3cf4abf5cc.tar.gz |
Add builtin handling for hesiod. Previously, this was setting
PKG_SKIP_REASION if hesiod was builtin, which was causing dependent
packages (all one of them, AFAICT) to fail in the bulk builds.
Someone who knows more about builtin/buildlink stuff should probably
review this, but to casual inspection at least it seems to work; plus
it's not likely to make anything worse.
Diffstat (limited to 'net')
-rw-r--r-- | net/hesiod/Makefile | 6 | ||||
-rw-r--r-- | net/hesiod/builtin.mk | 74 |
2 files changed, 75 insertions, 5 deletions
diff --git a/net/hesiod/Makefile b/net/hesiod/Makefile index 37e4f80d1b6..d352709a042 100644 --- a/net/hesiod/Makefile +++ b/net/hesiod/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2008/07/14 12:56:10 joerg Exp $ +# $NetBSD: Makefile,v 1.12 2011/10/06 08:48:00 dholland Exp $ DISTNAME= hesiod-3.0.2 CATEGORIES= net @@ -11,10 +11,6 @@ PKG_DESTDIR_SUPPORT= user-destdir .include "../../mk/bsd.prefs.mk" -.if exists(/usr/include/hesiod.h) && !defined(USE_HESIOD) -PKG_SKIP_REASON+= "${PKGNAME} is part of your ${OPSYS} distribution" -.endif - GNU_CONFIGURE= YES CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} diff --git a/net/hesiod/builtin.mk b/net/hesiod/builtin.mk new file mode 100644 index 00000000000..2b0f377eb57 --- /dev/null +++ b/net/hesiod/builtin.mk @@ -0,0 +1,74 @@ +# $NetBSD: builtin.mk,v 1.1 2011/10/06 08:48:00 dholland Exp $ + +BUILTIN_PKG:= hesiod + +.include "../../mk/bsd.fast.prefs.mk" + +BUILTIN_FIND_FILES_VAR:= H_HESIOD +BUILTIN_FIND_FILES.H_HESIOD= /usr/include/hesiod.h + +.include "../../mk/buildlink3/bsd.builtin.mk" + +### +### Determine if there is a built-in implementation of the package and +### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). +### +.if !defined(IS_BUILTIN.hesiod) +IS_BUILTIN.hesiod= no +. if empty(H_HESIOD:M__nonexistent__) && empty(H_HESIOD:M${LOCALBASE}/*) +IS_BUILTIN.hesiod= yes +. endif +.endif +MAKEVARS+= IS_BUILTIN.hesiod + +### +### 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.hesiod) && \ + !empty(IS_BUILTIN.hesiod:M[yY][eE][sS]) && \ + empty(H_HESIOD:M__nonexistent__) +# 3.0.2: bug fixes. 3.0.1: added HESIOD_INTERFACES symbol +_BLTN_HESIOD_302!= \ + ${GREP} -c HESIOD_INTERFACES ${H_HESIOD} || ${TRUE} +# 3.0.0: added hesiod_* functions +_BLTN_HESIOD_300!= \ + ${GREP} -c hesiod_init ${H_HESIOD} || ${TRUE} + +. if ${_BLTN_HESIOD_302} == "1" +BUILTIN_VERSION.hesiod= 3.0.2 +. elif ${_BLTN_HESIOD_300} == "1" +BUILTIN_VERSION.hesiod= 3.0.0 +. else +BUILTIN_VERSION.hesiod= 2.0.0 +. endif +BUILTIN_PKG.hesiod= hesiod-${BUILTIN_VERSION.hesiod} +.endif +MAKEVARS+= BUILTIN_PKG.hesiod + +### +### 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.hesiod) +. if ${PREFER.hesiod} == "pkgsrc" +USE_BUILTIN.hesiod= no +. else +USE_BUILTIN.hesiod= ${IS_BUILTIN.hesiod} +. if defined(BUILTIN_PKG.hesiod) && \ + !empty(IS_BUILTIN.hesiod:M[yY][eE][sS]) +USE_BUILTIN.hesiod= yes +. for _dep_ in ${BUILDLINK_API_DEPENDS.hesiod} +. if !empty(USE_BUILTIN.hesiod:M[yY][eE][sS]) +USE_BUILTIN.hesiod!= \ + if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.hesiod:Q}; then \ + ${ECHO} yes; \ + else \ + ${ECHO} no; \ + fi +. endif +. endfor +. endif +. endif # PREFER.hesiod +.endif +MAKEVARS+= USE_BUILTIN.hesiod |