summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspz <spz@pkgsrc.org>2011-10-16 15:19:08 +0000
committerspz <spz@pkgsrc.org>2011-10-16 15:19:08 +0000
commitc5bb4b544b60533215697c9d2fdcec8f816e74c1 (patch)
tree4887e388dd4013638873604b17f2379c80376d58
parent1dee5ec45c1e4142fc5aa1abeba3c7a0780dedc1 (diff)
downloadpkgsrc-c5bb4b544b60533215697c9d2fdcec8f816e74c1.tar.gz
fix build issues when building with non-standard PREFIX (found by dholland)
introduce options allow optional building with net-snmp support pkglint cosmetics
-rw-r--r--net/xymon/Makefile26
-rw-r--r--net/xymon/distinfo15
-rw-r--r--net/xymon/options.mk39
-rw-r--r--net/xymon/patches/patch-aa57
-rw-r--r--net/xymon/patches/patch-ab18
-rw-r--r--net/xymon/patches/patch-ac4
-rw-r--r--net/xymon/patches/patch-af4
-rw-r--r--net/xymon/patches/patch-ah22
-rw-r--r--net/xymon/patches/patch-build_rrd.sh8
-rw-r--r--net/xymon/patches/patch-build_snmp.sh23
10 files changed, 175 insertions, 41 deletions
diff --git a/net/xymon/Makefile b/net/xymon/Makefile
index 16d66ed917a..aceb593122a 100644
--- a/net/xymon/Makefile
+++ b/net/xymon/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2011/10/15 23:07:24 spz Exp $
+# $NetBSD: Makefile,v 1.14 2011/10/16 15:19:08 spz Exp $
#
DISTNAME= xymon-4.3.5
-PKGNAME= xymon-4.3.5
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xymon/}
@@ -94,21 +94,14 @@ MESSAGE_SUBST+= SECCGIDIR=${SECCGIDIR}
EVAL_PREFIX+= PREFIX.fping=fping
CONFIGURE_ARGS+= "--server"
-CONFIGURE_ARGS+= "--rrdinclude ${BUILDLINK_PREFIX.rrdtool}/include"
-CONFIGURE_ARGS+= "--rrdlib ${BUILDLINK_PREFIX.rrdtool}/lib/librrd.a"
-CONFIGURE_ARGS+= "--pnglib ${BUILDLINK_PREFIX.png}/lib/libpng.a"
-CONFIGURE_ARGS+= "--pcreinclude ${BUILDLINK_PREFIX.pcre}/include"
-CONFIGURE_ARGS+= "--pcrelib ${BUILDLINK_PREFIX.pcre}/lib"
-CONFIGURE_ARGS+= "--sslinclude ${BUILDLINK_PREFIX.openssl}/include"
-CONFIGURE_ARGS+= "--ssllib ${BUILDLINK_PREFIX.openssl}/lib"
-CONFIGURE_ARGS+= "--ldapinclude ${BUILDLINK_PREFIX.openldap-client}/include"
-CONFIGURE_ARGS+= "--ldaplib ${BUILDLINK_PREFIX.openldap-client}/lib"
-CONFIGURE_ARGS+= "--fping ${PREFIX.fping}/sbin/fping"
+CONFIGURE_ARGS+= "--rrdinclude" "${BUILDLINK_PREFIX.rrdtool}/include"
+CONFIGURE_ARGS+= "--rrdlib" "${BUILDLINK_PREFIX.rrdtool}/lib"
+CONFIGURE_ARGS+= "--pngconfig" "${BUILDLINK_PREFIX.png}/bin/libpng-config"
+CONFIGURE_ARGS+= "--pcreinclude" "${BUILDLINK_PREFIX.pcre}/include"
+CONFIGURE_ARGS+= "--pcrelib" "${BUILDLINK_PREFIX.pcre}/lib"
+CONFIGURE_ARGS+= "--fping" "${PREFIX.fping}/sbin/fping"
CONFIGURE_ENV+= USEXYMONPING=n
-CONFIGURE_ENV+= ENABLESSL=y
-CONFIGURE_ENV+= ENABLELDAP=y
-CONFIGURE_ENV+= ENABLELDAPSSL=y
CONFIGURE_ENV+= XYMONHOSTNAME=${XYMONSERVERNAME:Q}
CONFIGURE_ENV+= XYMONHOSTIP=${XYMONSERVERIP:Q}
CONFIGURE_ENV+= XYMONUSER=${XYMONUSER:Q}
@@ -205,9 +198,8 @@ post-install:
chmod 0644 ${DESTDIR}${EXAMPLEDIR}/www/menu/${file}
.endfor
+.include "options.mk"
.include "../../databases/rrdtool/buildlink3.mk"
-.include "../../databases/openldap-client/buildlink3.mk"
-.include "../../security/openssl/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../mk/apache.mk"
diff --git a/net/xymon/distinfo b/net/xymon/distinfo
index 2cdd9c91aed..842f398ef31 100644
--- a/net/xymon/distinfo
+++ b/net/xymon/distinfo
@@ -1,14 +1,15 @@
-$NetBSD: distinfo,v 1.5 2011/10/15 23:07:24 spz Exp $
+$NetBSD: distinfo,v 1.6 2011/10/16 15:19:08 spz Exp $
SHA1 (xymon-4.3.5.tar.gz) = cd49d689bbf9c27ed4d2010cf75223d7f43f656e
RMD160 (xymon-4.3.5.tar.gz) = 31110454d30835f758d844e3c142066566546548
Size (xymon-4.3.5.tar.gz) = 2715187 bytes
-SHA1 (patch-aa) = 7e78416fe7bb3b0bc15397f7b4025bc1baa20a24
-SHA1 (patch-ab) = 9a8edca943211101f387e5a21d638d44a23cf6a7
-SHA1 (patch-ac) = c894c809ec4584636bb9705a521a0208dc2dbc05
+SHA1 (patch-aa) = c74991627bfc4286a67f66e45915c3af69b38c2f
+SHA1 (patch-ab) = d6079a2f09c38f701c553ab9744731050f66772c
+SHA1 (patch-ac) = 0c191268606b1bc8547a0403b440e7628b6e2928
SHA1 (patch-ad) = dadd2d81ed55c70f03994b2d868cfe643969a8ba
SHA1 (patch-ae) = aa29eefcf9f0fa87014166692dcf146cebd70ef5
-SHA1 (patch-af) = d486344e3f7fe05f61ea8ec0f811052a56ceb52f
-SHA1 (patch-ah) = 152d3b993559b349f241e0a2f6419721bfb3c4b3
-SHA1 (patch-build_rrd.sh) = 5abb10a959e0721b64d666c62e573e856a3404a9
+SHA1 (patch-af) = e8c3fd4ed1de6f7a74db8fac152534a1fe9f29f5
+SHA1 (patch-ah) = 29942670246f55cf4e703b028cd9a0dcb0acb681
+SHA1 (patch-build_rrd.sh) = 6c9393b93265d3c6d5bda801a875ec66f3759b01
+SHA1 (patch-build_snmp.sh) = 4141c6e2bebea078ac662b7585e579f2af8ee64f
SHA1 (patch-configure) = 7b71ed7a567124a2aa36d9bf9188209649e88a4d
diff --git a/net/xymon/options.mk b/net/xymon/options.mk
new file mode 100644
index 00000000000..54cc7b39af3
--- /dev/null
+++ b/net/xymon/options.mk
@@ -0,0 +1,39 @@
+# $NetBSD: options.mk,v 1.1 2011/10/16 15:19:08 spz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.xymon
+PKG_SUPPORTED_OPTIONS= ldap snmp ssl
+PKG_SUGGESTED_OPTIONS= ldap ssl
+
+.include "../../mk/bsd.options.mk"
+
+# include support for ldap
+.if !empty(PKG_OPTIONS:Mldap)
+CONFIGURE_ARGS+= "--ldapinclude" "${BUILDLINK_PREFIX.openldap-client}/include"
+CONFIGURE_ARGS+= "--ldaplib" "${BUILDLINK_PREFIX.openldap-client}/lib"
+CONFIGURE_ENV+= ENABLELDAP=y
+.if !empty(PKG_OPTIONS:Mssl)
+CONFIGURE_ENV+= ENABLELDAPSSL=y
+.endif
+.include "../../databases/openldap-client/buildlink3.mk"
+.else
+CONFIGURE_ENV+= ENABLELDAP=n
+.endif
+
+# include support for snmp
+.if !empty(PKG_OPTIONS:Msnmp)
+CONFIGURE_ENV+= SNMP=1
+CONFIGURE_ARGS+= "--snmpconfig" "${BUILDLINK_PREFIX.net-snmp}/bin/net-snmp-config"
+.include "../../net/net-snmp/buildlink3.mk"
+.else
+CONFIGURE_ENV+= SNMP=n
+.endif
+
+# include support for ssl
+.if !empty(PKG_OPTIONS:Mssl)
+CONFIGURE_ARGS+= "--sslinclude" "${BUILDLINK_PREFIX.openssl}/include"
+CONFIGURE_ARGS+= "--ssllib" "${BUILDLINK_PREFIX.openssl}/lib"
+CONFIGURE_ENV+= ENABLESSL=y
+.include "../../security/openssl/buildlink3.mk"
+.else
+CONFIGURE_ENV+= ENABLESSL=n
+.endif
diff --git a/net/xymon/patches/patch-aa b/net/xymon/patches/patch-aa
index b6158bf316d..db9a433e81f 100644
--- a/net/xymon/patches/patch-aa
+++ b/net/xymon/patches/patch-aa
@@ -1,22 +1,33 @@
-$NetBSD: patch-aa,v 1.3 2011/10/15 23:07:24 spz Exp $
+$NetBSD: patch-aa,v 1.4 2011/10/16 15:19:08 spz Exp $
+
+add extra options for cases where PREFIX is not in a standard location
+
+add INSTALLEXADIR for some pkgsrc magic
--- configure.server.orig 2011-03-08 17:20:28.000000000 +0000
+++ configure.server
-@@ -17,6 +17,8 @@ do
+@@ -17,12 +17,15 @@ do
To configure Xymon, the following options are available:
--rrdinclude DIRECTORY : Specify location of RRDtool include files
--rrdlib DIRECTORY : Specify location of RRDtool libraries
-+ --pnglib DIRECTORY : Specify location of PNG library
++ --pngconfig PROGRAM : Specify location of libpng-config program
+ --zlib DIRECTORY : Specify location of Z library
--pcreinclude DIRECTORY : Specify location of PCRE include files
--pcrelib DIRECTORY : Specify location of PCRE libraries
--sslinclude DIRECTORY : Specify location of OpenSSL include files
-@@ -36,6 +38,12 @@ EOF
+ --ssllib DIRECTORY : Specify location of OpenSSL libraries
+ --ldapinclude DIRECTORY : Specify location of OpenLDAP include files
+ --ldaplib DIRECTORY : Specify location of OpenLDAP libraries
++ --snmpconfig PROGRAM : Specify location of net-snmp-config program
+ --fping FILENAME : Specify location of the Fping program
+
+ The script will search a number of standard directories for
+@@ -36,6 +39,12 @@ EOF
"--rrdlib")
USERRRDLIB="$1"; shift
;;
-+ "--pnglib")
-+ USERPNGLIB="$1"; shift
++ "--pngconfig")
++ USERPNGCONFIG="$1"; shift
+ ;;
+ "--zlib")
+ USERZLIB="$1"; shift
@@ -24,7 +35,39 @@ $NetBSD: patch-aa,v 1.3 2011/10/15 23:07:24 spz Exp $
"--pcreinclude")
USERPCREINC="$1"; shift
;;
-@@ -507,6 +515,9 @@ fi
+@@ -54,6 +63,9 @@ EOF
+ "--ldaplib")
+ USERLDAPLIB="$1"; shift
+ ;;
++ "--snmpconfig")
++ USERSNMPCONFIG="$1"; shift
++ ;;
+ "--fping")
+ USERFPING="$1"; shift
+ ;;
+@@ -393,11 +405,11 @@ then
+ fi
+ echo ""; echo ""
+
+-echo "# Toplevel Makefile for Xymon" > Makefile
++echo "# Toplevel Makefile for Xymon" > Makefile
+
+ echo "BUILDTOPDIR=\`pwd\`" >>Makefile
+ echo "" >>Makefile
+-echo "# configure settings for Xymon" >>Makefile
++echo "# configure settings for Xymon" >>Makefile
+ echo "#" >>Makefile
+ echo "# Toplevel dir" >>Makefile
+ echo "XYMONTOPDIR = $XYMONTOPDIR" >>Makefile
+@@ -477,6 +489,7 @@ echo "LIBRTDEF = $LIBRTDEF"
+ echo "" >>Makefile
+ echo "# Net-SNMP settings" >>Makefile
+ echo "DOSNMP = $DOSNMP" >>Makefile
++echo "SNMPCONFIG = $SNMPCONFIG" >>Makefile
+ echo "" >>Makefile
+
+ echo "# Large File Support settings" >>Makefile
+@@ -507,6 +520,9 @@ fi
if test "$INSTALLETCDIR" != ""; then
echo "INSTALLETCDIR = $INSTALLETCDIR" >>Makefile
fi
diff --git a/net/xymon/patches/patch-ab b/net/xymon/patches/patch-ab
index ef23e4ec8f5..146fce7cbda 100644
--- a/net/xymon/patches/patch-ab
+++ b/net/xymon/patches/patch-ab
@@ -1,6 +1,9 @@
-$NetBSD: patch-ab,v 1.2 2011/04/22 14:52:18 spz Exp $
+$NetBSD: patch-ab,v 1.3 2011/10/16 15:19:08 spz Exp $
---- build/Makefile.rules.orig 2011-03-08 17:20:28.000000000 +0000
+add SNMPCONFIG var for non-standard PREFIX
+add lots of pkgsrc magic
+
+--- build/Makefile.rules.orig 2011-09-03 13:57:39.000000000 +0000
+++ build/Makefile.rules
@@ -22,9 +22,9 @@ else
INSTALLTARGETS = install-client install-clientmsg
@@ -25,6 +28,15 @@ $NetBSD: patch-ab,v 1.2 2011/04/22 14:52:18 spz Exp $
ifndef INSTALLEXTDIR
INSTALLEXTDIR = $(XYMONHOME)/ext
endif
+@@ -94,7 +97,7 @@ xymongen-build: lib-build common-build
+
+
+ xymonnet-build: lib-build common-build
+- CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" LDAPFLAGS="$(LDAPFLAGS)" LDAPINCDIR="$(LDAPINCDIR)" LDAPLIBS="$(LDAPLIBS)" DOSNMP="$(DOSNMP)" NETLIBS="$(NETLIBS)" XYMONHOME="$(XYMONHOME)" ARESVER="$(ARESVER)" RUNTIMEDEFS="$(RUNTIMEDEFS)" PCREINCDIR="$(PCREINCDIR)" PCRELIBS="$(PCRELIBS)" LIBRTDEF="$(LIBRTDEF)" $(MAKE) -C xymonnet all
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" SSLFLAGS="$(SSLFLAGS)" SSLINCDIR="$(SSLINCDIR)" SSLLIBS="$(SSLLIBS)" LDAPFLAGS="$(LDAPFLAGS)" LDAPINCDIR="$(LDAPINCDIR)" LDAPLIBS="$(LDAPLIBS)" DOSNMP="$(DOSNMP)" SNMPCONFIG="$(SNMPCONFIG)" NETLIBS="$(NETLIBS)" XYMONHOME="$(XYMONHOME)" ARESVER="$(ARESVER)" RUNTIMEDEFS="$(RUNTIMEDEFS)" PCREINCDIR="$(PCREINCDIR)" PCRELIBS="$(PCRELIBS)" LIBRTDEF="$(LIBRTDEF)" $(MAKE) -C xymonnet all
+
+ xymonproxy-build: lib-build common-build
+ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RPATHOPT="$(RPATHOPT)" NETLIBS="$(NETLIBS)" LIBRTDEF="$(LIBRTDEF)" XYMONHOME="$(XYMONHOME)" $(MAKE) -C xymonproxy all
@@ -167,72 +170,77 @@ install-servermsg:
@echo "To view the Xymon webpages, go to http://${XYMONHOSTNAME}${XYMONHOSTURL}"
@@ -128,7 +140,7 @@ $NetBSD: patch-ab,v 1.2 2011/04/22 14:52:18 spz Exp $
install-xymonnet: install-common
- XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" ARESVER="$(ARESVER)" DOSNMP="$(DOSNMP)" INSTALLROOT="$(INSTALLROOT)" INSTALLBINDIR="$(INSTALLBINDIR)" INSTALLETCDIR="$(INSTALLETCDIR)" INSTALLEXTDIR="$(INSTALLEXTDIR)" INSTALLTMPDIR="$(INSTALLTMPDIR)" INSTALLWEBDIR="$(INSTALLWEBDIR)" INSTALLWWWDIR="$(INSTALLWWWDIR)" PKGBUILD="$(PKGBUILD)" $(MAKE) -C xymonnet install
-+ XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" ARESVER="$(ARESVER)" DOSNMP="$(DOSNMP)" INSTALLROOT="$(INSTALLROOT)" INSTALLBINDIR="$(INSTALLBINDIR)" INSTALLETCDIR="$(INSTALLEXADIR)" INSTALLEXTDIR="$(INSTALLEXTDIR)" INSTALLTMPDIR="$(INSTALLTMPDIR)" INSTALLWEBDIR="$(INSTALLWEBDIR)" INSTALLWWWDIR="$(INSTALLWWWDIR)" PKGBUILD="$(PKGBUILD)" $(MAKE) -C xymonnet install
++ XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" ARESVER="$(ARESVER)" DOSNMP="$(DOSNMP)" SNMPCONFIG="$(SNMPCONFIG)" INSTALLROOT="$(INSTALLROOT)" INSTALLBINDIR="$(INSTALLBINDIR)" INSTALLETCDIR="$(INSTALLEXADIR)" INSTALLEXTDIR="$(INSTALLEXTDIR)" INSTALLTMPDIR="$(INSTALLTMPDIR)" INSTALLWEBDIR="$(INSTALLWEBDIR)" INSTALLWWWDIR="$(INSTALLWWWDIR)" PKGBUILD="$(PKGBUILD)" $(MAKE) -C xymonnet install
install-xymonproxy: install-common
- XYMONHOME="$(XYMONHOME)" MANROOT="$(MANROOT)" INSTALLROOT="$(INSTALLROOT)" INSTALLBINDIR="$(INSTALLBINDIR)" INSTALLETCDIR="$(INSTALLETCDIR)" INSTALLEXTDIR="$(INSTALLEXTDIR)" INSTALLTMPDIR="$(INSTALLTMPDIR)" INSTALLWEBDIR="$(INSTALLWEBDIR)" INSTALLWWWDIR="$(INSTALLWWWDIR)" $(MAKE) -C xymonproxy install
diff --git a/net/xymon/patches/patch-ac b/net/xymon/patches/patch-ac
index 0a870cfd45f..86955b2c3fb 100644
--- a/net/xymon/patches/patch-ac
+++ b/net/xymon/patches/patch-ac
@@ -1,4 +1,6 @@
-$NetBSD: patch-ac,v 1.2 2011/04/22 14:52:18 spz Exp $
+$NetBSD: patch-ac,v 1.3 2011/10/16 15:19:09 spz Exp $
+
+pkgsrc uses rc.d files to stop/start, don't copy that xymon.sh
--- xymond/Makefile.orig 2011-03-08 17:20:28.000000000 +0000
+++ xymond/Makefile
diff --git a/net/xymon/patches/patch-af b/net/xymon/patches/patch-af
index e6966cbefe5..959d17d8b6b 100644
--- a/net/xymon/patches/patch-af
+++ b/net/xymon/patches/patch-af
@@ -1,4 +1,6 @@
-$NetBSD: patch-af,v 1.2 2011/04/22 14:52:18 spz Exp $
+$NetBSD: patch-af,v 1.3 2011/10/16 15:19:09 spz Exp $
+
+xymonclient starts from rc.d, don't start it via xymon also
--- xymond/etcfiles/tasks.cfg.DIST.orig 2011-03-08 17:20:28.000000000 +0000
+++ xymond/etcfiles/tasks.cfg.DIST
diff --git a/net/xymon/patches/patch-ah b/net/xymon/patches/patch-ah
index 178a923bde2..634d9febba0 100644
--- a/net/xymon/patches/patch-ah
+++ b/net/xymon/patches/patch-ah
@@ -1,6 +1,11 @@
-$NetBSD: patch-ah,v 1.1 2011/04/22 14:52:18 spz Exp $
+$NetBSD: patch-ah,v 1.2 2011/10/16 15:19:09 spz Exp $
---- xymonnet/Makefile.orig 2011-03-08 17:20:28.000000000 +0000
+the c-ares dependencies are being difficult, manipulate it into working
+
+use a variable for the path to net-snmp-config, for cases with nonstandard
+locations
+
+--- xymonnet/Makefile.orig 2011-08-19 11:26:58.000000000 +0000
+++ xymonnet/Makefile
@@ -59,6 +59,8 @@ c-ares/configure: c-ares-$(ARESVER).tar.
mv c-ares-$(ARESVER) c-ares
@@ -11,3 +16,16 @@ $NetBSD: patch-ah,v 1.1 2011/04/22 14:52:18 spz Exp $
beastat: $(BEASTATOBJS) ../lib/libxymon.a
$(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(BEASTATOBJS) ../lib/libxymon.a $(PCRELIBS) $(NETLIBS) $(LIBRTDEF)
+@@ -72,10 +74,10 @@ contest: contest.c httptest.o dns.o dns2
+
+
+ xymon-snmpcollect: xymon-snmpcollect.o $(LIBOBJS)
+- $(CC) $(LDFLAGS) -o $@ xymon-snmpcollect.o `net-snmp-config --libs` ../lib/libxymon.a $(SSLLIBS) $(NETLIBS) $(LIBRTDEF)
++ $(CC) $(LDFLAGS) -o $@ xymon-snmpcollect.o `${SNMPCONFIG} --libs` ../lib/libxymon.a $(SSLLIBS) $(NETLIBS) $(LIBRTDEF)
+
+ xymon-snmpcollect.o: xymon-snmpcollect.c
+- $(CC) $(CFLAGS) -I. `net-snmp-config --cflags` -c -o $@ xymon-snmpcollect.c
++ $(CC) $(CFLAGS) -I. `${SNMPCONFIG} --cflags` -c -o $@ xymon-snmpcollect.c
+
+ ################################################
+ # Default compilation rules
diff --git a/net/xymon/patches/patch-build_rrd.sh b/net/xymon/patches/patch-build_rrd.sh
index b13d6cfc4c5..84d120d7ad8 100644
--- a/net/xymon/patches/patch-build_rrd.sh
+++ b/net/xymon/patches/patch-build_rrd.sh
@@ -1,4 +1,6 @@
-$NetBSD: patch-build_rrd.sh,v 1.1 2011/10/15 23:07:24 spz Exp $
+$NetBSD: patch-build_rrd.sh,v 1.2 2011/10/16 15:19:09 spz Exp $
+
+make it possible to deal with nonstandard locations of libpng* and libz*
--- build/rrd.sh.orig 2011-03-08 17:20:28.000000000 +0000
+++ build/rrd.sh
@@ -6,8 +8,8 @@ $NetBSD: patch-build_rrd.sh,v 1.1 2011/10/15 23:07:24 spz Exp $
if test "$USERRRDLIB" != ""; then
RRDLIB="$USERRRDLIB"
fi
-+ if test "$USERPNGLIB" != ""; then
-+ PNGLIB="$USERPNGLIB"
++ if test "$USERPNGCONFIG" != ""; then
++ PNGLIB=`$USERPNGCONFIG --ldflags`
+ fi
+ if test "$USERZLIB" != ""; then
+ ZLIB="$USERZLIB"
diff --git a/net/xymon/patches/patch-build_snmp.sh b/net/xymon/patches/patch-build_snmp.sh
new file mode 100644
index 00000000000..556c9c3b754
--- /dev/null
+++ b/net/xymon/patches/patch-build_snmp.sh
@@ -0,0 +1,23 @@
+$NetBSD: patch-build_snmp.sh,v 1.1 2011/10/16 15:19:09 spz Exp $
+
+make it possible to deal with a net-snmp-config that's not in the default path
+
+--- build/snmp.sh.orig 2008-09-30 16:37:31.000000000 +0000
++++ build/snmp.sh
+@@ -2,8 +2,15 @@
+
+ SNMPINC=""
+ SNMPLIB=""
++ SNMPCONFIG=""
++
++ if test "$USERSNMPCONFIG" != ""; then
++ SNMPCONFIG="$USERSNMPCONFIG"
++ else
++ SNMPCONFIG="net-snmp-config" # it might be in the path
++ fi
++ VERSION=`${SNMPCONFIG} --version`
+
+- VERSION=`net-snmp-config --version`
+ if test $? -eq 0
+ then
+ echo "Found Net-SNMP version $VERSION"