pkgsrc/net/xymon/patches/patch-ah
spz 544cf480ee 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.
2017-09-28 10:40:35 +00:00

54 lines
2.7 KiB
Text

$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
allow hardening
--- xymonnet/Makefile.orig 2015-02-26 07:41:56.000000000 +0000
+++ xymonnet/Makefile
@@ -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
+ mkdir c-ares/.libs
+ touch c-ares/.libs/libcares.la
beastat: $(BEASTATOBJS) $(XYMONCOMMLIB) $(XYMONTIMELIB)
- $(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
+ $(CC) $(CFLAGS) -I. `${SNMPCONFIG} --cflags` -c -o $@ xymon-snmpcollect.c
################################################
# Default compilation rules