From d7f68188e4e0218eae20011a901b28149f6394df Mon Sep 17 00:00:00 2001 From: sthen Date: Tue, 7 May 2013 20:17:43 +0000 Subject: [PATCH] minor tweaks (no package change): use ${SUBST_CMD} instead of perl -pi -e, and strip DOS line-endings to make for more-easily-emailable patches --- net/nagios/nsca/Makefile | 8 +++++--- net/nagios/nsca/patches/patch-src_nsca_c | 4 ++-- net/nagios/nsca/patches/patch-src_send_nsca_c | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/net/nagios/nsca/Makefile b/net/nagios/nsca/Makefile index a76594af77d..50187ac4705 100644 --- a/net/nagios/nsca/Makefile +++ b/net/nagios/nsca/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2013/05/07 20:14:45 rpe Exp $ +# $OpenBSD: Makefile,v 1.16 2013/05/07 20:17:43 sthen Exp $ COMMENT-main= nagios service check acceptor COMMENT-client= nagios service check acceptor - client @@ -31,9 +31,11 @@ TEST_DEPENDS= devel/p5-Clone \ devel/p5-Parallel-Forker RUN_DEPENDS-main= net/nagios/nagios +post-extract: + @cd ${WRKSRC} && perl -i -pe 's/\r$$//' src/nsca.c src/send_nsca.c + pre-build: - @perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/src/nsca.c \ - ${WRKSRC}/src/send_nsca.c + @${SUBST_CMD} ${WRKSRC}/src/nsca.c ${WRKSRC}/src/send_nsca.c do-test: @cd ${WRKSRC}/nsca_tests && ./runtests diff --git a/net/nagios/nsca/patches/patch-src_nsca_c b/net/nagios/nsca/patches/patch-src_nsca_c index beb1ebd9904..213d91c7799 100644 --- a/net/nagios/nsca/patches/patch-src_nsca_c +++ b/net/nagios/nsca/patches/patch-src_nsca_c @@ -1,4 +1,4 @@ -$OpenBSD: patch-src_nsca_c,v 1.5 2013/05/07 20:14:45 rpe Exp $ +$OpenBSD: patch-src_nsca_c,v 1.6 2013/05/07 20:17:43 sthen Exp $ --- src/nsca.c.orig Sat May 4 17:40:24 2013 +++ src/nsca.c Sat May 4 17:40:41 2013 @@ -28,7 +28,7 @@ static char server_address[16]="0.0.0.0"; @@ -6,7 +6,7 @@ $OpenBSD: patch-src_nsca_c,v 1.5 2013/05/07 20:14:45 rpe Exp $ static int log_facility=LOG_DAEMON; -static char config_file[MAX_INPUT_BUFFER]="nsca.cfg"; -+static char config_file[MAX_INPUT_BUFFER]="%%SYSCONFDIR%%/nsca.cfg"; ++static char config_file[MAX_INPUT_BUFFER]="${SYSCONFDIR}/nsca.cfg"; static char alternate_dump_file[MAX_INPUT_BUFFER]="/dev/null"; static char command_file[MAX_INPUT_BUFFER]=""; static char password[MAX_INPUT_BUFFER]=""; diff --git a/net/nagios/nsca/patches/patch-src_send_nsca_c b/net/nagios/nsca/patches/patch-src_send_nsca_c index bf44cb31dfa..b1e0d71c244 100644 --- a/net/nagios/nsca/patches/patch-src_send_nsca_c +++ b/net/nagios/nsca/patches/patch-src_send_nsca_c @@ -1,4 +1,4 @@ -$OpenBSD: patch-src_send_nsca_c,v 1.3 2013/05/07 20:14:45 rpe Exp $ +$OpenBSD: patch-src_send_nsca_c,v 1.4 2013/05/07 20:17:43 sthen Exp $ --- src/send_nsca.c.orig Sat May 4 17:20:12 2013 +++ src/send_nsca.c Sat May 4 17:20:43 2013 @@ -25,7 +25,7 @@ time_t start_time,end_time; @@ -6,7 +6,7 @@ $OpenBSD: patch-src_send_nsca_c,v 1.3 2013/05/07 20:14:45 rpe Exp $ char server_name[MAX_HOST_ADDRESS_LENGTH]; char password[MAX_INPUT_BUFFER]=""; -char config_file[MAX_INPUT_BUFFER]="send_nsca.cfg"; -+char config_file[MAX_INPUT_BUFFER]="%%SYSCONFDIR%%/send_nsca.cfg"; ++char config_file[MAX_INPUT_BUFFER]="${SYSCONFDIR}/send_nsca.cfg"; char delimiter[2]="\t"; char block_delimiter[2]=BLOCK_DELIMITER;