pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net



Module Name:    pkgsrc
Committed By:   spz
Date:           Thu Sep 28 10:40:35 UTC 2017

Modified Files:
        pkgsrc/net/xymon: Makefile distinfo
        pkgsrc/net/xymon/patches: patch-ac patch-ad patch-ah
            patch-build_Makefile.FreeBSD patch-build_Makefile.Linux
            patch-configure
        pkgsrc/net/xymonclient: Makefile distinfo
        pkgsrc/net/xymonclient/patches: patch-ac patch-ae
            patch-build_Makefile.FreeBSD
Added Files:
        pkgsrc/net/xymon/patches: patch-build_Makefile.AIX
            patch-build_Makefile.Darwin patch-build_Makefile.HP-UX
            patch-build_Makefile.IRIX patch-build_Makefile.OSF1
            patch-build_Makefile.OSX patch-build_Makefile.OpenBSD
            patch-build_Makefile.SunOS patch-build_Makefile.generic
            patch-common_Makefile patch-web_Makefile patch-xymonproxy_Makefile
        pkgsrc/net/xymonclient/patches: patch-build_Makefile.AIX
            patch-build_Makefile.Darwin patch-build_Makefile.HP-UX
            patch-build_Makefile.IRIX patch-build_Makefile.Linux
            patch-build_Makefile.OSF1 patch-build_Makefile.OSX
            patch-build_Makefile.OpenBSD patch-build_Makefile.SunOS
            patch-build_Makefile.generic patch-client_logfetch.c
            patch-common_Makefile

Log Message:
update xymon + xymonclient to 4.3.28

notable changes: OpenSSL 1.1.0 is now supported, and c-ares has been updated

While touching the package anyhow, it has been taught to pass down hardening
flags, so that the various PKGSRC_USE_ flags now have effect.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 pkgsrc/net/xymon/Makefile
cvs rdiff -u -r1.16 -r1.17 pkgsrc/net/xymon/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/net/xymon/patches/patch-ac
cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/xymon/patches/patch-ad
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/xymon/patches/patch-ah
cvs rdiff -u -r0 -r1.1 pkgsrc/net/xymon/patches/patch-build_Makefile.AIX \
    pkgsrc/net/xymon/patches/patch-build_Makefile.Darwin \
    pkgsrc/net/xymon/patches/patch-build_Makefile.HP-UX \
    pkgsrc/net/xymon/patches/patch-build_Makefile.IRIX \
    pkgsrc/net/xymon/patches/patch-build_Makefile.OSF1 \
    pkgsrc/net/xymon/patches/patch-build_Makefile.OSX \
    pkgsrc/net/xymon/patches/patch-build_Makefile.OpenBSD \
    pkgsrc/net/xymon/patches/patch-build_Makefile.SunOS \
    pkgsrc/net/xymon/patches/patch-build_Makefile.generic \
    pkgsrc/net/xymon/patches/patch-common_Makefile \
    pkgsrc/net/xymon/patches/patch-web_Makefile \
    pkgsrc/net/xymon/patches/patch-xymonproxy_Makefile
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/net/xymon/patches/patch-build_Makefile.FreeBSD \
    pkgsrc/net/xymon/patches/patch-build_Makefile.Linux
cvs rdiff -u -r1.4 -r1.5 pkgsrc/net/xymon/patches/patch-configure
cvs rdiff -u -r1.20 -r1.21 pkgsrc/net/xymonclient/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/net/xymonclient/distinfo
cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/xymonclient/patches/patch-ac
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/xymonclient/patches/patch-ae
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.AIX \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.Darwin \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.HP-UX \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.IRIX \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.Linux \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSF1 \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSX \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.OpenBSD \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.SunOS \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.generic \
    pkgsrc/net/xymonclient/patches/patch-client_logfetch.c \
    pkgsrc/net/xymonclient/patches/patch-common_Makefile
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/net/xymonclient/patches/patch-build_Makefile.FreeBSD

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/xymon/Makefile
diff -u pkgsrc/net/xymon/Makefile:1.50 pkgsrc/net/xymon/Makefile:1.51
--- pkgsrc/net/xymon/Makefile:1.50      Wed Sep  6 09:03:03 2017
+++ pkgsrc/net/xymon/Makefile   Thu Sep 28 10:40:35 2017
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.50 2017/09/06 09:03:03 wiz Exp $
+# $NetBSD: Makefile,v 1.51 2017/09/28 10:40:35 spz Exp $
 #
 
-DISTNAME=              xymon-4.3.27
-PKGREVISION=           2
+DISTNAME=              xymon-4.3.28
 CATEGORIES=            net
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=xymon/}
 

Index: pkgsrc/net/xymon/distinfo
diff -u pkgsrc/net/xymon/distinfo:1.16 pkgsrc/net/xymon/distinfo:1.17
--- pkgsrc/net/xymon/distinfo:1.16      Fri Dec  9 21:08:34 2016
+++ pkgsrc/net/xymon/distinfo   Thu Sep 28 10:40:35 2017
@@ -1,21 +1,33 @@
-$NetBSD: distinfo,v 1.16 2016/12/09 21:08:34 spz Exp $
+$NetBSD: distinfo,v 1.17 2017/09/28 10:40:35 spz Exp $
 
-SHA1 (xymon-4.3.27.tar.gz) = 76055c6b1b60f1d2f86859d1de8fec70ce59e538
-RMD160 (xymon-4.3.27.tar.gz) = 585b9e5f49444eee255db62d1510fc67f2539f96
-SHA512 (xymon-4.3.27.tar.gz) = bb48fce02e20f040675d3cf8e32596855b57c8ad1ed12c684550458cc286a6d214814ba596a670539d137e238a9e02ff9f8ffe2522571b95445db5b81b12d0f1
-Size (xymon-4.3.27.tar.gz) = 3000255 bytes
+SHA1 (xymon-4.3.28.tar.gz) = 9b134af41549e46f46f310b315f70ce42e6668a7
+RMD160 (xymon-4.3.28.tar.gz) = 7d2426a6639c52b0a1f6e3d2e5c4e4607090809d
+SHA512 (xymon-4.3.28.tar.gz) = 589230ee05028c2131d1ddf32dd1a5f302bfcdbf8276bc6ee0fb9590ae2bfe218bf49d931cfa68491160c35818d0bee93b7fcea47b85f924a4f991a5ff608477
+Size (xymon-4.3.28.tar.gz) = 3966200 bytes
 SHA1 (patch-aa) = 227b631c6e002712ebf6019d8473ca4b44904e4a
 SHA1 (patch-ab) = 39a6af51ec216bb8cbdb57a3c07d82fce559b27f
-SHA1 (patch-ac) = a44d1c7471d6aafe36931fa8dd001c0d3b7d7b72
-SHA1 (patch-ad) = 218ef05eb3d51d779230c357d731b2f904d4559f
+SHA1 (patch-ac) = 518abacafb7f082ab2de6bcaace27d3e3d4de633
+SHA1 (patch-ad) = 4b5413ee14d035fb1b588207b86ebaf0ac122951
 SHA1 (patch-ae) = 7519eaeecab9f5d4b6956e0fd426548ec7990a0b
 SHA1 (patch-af) = e8c3fd4ed1de6f7a74db8fac152534a1fe9f29f5
-SHA1 (patch-ah) = 03fee4b97cc3301339ace1ce459e7b679b83f96a
-SHA1 (patch-build_Makefile.FreeBSD) = e58b50f35068cba6fed89cc21bcc4eb7d30efd23
-SHA1 (patch-build_Makefile.Linux) = eea6d1ced23a622d115aa97dc10d352f9dd622b0
+SHA1 (patch-ah) = db3ea148759f970d9c5e3ef600836751b7aafe12
+SHA1 (patch-build_Makefile.AIX) = e3a06992b075507a02f77a6b04ee4425cc2f8dd1
+SHA1 (patch-build_Makefile.Darwin) = 3b86292fba80a05c03e8ace424cddfb726a974fc
+SHA1 (patch-build_Makefile.FreeBSD) = 6ebfa5bab2955eaa42b0021de085eb7ba536432b
+SHA1 (patch-build_Makefile.HP-UX) = bdd713b83f3670096bb10def6c59036d0a4aa377
+SHA1 (patch-build_Makefile.IRIX) = b0ce34295d199ffd1e9008569667abbe436a2355
+SHA1 (patch-build_Makefile.Linux) = 3dd75b6613fbf268411ec177f8be5acd48ac8c27
+SHA1 (patch-build_Makefile.OSF1) = 1a7afce4beeef249b2435c2ef14f45b2c2dbf8a2
+SHA1 (patch-build_Makefile.OSX) = a72b748600b043f458452ab37175c38087375559
+SHA1 (patch-build_Makefile.OpenBSD) = cf40c7839ba6290d349328e2e01a20bdaf274fc6
+SHA1 (patch-build_Makefile.SunOS) = 71d134a30825a2d36fbb17731e722c89c79da807
+SHA1 (patch-build_Makefile.generic) = e96d5ee29630c9133caebfa752880be90726607c
 SHA1 (patch-build_rrd.sh) = cfafece75defb13b413917bfddedb41cb9bb3c8b
 SHA1 (patch-build_snmp.sh) = 4141c6e2bebea078ac662b7585e579f2af8ee64f
-SHA1 (patch-configure) = b654e6da62e1aabdad4b8bfb0fd3e87de89de6d5
+SHA1 (patch-common_Makefile) = 32b7da06cd9d22f98ee0f83bb36ed6441c066707
+SHA1 (patch-configure) = 3754b9056c365b8664e5fc9620b17c4e13453b2e
+SHA1 (patch-web_Makefile) = a27fbb7e97ce0c2f30093d5b05b0af2708fb594b
 SHA1 (patch-xymond_client_netbsd.c) = 9034777cbf12e3e168cf1598bfd444468e3a5086
 SHA1 (patch-xymond_rrd_do__disk.c) = e72cb0364e4e949e02a045da0abca46083624253
 SHA1 (patch-xymond_rrd_do__vmstat.c) = 8062acc24e9b0e767c5abd3373641aa7b9a5b2ae
+SHA1 (patch-xymonproxy_Makefile) = 8ecfa4ceb66f66b7d5f40c01339479b26865746e

Index: pkgsrc/net/xymon/patches/patch-ac
diff -u pkgsrc/net/xymon/patches/patch-ac:1.5 pkgsrc/net/xymon/patches/patch-ac:1.6
--- pkgsrc/net/xymon/patches/patch-ac:1.5       Thu Feb 27 20:22:41 2014
+++ pkgsrc/net/xymon/patches/patch-ac   Thu Sep 28 10:40:35 2017
@@ -1,9 +1,104 @@
-$NetBSD: patch-ac,v 1.5 2014/02/27 20:22:41 spz Exp $
+$NetBSD: patch-ac,v 1.6 2017/09/28 10:40:35 spz Exp $
 
 pkgsrc uses rc.d files to stop/start, don't copy that xymon.sh
+allow hardening
 
---- xymond/Makefile.orig       2014-01-19 15:23:42.000000000 +0000
+--- xymond/Makefile.orig       2015-03-13 06:15:38.000000000 +0000
 +++ xymond/Makefile
+@@ -41,25 +41,25 @@ all: $(PROGRAMS) cfgfiles
+ client: $(CLIENTPROGRAMS)
+ 
+ xymond: $(XYMONDOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(XYMONDOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(XYMONDOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(PCRELIBS)
+ 
+ xymond_channel: $(CHANNELOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(CHANNELOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CHANNELOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(PCRELIBS)
+ 
+ xymond_locator: $(LOCATOROBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(LOCATOROBJS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(LOCATOROBJS) $(XYMONCOMMLIBS)
+ 
+ xymond_filestore: $(FILESTOREOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(FILESTOREOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(FILESTOREOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ xymond_history: $(HISTORYOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(HISTORYOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(HISTORYOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
+ 
+ xymond_alert: $(ALERTOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(ALERTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(ALERTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ xymond_rrd: $(RRDOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(RRDOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(RRDLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(RRDOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(RRDLIBS) $(PCRELIBS)
+ 
+ xymond.o: xymond.c
+       $(CC) $(CFLAGS) $(SSLFLAGS) -c -o $@ xymond.c
+@@ -74,22 +74,22 @@ xymond_capture.o: xymond_capture.c
+       $(CC) $(CFLAGS) $(PCREINCDIR) -c -o $@ xymond_capture.c
+ 
+ xymond_sample: $(SAMPLEOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(SAMPLEOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(SAMPLEOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
+ 
+ xymond_capture: $(CAPTUREOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(CAPTUREOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CAPTUREOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ xymond_distribute: $(DISTRIBUTEOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(DISTRIBUTEOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(DISTRIBUTEOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ xymond_hostdata: $(HOSTDATAOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(HOSTDATAOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(HOSTDATAOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
+ 
+ xymond_client: $(CLIENTOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(CLIENTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CLIENTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ ../client/xymond_client: $(CLIENTOBJS) ../lib/libxymonclientcomm.a  ../lib/libxymontime.a ../lib/libxymonclient.a
+-      $(CC) -o $@ $(RPATHOPT) $(CLIENTOBJS) ../lib/libxymonclientcomm.a  ../lib/libxymontime.a ../lib/libxymonclient.a $(PCRELIBS) $(NETLIBS) $(LIBRTDEF)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CLIENTOBJS) ../lib/libxymonclientcomm.a  ../lib/libxymontime.a ../lib/libxymonclient.a $(PCRELIBS) $(NETLIBS) $(LIBRTDEF)
+ 
+ xymond_client.o: xymond_client.c client/*.c
+       $(CC) $(CFLAGS) -c -o $@ xymond_client.c
+@@ -98,25 +98,25 @@ combostatus.o: combostatus.c
+       $(CC) $(CFLAGS) $(PCREINCDIR) -c -o $@ $<
+ 
+ combostatus: $(COMBOTESTOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(LDFLAGS) -o $@ $(RPATHOPT) $(COMBOTESTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(COMBOTESTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ xymon-mailack.o: xymon-mailack.c
+       $(CC) $(CFLAGS) $(PCREINCDIR) -c -o $@ xymon-mailack.c
+ 
+ xymon-mailack: $(MAILACKOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(MAILACKOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(MAILACKOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ trimhistory: $(TRIMHISTOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(TRIMHISTOBJS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(TRIMHISTOBJS) $(XYMONCOMMLIBS)
+ 
+ xymonfetch: $(FETCHOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(FETCHOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(FETCHOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
+ 
+ convertnk: $(CONVERTNKOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(CONVERTNKOBJS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CONVERTNKOBJS) $(XYMONCOMMLIBS)
+ 
+ rrdcachectl: $(RRDCACHECTLOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(RRDCACHECTLOBJS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(RRDCACHECTLOBJS) $(XYMONCOMMLIBS)
+ 
+ xymon.sh: xymon.sh.DIST
+       cat $< | sed -e 's!@XYMONHOME@!$(XYMONHOME)!g' | sed -e 's!@XYMONLOGDIR@!$(XYMONLOGDIR)!g' | sed -e 's!@XYMONUSER@!$(XYMONUSER)!g' | sed -e 's!@RUNTIMEDEFS@!$(RUNTIMEDEFS)!g' >$@
 @@ -187,7 +187,9 @@ install-cfg:
        cd etcfiles; ../../build/merge-sects graphs.cfg $(INSTALLROOT)$(INSTALLETCDIR)/graphs.cfg
        cd etcfiles; ../../build/merge-lines columndoc.csv $(INSTALLROOT)$(INSTALLETCDIR)/columndoc.csv

Index: pkgsrc/net/xymon/patches/patch-ad
diff -u pkgsrc/net/xymon/patches/patch-ad:1.6 pkgsrc/net/xymon/patches/patch-ad:1.7
--- pkgsrc/net/xymon/patches/patch-ad:1.6       Thu Oct 11 18:42:19 2012
+++ pkgsrc/net/xymon/patches/patch-ad   Thu Sep 28 10:40:35 2017
@@ -1,7 +1,8 @@
-$NetBSD: patch-ad,v 1.6 2012/10/11 18:42:19 spz Exp $
+$NetBSD: patch-ad,v 1.7 2017/09/28 10:40:35 spz Exp $
 
 - netbsd has stdint.h
 - remove stray commas
+- make sure hardening flags can be inherited
 
 --- build/Makefile.NetBSD.orig 2012-08-01 08:48:15.000000000 +0000
 +++ build/Makefile.NetBSD
@@ -14,15 +15,18 @@ $NetBSD: patch-ad,v 1.6 2012/10/11 18:42
  
  # NETLIBS: None needed
  NETLIBS =
-@@ -12,16 +12,16 @@ CC= gcc
+@@ -11,17 +11,17 @@ PKGDIR?=/usr/pkg
+ CC= gcc
  GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
  ifeq ($(GCCVER),4)
-    CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
+-   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
 -       -I${PKGDIR}/include -L${PKGDIR}/lib, -Wl,--rpath=${PKGDIR}/lib
++   CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
 +       -I${PKGDIR}/include -L${PKGDIR}/lib -Wl,--rpath=${PKGDIR}/lib
  else
-    CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
+-   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
 -       -I${PKGDIR}/include -L${PKGDIR}/lib, -Wl,--rpath=${PKGDIR}/lib
++   CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
 +       -I${PKGDIR}/include -L${PKGDIR}/lib -Wl,--rpath=${PKGDIR}/lib
  endif
  RPATH = "-Wl,--rpath,"

Index: pkgsrc/net/xymon/patches/patch-ah
diff -u pkgsrc/net/xymon/patches/patch-ah:1.3 pkgsrc/net/xymon/patches/patch-ah:1.4
--- pkgsrc/net/xymon/patches/patch-ah:1.3       Thu Oct 11 18:42:19 2012
+++ pkgsrc/net/xymon/patches/patch-ah   Thu Sep 28 10:40:35 2017
@@ -1,13 +1,28 @@
-$NetBSD: patch-ah,v 1.3 2012/10/11 18:42:19 spz Exp $
+$NetBSD: patch-ah,v 1.4 2017/09/28 10:40:35 spz Exp $
 
 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     2012-07-13 16:50:38.000000000 +0000
+allow hardening
+
+--- xymonnet/Makefile.orig     2015-02-26 07:41:56.000000000 +0000
 +++ xymonnet/Makefile
-@@ -66,6 +66,8 @@ c-ares/configure: c-ares-$(ARESVER).tar.
+@@ -30,10 +30,10 @@ PINGTESTOBJS = xymonping.o
+ BEASTATOBJS = beastat.o
+ 
+ xymonnet: $(NETTESTOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB) $(XYMONLIBS)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(NETTESTOBJS) $(CARESLIBS) $(LDAPLIBS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(XYMONLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(NETTESTOBJS) $(CARESLIBS) $(LDAPLIBS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS) $(XYMONLIBS) $(PCRELIBS)
+ 
+ xymonping: $(PINGTESTOBJS) $(XYMONTIMELIB) ../lib/libxymon.a
+-      $(CC) $(CFLAGS) -o $@ $(PINGTESTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PINGTESTOBJS) $(XYMONTIMELIBS) $(XYMONCOMMLIBS)
+ 
+ xymonnet.o: xymonnet.c
+       $(CC) $(CFLAGS) $(SSLFLAGS) $(LDAPFLAGS) $(SSLINCDIR) $(LDAPINCDIR) -c -o $@ xymonnet.c
+@@ -71,23 +71,25 @@ c-ares/configure: c-ares-$(ARESVER).tar.
        mv c-ares-$(ARESVER) c-ares
        # Must touch "configure", or it will trigger a rebuild because it is older than the tar.gz file.
        touch c-ares/configure
@@ -15,9 +30,21 @@ locations
 +      touch c-ares/.libs/libcares.la
  
  beastat: $(BEASTATOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
-       $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(BEASTATOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(PCRELIBS)
-@@ -82,7 +84,7 @@ xymon-snmpcollect: xymon-snmpcollect.o $
-       $(CC) $(LDFLAGS) -o $@ xymon-snmpcollect.o `net-snmp-config --libs` ../lib/libxymon.a $(XYMONCOMMLIBS) $(XYMONTIMELIBS)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(BEASTATOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(BEASTATOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(PCRELIBS)
+ 
+ beastat.o: beastat.c
+       $(CC) $(CFLAGS) $(PCREINCDIR) -c -o $@ beastat.c
+ 
+ 
+ contest: contest.c httptest.o dns.o dns2.o httpcookies.o $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(CFLAGS) -o contest -I../include $(CARESINC) -DSTANDALONE contest.c httptest.o dns.o dns2.o httpcookies.o $(CARESLIBS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o contest -I../include $(CARESINC) -DSTANDALONE contest.c httptest.o dns.o dns2.o httpcookies.o $(CARESLIBS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS)
+ 
+ 
+ xymon-snmpcollect: xymon-snmpcollect.o $(XYMONCOMMLIB) $(XYMONTIMELIB)
+-      $(CC) $(LDFLAGS) -o $@ xymon-snmpcollect.o `net-snmp-config --libs` ../lib/libxymon.a $(XYMONCOMMLIBS) $(XYMONTIMELIBS)
++      $(CC) $(LDFLAGS) $(LDFLAGS) -o $@ xymon-snmpcollect.o `net-snmp-config --libs` ../lib/libxymon.a $(XYMONCOMMLIBS) $(XYMONTIMELIBS)
  
  xymon-snmpcollect.o: xymon-snmpcollect.c
 -      $(CC) $(CFLAGS) -I. `net-snmp-config --cflags` -c -o $@ xymon-snmpcollect.c

Index: pkgsrc/net/xymon/patches/patch-build_Makefile.FreeBSD
diff -u pkgsrc/net/xymon/patches/patch-build_Makefile.FreeBSD:1.1 pkgsrc/net/xymon/patches/patch-build_Makefile.FreeBSD:1.2
--- pkgsrc/net/xymon/patches/patch-build_Makefile.FreeBSD:1.1   Thu Oct 11 18:42:19 2012
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.FreeBSD       Thu Sep 28 10:40:35 2017
@@ -1,10 +1,11 @@
-$NetBSD: patch-build_Makefile.FreeBSD,v 1.1 2012/10/11 18:42:19 spz Exp $
+$NetBSD: patch-build_Makefile.FreeBSD,v 1.2 2017/09/28 10:40:35 spz Exp $
 
 FreeBSD has stdint.h
+make sure hardening flags can be inherited
 
---- build/Makefile.FreeBSD.orig        2011-03-08 17:20:28.000000000 +0000
+--- build/Makefile.FreeBSD.orig        2014-01-07 08:43:44.000000000 +0000
 +++ build/Makefile.FreeBSD
-@@ -1,6 +1,6 @@
+@@ -1,13 +1,13 @@
  # Xymon compile-time settings for FreeBSD systems
  
 -OSDEF = -DBSD
@@ -12,3 +13,11 @@ FreeBSD has stdint.h
  
  # NETLIBS: None needed
  NETLIBS =
+ 
+ # Compile flags for normal build
+ CC ?= cc
+-CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
++CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
+ 
+ 
+ RPATH = "-Wl,--rpath,"
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.Linux
diff -u pkgsrc/net/xymon/patches/patch-build_Makefile.Linux:1.1 pkgsrc/net/xymon/patches/patch-build_Makefile.Linux:1.2
--- pkgsrc/net/xymon/patches/patch-build_Makefile.Linux:1.1     Fri Mar 29 07:19:06 2013
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.Linux Thu Sep 28 10:40:35 2017
@@ -1,4 +1,4 @@
-$NetBSD: patch-build_Makefile.Linux,v 1.1 2013/03/29 07:19:06 sbd Exp $
+$NetBSD: patch-build_Makefile.Linux,v 1.2 2017/09/28 10:40:35 spz Exp $
 
 --- build/Makefile.Linux.orig  2012-07-23 11:29:13.000000000 +0000
 +++ build/Makefile.Linux
@@ -11,11 +11,11 @@ $NetBSD: patch-build_Makefile.Linux,v 1.
  GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
  ifeq ($(GCCVER),4)
 -   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
-+   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
++   CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
 +       -I${PKGDIR}/include -L${PKGDIR}/lib -Wl,--rpath=${PKGDIR}/lib
  else
 -   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
-+   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
++   CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
 +       -I${PKGDIR}/include -L${PKGDIR}/lib -Wl,--rpath=${PKGDIR}/lib
  endif
  

Index: pkgsrc/net/xymon/patches/patch-configure
diff -u pkgsrc/net/xymon/patches/patch-configure:1.4 pkgsrc/net/xymon/patches/patch-configure:1.5
--- pkgsrc/net/xymon/patches/patch-configure:1.4        Tue Feb 16 05:58:56 2016
+++ pkgsrc/net/xymon/patches/patch-configure    Thu Sep 28 10:40:35 2017
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.4 2016/02/16 05:58:56 spz Exp $
+$NetBSD: patch-configure,v 1.5 2017/09/28 10:40:35 spz Exp $
 
 Make sure the toplevel configure script exits on failure.
 
@@ -18,4 +18,3 @@ Make sure the toplevel configure script 
        ;;
  
    "--help")
-

Index: pkgsrc/net/xymonclient/Makefile
diff -u pkgsrc/net/xymonclient/Makefile:1.20 pkgsrc/net/xymonclient/Makefile:1.21
--- pkgsrc/net/xymonclient/Makefile:1.20        Fri Dec  9 21:08:34 2016
+++ pkgsrc/net/xymonclient/Makefile     Thu Sep 28 10:40:35 2017
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2016/12/09 21:08:34 spz Exp $
+# $NetBSD: Makefile,v 1.21 2017/09/28 10:40:35 spz Exp $
 #
 
-DISTNAME=              xymon-4.3.27
-PKGNAME=               xymonclient-4.3.27
+DISTNAME=              xymon-4.3.28
+PKGNAME=               xymonclient-4.3.28
 CATEGORIES=            net
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=xymon/}
 
@@ -123,6 +123,9 @@ MAKE_ENV+=          INSTALLROOT=${DESTDIR}
 MAKE_ENV+=             PKGBUILD=y
 MAKE_ENV+=             ${TOOLS_ENV}
 
+#MAKE_FLAGS+=          CFLAGS=${CFLAGS:Q}
+#MAKE_FLAGS+=          LDFLAGS=${LDFLAGS:Q}
+
 PLIST_VARS+=           meminfo
 .if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "FreeBSD"
 PLIST.meminfo=         yes

Index: pkgsrc/net/xymonclient/distinfo
diff -u pkgsrc/net/xymonclient/distinfo:1.15 pkgsrc/net/xymonclient/distinfo:1.16
--- pkgsrc/net/xymonclient/distinfo:1.15        Fri Dec  9 21:08:34 2016
+++ pkgsrc/net/xymonclient/distinfo     Thu Sep 28 10:40:35 2017
@@ -1,15 +1,27 @@
-$NetBSD: distinfo,v 1.15 2016/12/09 21:08:34 spz Exp $
+$NetBSD: distinfo,v 1.16 2017/09/28 10:40:35 spz Exp $
 
-SHA1 (xymon-4.3.27.tar.gz) = 76055c6b1b60f1d2f86859d1de8fec70ce59e538
-RMD160 (xymon-4.3.27.tar.gz) = 585b9e5f49444eee255db62d1510fc67f2539f96
-SHA512 (xymon-4.3.27.tar.gz) = bb48fce02e20f040675d3cf8e32596855b57c8ad1ed12c684550458cc286a6d214814ba596a670539d137e238a9e02ff9f8ffe2522571b95445db5b81b12d0f1
-Size (xymon-4.3.27.tar.gz) = 3000255 bytes
+SHA1 (xymon-4.3.28.tar.gz) = 9b134af41549e46f46f310b315f70ce42e6668a7
+RMD160 (xymon-4.3.28.tar.gz) = 7d2426a6639c52b0a1f6e3d2e5c4e4607090809d
+SHA512 (xymon-4.3.28.tar.gz) = 589230ee05028c2131d1ddf32dd1a5f302bfcdbf8276bc6ee0fb9590ae2bfe218bf49d931cfa68491160c35818d0bee93b7fcea47b85f924a4f991a5ff608477
+Size (xymon-4.3.28.tar.gz) = 3966200 bytes
 SHA1 (patch-aa) = c44f791ef6005c809127175cb563bd8f0ac74642
 SHA1 (patch-ab) = db0c5808cfad75aaf37217509399597191236180
-SHA1 (patch-ac) = e36db5081c7461eeec32a9be6e480c8d9643ea41
+SHA1 (patch-ac) = d1694c2b67e6f2ae616b2a46de1a01d3199b45f5
 SHA1 (patch-ad) = 7519eaeecab9f5d4b6956e0fd426548ec7990a0b
-SHA1 (patch-ae) = 218ef05eb3d51d779230c357d731b2f904d4559f
+SHA1 (patch-ae) = 4b5413ee14d035fb1b588207b86ebaf0ac122951
 SHA1 (patch-af) = 5e71a56cf827f9b30147dd577c295f10c150cd27
-SHA1 (patch-build_Makefile.FreeBSD) = e58b50f35068cba6fed89cc21bcc4eb7d30efd23
+SHA1 (patch-build_Makefile.AIX) = e3a06992b075507a02f77a6b04ee4425cc2f8dd1
+SHA1 (patch-build_Makefile.Darwin) = 3b86292fba80a05c03e8ace424cddfb726a974fc
+SHA1 (patch-build_Makefile.FreeBSD) = 18010c36f754f28d50a921eac59382393f90cf4d
+SHA1 (patch-build_Makefile.HP-UX) = bdd713b83f3670096bb10def6c59036d0a4aa377
+SHA1 (patch-build_Makefile.IRIX) = b0ce34295d199ffd1e9008569667abbe436a2355
+SHA1 (patch-build_Makefile.Linux) = 987251358765c00aeb5a13f78e5018a6c768be10
+SHA1 (patch-build_Makefile.OSF1) = 1a7afce4beeef249b2435c2ef14f45b2c2dbf8a2
+SHA1 (patch-build_Makefile.OSX) = a72b748600b043f458452ab37175c38087375559
+SHA1 (patch-build_Makefile.OpenBSD) = cf40c7839ba6290d349328e2e01a20bdaf274fc6
+SHA1 (patch-build_Makefile.SunOS) = 71d134a30825a2d36fbb17731e722c89c79da807
+SHA1 (patch-build_Makefile.generic) = e96d5ee29630c9133caebfa752880be90726607c
+SHA1 (patch-client_logfetch.c) = f99fa015fe597bfb37f1d288c4e5e3b99b65397d
 SHA1 (patch-client_xymonclient-netbsd.sh) = 739a201806144ef0e34c1f668ad3a4d9e2b9f9fb
+SHA1 (patch-common_Makefile) = 32b7da06cd9d22f98ee0f83bb36ed6441c066707
 SHA1 (patch-configure) = 305a74a2383dcd37ea93456272d4254483023aa5

Index: pkgsrc/net/xymonclient/patches/patch-ac
diff -u pkgsrc/net/xymonclient/patches/patch-ac:1.6 pkgsrc/net/xymonclient/patches/patch-ac:1.7
--- pkgsrc/net/xymonclient/patches/patch-ac:1.6 Thu Feb 27 20:22:41 2014
+++ pkgsrc/net/xymonclient/patches/patch-ac     Thu Sep 28 10:40:35 2017
@@ -1,6 +1,7 @@
-$NetBSD: patch-ac,v 1.6 2014/02/27 20:22:41 spz Exp $
+$NetBSD: patch-ac,v 1.7 2017/09/28 10:40:35 spz Exp $
 
 pkgsrcify
+allow hardening
 
 --- client/Makefile.orig       2014-01-07 21:43:56.000000000 +0000
 +++ client/Makefile
@@ -30,8 +31,40 @@ pkgsrcify
  all: $(PROGRAMS) $(COMMONTOOLS) xymonclient.cfg clientlaunch.cfg $(EXTRATOOLS)
  
  xymonclient.cfg: xymonclient.cfg.DIST
-@@ -62,22 +81,21 @@ netbsd-meminfo: netbsd-meminfo.c
-       $(CC) -o $@ netbsd-meminfo.c
+@@ -38,46 +57,45 @@ else
+ endif
+ 
+ logfetch: logfetch.c $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ logfetch.c $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ logfetch.c $(XYMONCLIENTLIBS)
+ 
+ clientupdate: clientupdate.c $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ clientupdate.c $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ clientupdate.c $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ orcaxymon: orcaxymon.c $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ orcaxymon.c $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ orcaxymon.c $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ msgcache: msgcache.c $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ msgcache.c $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ msgcache.c $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ hpux-meminfo: hpux-meminfo.c
+-      $(CC) -o $@ hpux-meminfo.c
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hpux-meminfo.c
+ 
+ freebsd-meminfo: freebsd-meminfo.c
+-      $(CC) -o $@ freebsd-meminfo.c
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ freebsd-meminfo.c
+ 
+ openbsd-meminfo: openbsd-meminfo.c
+-      $(CC) -o $@ openbsd-meminfo.c
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ openbsd-meminfo.c
+ 
+ netbsd-meminfo: netbsd-meminfo.c
+-      $(CC) -o $@ netbsd-meminfo.c
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ netbsd-meminfo.c
  
  install:
 -      if test ! -d $(INSTALLROOT)$(XYMONHOME)       ; then mkdir -p $(INSTALLROOT)$(XYMONHOME)       ; chmod 755 $(INSTALLROOT)$(XYMONHOME)      ; fi

Index: pkgsrc/net/xymonclient/patches/patch-ae
diff -u pkgsrc/net/xymonclient/patches/patch-ae:1.3 pkgsrc/net/xymonclient/patches/patch-ae:1.4
--- pkgsrc/net/xymonclient/patches/patch-ae:1.3 Thu Oct 11 18:42:20 2012
+++ pkgsrc/net/xymonclient/patches/patch-ae     Thu Sep 28 10:40:35 2017
@@ -1,7 +1,8 @@
-$NetBSD: patch-ae,v 1.3 2012/10/11 18:42:20 spz Exp $
+$NetBSD: patch-ae,v 1.4 2017/09/28 10:40:35 spz Exp $
 
 - netbsd has stdint.h
 - remove stray commas
+- make sure hardening flags can be inherited
 
 --- build/Makefile.NetBSD.orig 2012-08-01 08:48:15.000000000 +0000
 +++ build/Makefile.NetBSD
@@ -14,15 +15,18 @@ $NetBSD: patch-ae,v 1.3 2012/10/11 18:42
  
  # NETLIBS: None needed
  NETLIBS =
-@@ -12,16 +12,16 @@ CC= gcc
+@@ -11,17 +11,17 @@ PKGDIR?=/usr/pkg
+ CC= gcc
  GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
  ifeq ($(GCCVER),4)
-    CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
+-   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
 -       -I${PKGDIR}/include -L${PKGDIR}/lib, -Wl,--rpath=${PKGDIR}/lib
++   CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) \
 +       -I${PKGDIR}/include -L${PKGDIR}/lib -Wl,--rpath=${PKGDIR}/lib
  else
-    CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
+-   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
 -       -I${PKGDIR}/include -L${PKGDIR}/lib, -Wl,--rpath=${PKGDIR}/lib
++   CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) \
 +       -I${PKGDIR}/include -L${PKGDIR}/lib -Wl,--rpath=${PKGDIR}/lib
  endif
  RPATH = "-Wl,--rpath,"

Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.FreeBSD
diff -u pkgsrc/net/xymonclient/patches/patch-build_Makefile.FreeBSD:1.1 pkgsrc/net/xymonclient/patches/patch-build_Makefile.FreeBSD:1.2
--- pkgsrc/net/xymonclient/patches/patch-build_Makefile.FreeBSD:1.1     Thu Oct 11 18:42:20 2012
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.FreeBSD Thu Sep 28 10:40:35 2017
@@ -1,10 +1,10 @@
-$NetBSD: patch-build_Makefile.FreeBSD,v 1.1 2012/10/11 18:42:20 spz Exp $
+$NetBSD: patch-build_Makefile.FreeBSD,v 1.2 2017/09/28 10:40:35 spz Exp $
 
-FreeBSD has stdint.h
+make sure hardening flags can be inherited
 
---- build/Makefile.FreeBSD.orig        2011-03-08 17:20:28.000000000 +0000
+--- build/Makefile.FreeBSD.orig        2014-01-07 08:43:44.000000000 +0000
 +++ build/Makefile.FreeBSD
-@@ -1,6 +1,6 @@
+@@ -1,13 +1,13 @@
  # Xymon compile-time settings for FreeBSD systems
  
 -OSDEF = -DBSD
@@ -12,3 +12,11 @@ FreeBSD has stdint.h
  
  # NETLIBS: None needed
  NETLIBS =
+ 
+ # Compile flags for normal build
+ CC ?= cc
+-CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
++CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
+ 
+ 
+ RPATH = "-Wl,--rpath,"

Added files:

Index: pkgsrc/net/xymon/patches/patch-build_Makefile.AIX
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.AIX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.AIX   Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.AIX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.AIX.orig    2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.AIX
+@@ -12,7 +12,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build with IBM compiler
+ CC = cc
+-CFLAGS = -g -O3 -qstrict -qcpluscmt -D_REENTRANT $(LFSDEF) $(OSDEF)
++CFLAGS += -g -O3 -qstrict -qcpluscmt -D_REENTRANT $(LFSDEF) $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT $(LFSDEF) $(OSDEF)
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.Darwin
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.Darwin:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.Darwin        Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.Darwin,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.Darwin.orig 2012-08-01 08:48:15.000000000 +0000
++++ build/Makefile.Darwin
+@@ -10,9 +10,9 @@ NETLIBS =
+ CC = gcc
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-   CFLAGS = -g -O -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
+ else
+-   CFLAGS = -g -O -Wall -Wno-unused -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O -Wall -Wno-unused -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
+ endif
+ 
+ 
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.HP-UX
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.HP-UX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.HP-UX Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.HP-UX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.HP-UX.orig  2012-08-01 08:48:15.000000000 +0000
++++ build/Makefile.HP-UX
+@@ -19,9 +19,9 @@ CC = gcc
+ # If that happens, try adding -DBROKEN_HPUX_NETDB at the end of the CFLAGS line below. 
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-   CFLAGS = -Wno-unused -Wno-pointer-sign -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
++   CFLAGS += -Wno-unused -Wno-pointer-sign -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
+ else
+-   CFLAGS = -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
+ endif
+ 
+ 
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.IRIX
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.IRIX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.IRIX  Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.IRIX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.IRIX.orig   2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.IRIX
+@@ -8,7 +8,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O -D_REENTRANT $(OSDEF) $(LFSDEF)
++CFLAGS += -g -O -D_REENTRANT $(OSDEF) $(LFSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT $(OSDEF) $(LFSDEF)
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.OSF1
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.OSF1:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.OSF1  Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.OSF1,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.OSF1.orig   2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.OSF1
+@@ -8,7 +8,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O -D_REENTRANT $(OSDEF)
++CFLAGS += -g -O -D_REENTRANT $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.OSX
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.OSX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.OSX   Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.OSX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.OSX.orig    2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.OSX
+@@ -6,7 +6,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT -D_BSD_SOCKLEN_T_=int $(LFSDEF) $(OSDEF)
++CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT -D_BSD_SOCKLEN_T_=int $(LFSDEF) $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -Wall -D_REENTRANT $(LFSDEF) $(OSDEF)
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.OpenBSD
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.OpenBSD:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.OpenBSD       Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.OpenBSD,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.OpenBSD.orig        2012-07-31 13:50:31.000000000 +0000
++++ build/Makefile.OpenBSD
+@@ -9,9 +9,9 @@ NETLIBS =
+ CC = gcc
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-      CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
++      CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
+ else
+-      CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
++      CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
+ endif
+ #
+ # According to reports, this does not work on OpenBSD
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.SunOS
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.SunOS:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.SunOS Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.SunOS,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.SunOS.orig  2012-08-01 08:48:15.000000000 +0000
++++ build/Makefile.SunOS
+@@ -9,9 +9,9 @@ NETLIBS = -lresolv -lsocket -lnsl
+ CC = gcc
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
+ else
+-   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
+ endif
+ 
+ # This guesswork doesnt work on a lot of systems.
Index: pkgsrc/net/xymon/patches/patch-build_Makefile.generic
diff -u /dev/null pkgsrc/net/xymon/patches/patch-build_Makefile.generic:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-build_Makefile.generic       Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.generic,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.generic.orig        2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.generic
+@@ -8,7 +8,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O -D_REENTRANT $(OSDEF)
++CFLAGS += -g -O -D_REENTRANT $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT $(OSDEF)
Index: pkgsrc/net/xymon/patches/patch-common_Makefile
diff -u /dev/null pkgsrc/net/xymon/patches/patch-common_Makefile:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-common_Makefile      Thu Sep 28 10:40:35 2017
@@ -0,0 +1,59 @@
+$NetBSD: patch-common_Makefile,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+allow hardening
+
+--- common/Makefile.orig       2014-01-19 12:17:56.000000000 +0000
++++ common/Makefile
+@@ -28,40 +28,40 @@ all: $(PROGRAMS)
+ client: $(CLIENTPROGRAMS)
+ 
+ xymongrep: $(HOSTGREPOBJS) $(XYMONCOMMLIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
+ 
+ ../client/xymongrep: $(HOSTGREPOBJS) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ xymoncfg: $(HOSTSHOWOBJS) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONLIBS)
+ 
+ ../client/xymoncfg: $(HOSTSHOWOBJS) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONCLIENTLIBS)
+ 
+ xymon: $(XYMONOBJS) $(XYMONCOMMLIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(XYMONOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(XYMONOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
+ 
+ ../client/xymon: $(XYMONOBJS) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(XYMONOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(XYMONOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ xymonlaunch: $(LAUNCHOBJS) $(XYMONTIMELIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONLIBS)
+ 
+ ../client/xymonlaunch: $(LAUNCHOBJS) $(XYMONTIMELIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONCLIENTLIBS)
+ 
+ xymoncmd: $(CMDOBJS) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(CMDOBJS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(CMDOBJS) $(XYMONLIBS)
+ 
+ ../client/xymoncmd: $(CMDOBJS) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(CMDOBJS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(CMDOBJS) $(XYMONCLIENTLIBS)
+ 
+ xymondigest: $(DIGESTOBJS) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
+ 
+ ../client/xymondigest: $(DIGESTOBJS) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ 
+ xymon.exe: xymon.c ../lib/strfunc.c ../lib/errormsg.c ../lib/environ.c ../lib/stackio.c ../lib/timefunc.c ../lib/memory.c ../lib/sendmsg.c ../lib/holidays.c ../lib/rbtr.c ../lib/msort.c
Index: pkgsrc/net/xymon/patches/patch-web_Makefile
diff -u /dev/null pkgsrc/net/xymon/patches/patch-web_Makefile:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-web_Makefile Thu Sep 28 10:40:35 2017
@@ -0,0 +1,138 @@
+$NetBSD: patch-web_Makefile,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+allow hardening
+
+--- web/Makefile.orig  2015-11-01 18:17:08.000000000 +0000
++++ web/Makefile
+@@ -57,102 +57,102 @@ cgiwrap.o: cgiwrap.c
+       $(CC) $(CFLAGS) -DXYMONHOME=\"$(XYMONHOME)\" -c -o $@ $<
+ 
+ cgiwrap: $(CGIWRAPOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(CGIWRAPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(CGIWRAPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ history.cgi: $(HISTOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HISTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HISTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ eventlog.cgi: $(EVENTLOGOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(EVENTLOGOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(EVENTLOGOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ report.cgi: $(REPOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(REPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(REPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ reportlog.cgi: $(REPLOGOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(REPLOGOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(REPLOGOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ snapshot.cgi: $(SNAPOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(SNAPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SNAPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ findhost.cgi: $(FINDHOSTOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(FINDHOSTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FINDHOSTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ csvinfo.cgi: $(CSVINFOOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(CSVINFOOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(CSVINFOOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ acknowledge.cgi: $(ACKCGIOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(ACKCGIOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ACKCGIOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ xymonpage: $(WEBPAGEOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(WEBPAGEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(WEBPAGEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ datepage.cgi: $(DATEPAGEOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(DATEPAGEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DATEPAGEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ showgraph.o: showgraph.c
+       $(CC) $(CFLAGS) $(PCREINCDIR) $(RRDDEF) $(RRDINCDIR) -c -o $@ $<
+ 
+ # Need NETLIBS on Solaris for getservbyname(), called by parse_url()
+ showgraph.cgi: $(SHOWGRAPHOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(SHOWGRAPHOBJS) $(XYMONCOMMLIBS) $(PCRELIBS) $(RRDLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(SHOWGRAPHOBJS) $(XYMONCOMMLIBS) $(PCRELIBS) $(RRDLIBS)
+ 
+ svcstatus.cgi: $(SVCSTATUSOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(SVCSTATUSOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SVCSTATUSOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ enadis.cgi: $(ENADISOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(ENADISOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ENADISOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ statusreport.cgi: $(STATUSREPOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(STATUSREPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(STATUSREPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ confreport.cgi: $(CONFREPOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(CONFREPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(CONFREPOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ criticalview.cgi: $(CRITVIEWOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(CRITVIEWOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CRITVIEWOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ criticalview.o: criticalview.c
+       $(CC) $(CFLAGS) $(PCREINCDIR) -c -o $@ $<
+ 
+ criticaleditor.cgi: $(CRITEDITOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(CRITEDITOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CRITEDITOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ ackinfo.cgi: $(ACKINFOOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(ACKINFOOBJS) $(XYMONCOMMLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(ACKINFOOBJS) $(XYMONCOMMLIBS)
+ 
+ boilerplate.cgi: $(BOILERPLATEOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(BOILERPLATEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(BOILERPLATEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ hostgraphs.cgi: $(HOSTGRAPHSOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(HOSTGRAPHSOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(HOSTGRAPHSOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ ghostlist.cgi: $(GHOSTOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(GHOSTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(GHOSTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ notifications.cgi: $(NOTIFYOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(NOTIFYOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(NOTIFYOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ acknowledgements.cgi: $(ACKNOWLEDGEOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(ACKNOWLEDGEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(ACKNOWLEDGEOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ hostlist.cgi: $(HOSTLISTOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(HOSTLISTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(HOSTLISTOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ perfdata.o: perfdata.c
+       $(CC) $(CFLAGS) $(PCREINCDIR) $(RRDDEF) $(RRDINCDIR) -c -o $@ $<
+ 
+ # Need -lm on perfdata because it refers to isnan()
+ perfdata.cgi: $(PERFDATAOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(PERFDATAOBJS) $(XYMONCOMMLIBS) $(PCRELIBS) $(RRDLIBS) -lm
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(PERFDATAOBJS) $(XYMONCOMMLIBS) $(PCRELIBS) $(RRDLIBS) -lm
+ 
+ useradm.cgi: $(USERADMOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(USERADMOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(USERADMOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ chpasswd.cgi: $(CHPASSWDOBJS) $(XYMONCOMMLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(CHPASSWDOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(CHPASSWDOBJS) $(XYMONCOMMLIBS) $(PCRELIBS)
+ 
+ appfeed.cgi: $(APPFEEDOBJS) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(RPATHOPT) $(APPFEEDOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS) $(PCRELIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RPATHOPT) $(APPFEEDOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS) $(PCRELIBS)
+ 
+ 
+ %.o: %.c
Index: pkgsrc/net/xymon/patches/patch-xymonproxy_Makefile
diff -u /dev/null pkgsrc/net/xymon/patches/patch-xymonproxy_Makefile:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymon/patches/patch-xymonproxy_Makefile  Thu Sep 28 10:40:35 2017
@@ -0,0 +1,19 @@
+$NetBSD: patch-xymonproxy_Makefile,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+allow hardening
+
+--- xymonproxy/Makefile.orig   2012-11-14 11:29:54.000000000 +0000
++++ xymonproxy/Makefile
+@@ -15,10 +15,10 @@ MSGCGIOBJS = xymoncgimsg.o
+ all: $(PROGRAMS)
+ 
+ xymonproxy: $(PROXYOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(PROXYOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PROXYOBJS) $(XYMONCOMMLIBS) $(XYMONTIMELIBS) $(XYMONLIBS)
+ 
+ xymoncgimsg.cgi: $(MSGCGIOBJS) $(XYMONCOMMLIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(MSGCGIOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS) 
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(MSGCGIOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS) 
+ 
+ ################################################
+ # Default compilation rules

Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.AIX
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.AIX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.AIX     Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.AIX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.AIX.orig    2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.AIX
+@@ -12,7 +12,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build with IBM compiler
+ CC = cc
+-CFLAGS = -g -O3 -qstrict -qcpluscmt -D_REENTRANT $(LFSDEF) $(OSDEF)
++CFLAGS += -g -O3 -qstrict -qcpluscmt -D_REENTRANT $(LFSDEF) $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT $(LFSDEF) $(OSDEF)
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.Darwin
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.Darwin:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.Darwin  Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.Darwin,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.Darwin.orig 2012-08-01 08:48:15.000000000 +0000
++++ build/Makefile.Darwin
+@@ -10,9 +10,9 @@ NETLIBS =
+ CC = gcc
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-   CFLAGS = -g -O -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
+ else
+-   CFLAGS = -g -O -Wall -Wno-unused -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O -Wall -Wno-unused -D_REENTRANT -DBIND_8_COMPAT=1 $(LFSDEF) $(OSDEF)
+ endif
+ 
+ 
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.HP-UX
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.HP-UX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.HP-UX   Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.HP-UX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.HP-UX.orig  2012-08-01 08:48:15.000000000 +0000
++++ build/Makefile.HP-UX
+@@ -19,9 +19,9 @@ CC = gcc
+ # If that happens, try adding -DBROKEN_HPUX_NETDB at the end of the CFLAGS line below. 
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-   CFLAGS = -Wno-unused -Wno-pointer-sign -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
++   CFLAGS += -Wno-unused -Wno-pointer-sign -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
+ else
+-   CFLAGS = -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
+ endif
+ 
+ 
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.IRIX
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.IRIX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.IRIX    Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.IRIX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.IRIX.orig   2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.IRIX
+@@ -8,7 +8,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O -D_REENTRANT $(OSDEF) $(LFSDEF)
++CFLAGS += -g -O -D_REENTRANT $(OSDEF) $(LFSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT $(OSDEF) $(LFSDEF)
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.Linux
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.Linux:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.Linux   Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.Linux,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.Linux.orig  2013-04-21 10:53:38.000000000 +0000
++++ build/Makefile.Linux
+@@ -9,9 +9,9 @@ NETLIBS =
+ CC = gcc
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
+ else
+-   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
+ endif
+ 
+ ifndef PKGBUILD
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSF1
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSF1:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSF1    Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.OSF1,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.OSF1.orig   2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.OSF1
+@@ -8,7 +8,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O -D_REENTRANT $(OSDEF)
++CFLAGS += -g -O -D_REENTRANT $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSX
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSX:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.OSX     Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.OSX,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.OSX.orig    2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.OSX
+@@ -6,7 +6,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT -D_BSD_SOCKLEN_T_=int $(LFSDEF) $(OSDEF)
++CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT -D_BSD_SOCKLEN_T_=int $(LFSDEF) $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -Wall -D_REENTRANT $(LFSDEF) $(OSDEF)
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.OpenBSD
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.OpenBSD:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.OpenBSD Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.OpenBSD,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.OpenBSD.orig        2012-07-31 13:50:31.000000000 +0000
++++ build/Makefile.OpenBSD
+@@ -9,9 +9,9 @@ NETLIBS =
+ CC = gcc
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-      CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
++      CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
+ else
+-      CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
++      CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT -I/usr/local/include -L/usr/local/lib $(LFSDEF) $(OSDEF)
+ endif
+ #
+ # According to reports, this does not work on OpenBSD
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.SunOS
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.SunOS:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.SunOS   Thu Sep 28 10:40:35 2017
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_Makefile.SunOS,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.SunOS.orig  2012-08-01 08:48:15.000000000 +0000
++++ build/Makefile.SunOS
+@@ -9,9 +9,9 @@ NETLIBS = -lresolv -lsocket -lnsl
+ CC = gcc
+ GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
+ ifeq ($(GCCVER),4)
+-   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
+ else
+-   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
++   CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
+ endif
+ 
+ # This guesswork doesnt work on a lot of systems.
Index: pkgsrc/net/xymonclient/patches/patch-build_Makefile.generic
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-build_Makefile.generic:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-build_Makefile.generic Thu Sep 28 10:40:35 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_Makefile.generic,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure hardening flags can be inherited
+
+--- build/Makefile.generic.orig        2011-03-08 17:20:28.000000000 +0000
++++ build/Makefile.generic
+@@ -8,7 +8,7 @@ NETLIBS =
+ 
+ # Compile flags for normal build
+ CC = cc
+-CFLAGS = -g -O -D_REENTRANT $(OSDEF)
++CFLAGS += -g -O -D_REENTRANT $(OSDEF)
+ 
+ # Compile flags for debugging
+ # CFLAGS = -g -DDEBUG -D_REENTRANT $(OSDEF)
Index: pkgsrc/net/xymonclient/patches/patch-client_logfetch.c
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-client_logfetch.c:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-client_logfetch.c      Thu Sep 28 10:40:35 2017
@@ -0,0 +1,16 @@
+$NetBSD: patch-client_logfetch.c,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+make sure intmax_t is defined
+
+--- client/logfetch.c.orig     2016-11-05 19:02:06.000000000 +0000
++++ client/logfetch.c
+@@ -21,6 +21,9 @@ static char rcsid[] = "$Id: logfetch.c 7
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#ifdef HAVE_STDINT_H
++#include <stdint.h>
++#endif
+ #include <time.h>
+ #include <limits.h>
+ #include <errno.h>
Index: pkgsrc/net/xymonclient/patches/patch-common_Makefile
diff -u /dev/null pkgsrc/net/xymonclient/patches/patch-common_Makefile:1.1
--- /dev/null   Thu Sep 28 10:40:35 2017
+++ pkgsrc/net/xymonclient/patches/patch-common_Makefile        Thu Sep 28 10:40:35 2017
@@ -0,0 +1,59 @@
+$NetBSD: patch-common_Makefile,v 1.1 2017/09/28 10:40:35 spz Exp $
+
+allow hardening
+
+--- common/Makefile.orig       2014-01-19 12:17:56.000000000 +0000
++++ common/Makefile
+@@ -28,40 +28,40 @@ all: $(PROGRAMS)
+ client: $(CLIENTPROGRAMS)
+ 
+ xymongrep: $(HOSTGREPOBJS) $(XYMONCOMMLIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
+ 
+ ../client/xymongrep: $(HOSTGREPOBJS) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTGREPOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ xymoncfg: $(HOSTSHOWOBJS) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONLIBS)
+ 
+ ../client/xymoncfg: $(HOSTSHOWOBJS) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(HOSTSHOWOBJS) $(XYMONCLIENTLIBS)
+ 
+ xymon: $(XYMONOBJS) $(XYMONCOMMLIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(XYMONOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(XYMONOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
+ 
+ ../client/xymon: $(XYMONOBJS) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(XYMONOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(XYMONOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ xymonlaunch: $(LAUNCHOBJS) $(XYMONTIMELIB) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONLIBS)
+ 
+ ../client/xymonlaunch: $(LAUNCHOBJS) $(XYMONTIMELIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LAUNCHOBJS) $(XYMONTIMELIBS) $(XYMONCLIENTLIBS)
+ 
+ xymoncmd: $(CMDOBJS) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(CMDOBJS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(CMDOBJS) $(XYMONLIBS)
+ 
+ ../client/xymoncmd: $(CMDOBJS) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(CMDOBJS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(CMDOBJS) $(XYMONCLIENTLIBS)
+ 
+ xymondigest: $(DIGESTOBJS) $(XYMONLIB)
+-      $(CC) $(CFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCOMMLIBS) $(XYMONLIBS)
+ 
+ ../client/xymondigest: $(DIGESTOBJS) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB)
+-      $(CC) $(CFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DIGESTOBJS) $(XYMONCLIENTCOMMLIBS) $(XYMONCLIENTLIBS)
+ 
+ 
+ xymon.exe: xymon.c ../lib/strfunc.c ../lib/errormsg.c ../lib/environ.c ../lib/stackio.c ../lib/timefunc.c ../lib/memory.c ../lib/sendmsg.c ../lib/holidays.c ../lib/rbtr.c ../lib/msort.c



Home | Main Index | Thread Index | Old Index