summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjlam <jlam>2002-10-24 09:54:43 +0000
committerjlam <jlam>2002-10-24 09:54:43 +0000
commit3f0072cd904d48c1a61940703cbc44da63eec464 (patch)
treeffec272a40e5b83791e477460763eb105ec8a8e2 /net
parentaa42c246776d0b0e7fb7f0cad536cfbad2bacff7 (diff)
downloadpkgsrc-3f0072cd904d48c1a61940703cbc44da63eec464.tar.gz
If a package uses the UCD-SNMP interface to Net-SNMP, then first check
if ucd-snmp is installed. If it is, then use it, otherwise, use the net-snmp package with the ucd-snmp-compatibility headers and libraries. A package signals that it wants to use the UCD-SNMP interface by defining USE_UCD_SNMP in the package Makefile.
Diffstat (limited to 'net')
-rw-r--r--net/net-snmp/buildlink2.mk15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/net-snmp/buildlink2.mk b/net/net-snmp/buildlink2.mk
index ba213ded175..6a497891b7f 100644
--- a/net/net-snmp/buildlink2.mk
+++ b/net/net-snmp/buildlink2.mk
@@ -1,8 +1,18 @@
-# $NetBSD: buildlink2.mk,v 1.2 2002/10/24 09:34:08 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.3 2002/10/24 09:54:43 jlam Exp $
.if !defined(NET_SNMP_BUILDLINK2_MK)
NET_SNMP_BUILDLINK2_MK= # defined
+# If a package uses the UCD-SNMP interface to Net-SNMP, then first check
+# if ucd-snmp is installed. If it is, then use it, otherwise, use the
+# net-snmp package with the ucd-snmp-compatibility headers and libraries.
+#
+.if defined(USE_UCD_SNMP)
+_UCD_SNMP_INSTALLED!= ${PKG_INFO} -e ucd-snmp || ${ECHO}
+. if !empty(_UCD_SNMP_INSTALLED)
+. include "../../net/ucd-snmp/buildlink2.mk"
+. else
+
BUILDLINK_PACKAGES+= net-snmp
BUILDLINK_PKGBASE.net-snmp= net-snmp
BUILDLINK_DEPENDS.net-snmp?= net-snmp>=5.0.6
@@ -23,4 +33,7 @@ BUILDLINK_TARGETS+= net-snmp-buildlink
net-snmp-buildlink: _BUILDLINK_USE
+. endif # _UCD_SNMP_INSTALLED
+.endif # USE_UCD_SNMP
+
.endif # NET_SNMP_BUILDLINK2_MK