From 2a2908c3f641b1c938be5ee9374abf8f965372d2 Mon Sep 17 00:00:00 2001 From: he Date: Mon, 6 Oct 2014 10:04:17 +0000 Subject: Rename the old patch-aa patch to patch-dbeacon.cpp. Add a patch for the matrix.pl script to quiet newer perl versions. Fix the pointer to the sixxs flags, as asked for in 2010(!) Bump PKGREVISION. --- mbone/dbeacon/Makefile | 5 ++- mbone/dbeacon/distinfo | 5 ++- mbone/dbeacon/patches/patch-aa | 35 --------------- mbone/dbeacon/patches/patch-contrib_matrix.pl | 65 +++++++++++++++++++++++++++ mbone/dbeacon/patches/patch-dbeacon.cpp | 37 +++++++++++++++ 5 files changed, 108 insertions(+), 39 deletions(-) delete mode 100644 mbone/dbeacon/patches/patch-aa create mode 100644 mbone/dbeacon/patches/patch-contrib_matrix.pl create mode 100644 mbone/dbeacon/patches/patch-dbeacon.cpp (limited to 'mbone') diff --git a/mbone/dbeacon/Makefile b/mbone/dbeacon/Makefile index 4c10bee4f58..94fe8741a29 100644 --- a/mbone/dbeacon/Makefile +++ b/mbone/dbeacon/Makefile @@ -1,14 +1,15 @@ -# $NetBSD: Makefile,v 1.3 2012/10/08 09:25:49 asau Exp $ +# $NetBSD: Makefile,v 1.4 2014/10/06 10:04:17 he Exp $ # DISTNAME= dbeacon-0.3.9.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mbone MASTER_SITES= http://fivebits.net/files/dbeacon/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://fivebits.net/proj/dbeacon/ COMMENT= Distributed IPv4/IPv6 multicast beacon +LICENSE= gnu-gpl-v2 USE_LANGUAGES= c c++ USE_TOOLS+= gmake diff --git a/mbone/dbeacon/distinfo b/mbone/dbeacon/distinfo index 6cf056f2349..09c4df0929d 100644 --- a/mbone/dbeacon/distinfo +++ b/mbone/dbeacon/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.2 2008/08/26 17:18:14 seb Exp $ +$NetBSD: distinfo,v 1.3 2014/10/06 10:04:17 he Exp $ SHA1 (dbeacon-0.3.9.1.tar.gz) = d6131e723a251c01d245fcb3ead864f1348e2565 RMD160 (dbeacon-0.3.9.1.tar.gz) = 81ec4cfe1c2890c7cdb5afbbd98fd2d0cf2a57a3 Size (dbeacon-0.3.9.1.tar.gz) = 43893 bytes -SHA1 (patch-aa) = a05a777dfcf7543eab85901c63ce85d927e03853 +SHA1 (patch-contrib_matrix.pl) = 74fe26b6794470a254a95cf42483340d31837506 +SHA1 (patch-dbeacon.cpp) = 4e39bf5b4662ff7c0fae95a987e653c337bc33c2 diff --git a/mbone/dbeacon/patches/patch-aa b/mbone/dbeacon/patches/patch-aa deleted file mode 100644 index ab5b7bfcbe4..00000000000 --- a/mbone/dbeacon/patches/patch-aa +++ /dev/null @@ -1,35 +0,0 @@ -$NetBSD: patch-aa,v 1.1 2008/08/26 17:18:14 seb Exp $ - ---- dbeacon.cpp.orig 2007-07-13 13:52:14.000000000 +0000 -+++ dbeacon.cpp -@@ -176,7 +176,7 @@ bool daemonize = false; - bool use_syslog = false; - bool past_init = false; - --const char *pidfile = NULL; -+static string pidfile; - - static void next_event(timeval *); - static void insert_event(uint32_t, uint32_t); -@@ -464,8 +464,8 @@ int main(int argc, char **argv) { - perror("Failed to daemon()ize."); - return -1; - } -- if (pidfile) { -- FILE *f = fopen(pidfile, "w"); -+ if (!pidfile.empty()) { -+ FILE *f = fopen(pidfile.c_str(), "w"); - if (f) { - fprintf(f, "%u\n", getpid()); - fclose(f); -@@ -1657,8 +1657,8 @@ void dumpBigBwStats(int) { - - void sendLeaveReport(int) { - send_report(LEAVE_REPORT); -- if (daemonize && pidfile) -- unlink(pidfile); -+ if (daemonize && !pidfile.empty()) -+ unlink(pidfile.c_str()); - exit(0); - } - diff --git a/mbone/dbeacon/patches/patch-contrib_matrix.pl b/mbone/dbeacon/patches/patch-contrib_matrix.pl new file mode 100644 index 00000000000..fe7323134a0 --- /dev/null +++ b/mbone/dbeacon/patches/patch-contrib_matrix.pl @@ -0,0 +1,65 @@ +$NetBSD: patch-contrib_matrix.pl,v 1.1 2014/10/06 10:04:17 he Exp $ + +Fix syntax errors flagged by newer perl. +Fix flag pointer, ref. +https://lists.ubuntu.com/archives/ubuntu-motu/2010-January/006495.html + +--- contrib/matrix.pl.orig 2013-07-05 19:12:49.000000000 +0200 ++++ contrib/matrix.pl 2014-10-06 11:46:41.000000000 +0200 +@@ -29,7 +29,7 @@ + our $css_file; + our $dump_update_delay = 5; # time between each normal dumps + # (used to detect outdated dump files) +-our $flag_url_format = 'http://www.sixxs.net/gfx/countries/%s.gif'; ++our $flag_url_format = 'http://www.sixxs.net/s/countries/%s.gif'; + our $default_ssm_group = 'ff3e::beac/10000'; + our $debug = 0; + our $matrix_link_title = 0; +@@ -423,7 +423,7 @@ + $adj{$current_beacon}[RX_LOCAL] = $atts{'rxlocal'} if defined $atts{'rxlocal'}; + } + } elsif ($tag eq 'asm' or $tag eq 'ssm') { +- foreach my $att qw(ttl loss delay jitter) { ++ foreach my $att (qw(ttl loss delay jitter)) { + if (defined $atts{$att}) { + my $index = $tag eq 'ssm' ? 2 : 1; + +@@ -884,7 +884,10 @@ + } + } elsif ($a eq $b) { + printx ' '; +- } elsif ($full_matrix and $adj{$a}[RX_LOCAL] ne 'true') { ++ } elsif ($full_matrix and ++ defined($adj{$a}[RX_LOCAL]) and ++ $adj{$a}[RX_LOCAL] ne 'true') ++ { + printx 'N/R'; + } else { + printx 'XX'; +@@ -1171,7 +1174,7 @@ + update_ttl_hist(build_history_file_path($dst_h, $src_h) . "/$tag-ttl-hist", + $adj{$dst}[NEIGH]{$src}[$index]{'ttl'}) if defined $adj{$dst}[NEIGH]{$src}[$index]{'ttl'}; + +- foreach my $type qw(ttl loss delay jitter) { ++ foreach my $type (qw(ttl loss delay jitter)) { + $values{$type} = $adj{$dst}[NEIGH]{$src}[$index]{$type}; + $good++ if defined $values{$type}; + } +@@ -1263,7 +1266,7 @@ + # Update rrd with new values + + my $updatestring = 'N'; +- foreach my $valuetype qw(ttl loss delay jitter) { ++ foreach my $valuetype (qw(ttl loss delay jitter)) { + # Store it in s and not ms + $values{$valuetype} = $values{$valuetype} / 1000. if $valuetype eq 'delay' or $valuetype eq 'jitter'; + $updatestring .= ':' . $values{$valuetype}; +@@ -1644,7 +1647,7 @@ + + my $count = 0; + +- foreach my $type qw(ttl loss delay jitter) { ++ foreach my $type (qw(ttl loss delay jitter)) { + printx '' if ($count % 2) == 0; + printx ''; + graphthumb($type); diff --git a/mbone/dbeacon/patches/patch-dbeacon.cpp b/mbone/dbeacon/patches/patch-dbeacon.cpp new file mode 100644 index 00000000000..d4acdba6d34 --- /dev/null +++ b/mbone/dbeacon/patches/patch-dbeacon.cpp @@ -0,0 +1,37 @@ +$NetBSD: patch-dbeacon.cpp,v 1.1 2014/10/06 10:04:17 he Exp $ + +Fix pidfile option handling (in configuration file case). + +--- dbeacon.cpp.orig 2007-07-13 13:52:14.000000000 +0000 ++++ dbeacon.cpp +@@ -176,7 +176,7 @@ bool daemonize = false; + bool use_syslog = false; + bool past_init = false; + +-const char *pidfile = NULL; ++static string pidfile; + + static void next_event(timeval *); + static void insert_event(uint32_t, uint32_t); +@@ -464,8 +464,8 @@ int main(int argc, char **argv) { + perror("Failed to daemon()ize."); + return -1; + } +- if (pidfile) { +- FILE *f = fopen(pidfile, "w"); ++ if (!pidfile.empty()) { ++ FILE *f = fopen(pidfile.c_str(), "w"); + if (f) { + fprintf(f, "%u\n", getpid()); + fclose(f); +@@ -1657,8 +1657,8 @@ void dumpBigBwStats(int) { + + void sendLeaveReport(int) { + send_report(LEAVE_REPORT); +- if (daemonize && pidfile) +- unlink(pidfile); ++ if (daemonize && !pidfile.empty()) ++ unlink(pidfile.c_str()); + exit(0); + } + -- cgit v1.2.3