summaryrefslogtreecommitdiff
path: root/net/hesiod
diff options
context:
space:
mode:
authorjlam <jlam>2004-02-12 01:59:37 +0000
committerjlam <jlam>2004-02-12 01:59:37 +0000
commitd1197e2dbd26577a4d276890bc662b2a7f93e572 (patch)
treef36bdf155011b2521ad9dfd8a23373398462d265 /net/hesiod
parent2645f9642e2b6553e699f80dbfe9905e21c03d99 (diff)
downloadpkgsrc-d1197e2dbd26577a4d276890bc662b2a7f93e572.tar.gz
Reorganize code so that any dependencies are checked as part of deciding
whether the software is built-in or not. This facilitates implementing the forthcoming PKGSRC_NATIVE variable.
Diffstat (limited to 'net/hesiod')
-rw-r--r--net/hesiod/buildlink2.mk22
1 files changed, 14 insertions, 8 deletions
diff --git a/net/hesiod/buildlink2.mk b/net/hesiod/buildlink2.mk
index 3216bad2688..5e89f709db8 100644
--- a/net/hesiod/buildlink2.mk
+++ b/net/hesiod/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.5 2004/02/05 07:17:15 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.6 2004/02/12 01:59:38 jlam Exp $
.if !defined(HESIOD_BUILDLINK2_MK)
HESIOD_BUILDLINK2_MK= # defined
@@ -8,14 +8,16 @@ HESIOD_BUILDLINK2_MK= # defined
BUILDLINK_DEPENDS.hesiod?= hesiod>=3.0.2
BUILDLINK_PKGSRCDIR.hesiod?= ../../net/hesiod
-.if defined(USE_HESIOD)
-_NEED_HESIOD= YES
+.if exists(/usr/include/hesiod.h)
+_BUILTIN_HESIOD= YES
.else
-. if exists(/usr/include/hesiod.h)
-_NEED_HESIOD= NO
-. else
-_NEED_HESIOD= YES
-. endif
+_BUILTIN_HESIOD= NO
+.endif
+
+.if ${_BUILTIN_HESIOD} == "YES"
+_NEED_HESIOD= NO
+.else
+_NEED_HESIOD= YES
.endif
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
@@ -23,6 +25,10 @@ _NEED_HESIOD= YES
_NEED_HESIOD= YES
.endif
+.if defined(USE_HESIOD)
+_NEED_HESIOD= YES
+.endif
+
.if ${_NEED_HESIOD} == "YES"
BUILDLINK_PACKAGES+= hesiod
EVAL_PREFIX+= BUILDLINK_PREFIX.hesiod=hesiod