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 | 2dd4c91aa324bb3d53a65569311b184a500842ba (patch) | |
tree | f36bdf155011b2521ad9dfd8a23373398462d265 /net/libpcap | |
parent | 673a1b7cc2bc6821a611934197768830adb9581e (diff) | |
download | pkgsrc-2dd4c91aa324bb3d53a65569311b184a500842ba.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/libpcap')
-rw-r--r-- | net/libpcap/buildlink2.mk | 12 | ||||
-rw-r--r-- | net/libpcap/buildlink3.mk | 16 |
2 files changed, 16 insertions, 12 deletions
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 |