diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-12 01:59:37 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-12 01:59:37 +0000 |
commit | 1edfa505eddb87dd79db0d2897323b39e05e4a03 (patch) | |
tree | f36bdf155011b2521ad9dfd8a23373398462d265 /net | |
parent | 3574066d66f5570c39b086cbf1ccc1116cb66c7b (diff) | |
download | pkgsrc-1edfa505eddb87dd79db0d2897323b39e05e4a03.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')
-rw-r--r-- | net/hesiod/buildlink2.mk | 22 | ||||
-rw-r--r-- | net/libpcap/buildlink2.mk | 12 | ||||
-rw-r--r-- | net/libpcap/buildlink3.mk | 16 |
3 files changed, 30 insertions, 20 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 diff --git a/net/libpcap/buildlink2.mk b/net/libpcap/buildlink2.mk index cda6b050da1..2d72563273f 100644 --- a/net/libpcap/buildlink2.mk +++ b/net/libpcap/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.6 2004/02/05 07:17:14 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.7 2004/02/12 01:59:38 jlam Exp $ .if !defined(LIBPCAP_BUILDLINK2_MK) LIBPCAP_BUILDLINK2_MK= # defined @@ -9,9 +9,15 @@ BUILDLINK_DEPENDS.libpcap?= libpcap>=0.7.2 BUILDLINK_PKGSRCDIR.libpcap?= ../../net/libpcap .if exists(/usr/include/pcap.h) -_NEED_LIBPCAP= NO +_BUILTIN_LIBPCAP= YES .else -_NEED_LIBPCAP= YES +_BUILTIN_LIBPCAP= NO +.endif + +.if ${_BUILTIN_LIBPCAP} == "YES" +_NEED_LIBPCAP= NO +.else +_NEED_LIBPCAP= YES .endif .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ diff --git a/net/libpcap/buildlink3.mk b/net/libpcap/buildlink3.mk index d45215ff886..3a00ea7ece8 100644 --- a/net/libpcap/buildlink3.mk +++ b/net/libpcap/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.8 2004/02/05 07:17:14 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.9 2004/02/12 01:59:38 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ LIBPCAP_BUILDLINK3_MK:= ${LIBPCAP_BUILDLINK3_MK}+ @@ -20,6 +20,12 @@ BUILDLINK_IS_BUILTIN.libpcap= YES . endif .endif +.if !empty(BUILDLINK_IS_BUILTIN.libpcap:M[yY][eE][sS]) +BUILDLINK_USE_BUILTIN.libpcap= YES +.else +BUILDLINK_USE_BUILTIN.libpcap= NO +.endif + .if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \ !empty(PREFER_PKGSRC:Mlibpcap) BUILDLINK_USE_BUILTIN.libpcap= NO @@ -29,14 +35,6 @@ BUILDLINK_USE_BUILTIN.libpcap= NO BUILDLINK_USE_BUILTIN.libpcap= YES .endif -.if !defined(BUILDLINK_USE_BUILTIN.libpcap) -. if !empty(BUILDLINK_IS_BUILTIN.libpcap:M[nN][oO]) -BUILDLINK_USE_BUILTIN.libpcap= NO -. else -BUILDLINK_USE_BUILTIN.libpcap= YES -. endif -.endif - .if !empty(BUILDLINK_USE_BUILTIN.libpcap:M[nN][oO]) . if !empty(BUILDLINK_DEPTH:M+) BUILDLINK_DEPENDS+= libpcap |