diff -ruN --exclude=CVS /usr/ports/net/beacon.orig/Makefile /usr/ports/net/beacon/Makefile --- /usr/ports/net/beacon.orig/Makefile Wed Sep 29 14:46:26 2004 +++ /usr/ports/net/beacon/Makefile Mon Oct 25 11:17:43 2004 @@ -6,9 +6,10 @@ # PORTNAME= beacon -PORTVERSION= 0.9.55 +PORTVERSION= 1.1 CATEGORIES= net perl5 mbone ipv6 MASTER_SITES= http://dast.nlanr.net/Projects/Beacon/releases/ +DISTNAME= ${PORTNAME}-${PORTVERSION}-0 MAINTAINER= janos.mohacsi@bsd.hu COMMENT= Beacon active measurement tool to monitor multicast @@ -16,14 +17,19 @@ BUILD_DEPENDS= ${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net RUN_DEPENDS= ${BUILD_DEPENDS} -BROKEN= Unfetchable - WWW_DIR?= ${PREFIX}/www/ PLIST_SUB+= VERSION=${PORTVERSION} USE_PERL5= yes USE_AUTOCONF_VER= 259 -CONFIGURE_ARGS= --enable-ipv6 --bindir=${WWW_DIR}/${PORTNAME}-${PORTVERSION} +CONFIGURE_ARGS= --bindir=${WWW_DIR}/${PORTNAME}-${PORTVERSION} CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} + +.ifdef(WITH_IPV6) +#enable IPv6 name lookup, and sending IPv6 multicast +BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Socket6.pm:${PORTSDIR}/net/p5-Socket6 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_beacon.in +CONFUGURE_ARGS+= --enable-ipv6 +.endif .include diff -ruN --exclude=CVS /usr/ports/net/beacon.orig/distinfo /usr/ports/net/beacon/distinfo --- /usr/ports/net/beacon.orig/distinfo Sun Jul 11 22:06:33 2004 +++ /usr/ports/net/beacon/distinfo Mon Oct 25 10:33:30 2004 @@ -1,2 +1,2 @@ -MD5 (beacon-0.9.55.tar.gz) = edc9876c2ca094e12a773e9bef930a86 -SIZE (beacon-0.9.55.tar.gz) = 240630 +MD5 (beacon-1.1-0.tar.gz) = 93c7c9278b1b37a1bb6b9f4bd0af9d9d +SIZE (beacon-1.1-0.tar.gz) = 247815 diff -ruN --exclude=CVS /usr/ports/net/beacon.orig/files/extra-patch-src_beacon.in /usr/ports/net/beacon/files/extra-patch-src_beacon.in --- /usr/ports/net/beacon.orig/files/extra-patch-src_beacon.in Thu Jan 1 01:00:00 1970 +++ /usr/ports/net/beacon/files/extra-patch-src_beacon.in Mon Oct 25 11:15:53 2004 @@ -0,0 +1,95 @@ + +$FreeBSD$ + +--- src/beacon.in.orig ++++ src/beacon.in +@@ -34,6 +34,7 @@ + use Net::Multicast::Beacon; # Make rtp.c RTP calls available in Perl + use Getopt::Long; # Allow both -g -p and --group --port cmd lines + use IO::Socket; # For reverse IP lookups to get hostname ++use Socket6; # For reverse IPv6 lookup + use IO::Select; + use Net::Domain; # For getting the FQDN of the current host + use Sys::Hostname; # Other way of getting the name of the current host +@@ -3387,21 +3388,41 @@ + $thishost = $host; + $thisuser = $user; + +-my $packed = gethostbyname($host); +-if (! defined $packed) { # Couldn't get it - Mark it bad +- $thisip = "UNKN"; +-} else { # Unpack it into a string var +- $thisip = inet_ntoa($packed); # "141.142.2.168" +-} ++#if group address an IPv6 address, we have to find IPv6 addresses + +-# Do the best job we can do for getting FQDN for the hostname +-my $lookup = gethostbyaddr(inet_aton($thisip), AF_INET); +-if (defined $lookup) { # Only update if it worked +- $thishost = $host = $lookup; ++if ($GROUP =~ ":" ) { ++ my @res=getaddrinfo($host,'daytime',AF_INET6); ++ my($packed,$port) = getnameinfo($res[3],NI_NUMERICHOST); ++ my($packed2,$port2) = getnameinfo($res[3]); ++ ++ if( !defined $packed) { ++ $thisip = "UNKN"; ++ } else { ++ $thisip = $packed; ++ } ++ if (!defined $packed2) { ++ $thishost = $host = $packed2; ++ } else { ++ $thishost = $thisip; ++ } + } else { +- $thishost = $thisip; ++ my $packed = gethostbyname($host); ++ if (! defined $packed) { # Couldn't get i t - Mark it bad ++ $thisip = "UNKN"; ++ } else { # Unpack it into a string var ++ $thisip = inet_ntoa($packed); # "141.142.2.168" ++ } ++ ++ # Do the best job we can do for getting FQDN for the hostname ++ my $lookup = gethostbyaddr(inet_aton($thisip), AF_INET); ++ if (defined $lookup) { # Only update if it worked ++ $thishost = $host = $lookup; ++ } else { ++ $thishost = $thisip; ++ } + } + ++ + # If host still "UNKN" at this point, things are too confused to continue + if ($thishost eq "UNKN") { + die "Unable to resolve hostname -- Please check your system +@@ -3642,11 +3663,23 @@ + + # Get the IP address of the hostname given in $h + my $hostip; +- my $packed = gethostbyname($h); +- if (! defined $packed) { # Couldn't get it - Mark it bad +- $hostip = "UNKN"; +- } else { # Unpack it into a string var +- $hostip = inet_ntoa($packed); ++ if ( $GROUP =~ ":" ) { ++ my @res = getaddrinfo($h,'daytime', AF_INET6); ++ my ($packed,$port) = getnameinfo($res[3],NI_NUMERICHOST); ++ my ($packed2,$port2) = getnameinfo($res[3]); ++ if(defined $packed) { ++ $hostip = $packed; ++ } ++ if(defined $packed2) { ++ $hostip = $packed2; ++ } ++ } else { ++ my $packed = gethostbyname($h); ++ if (! defined $packed) { # Couldn't get it - Mark it bad ++ $hostip = "UNKN"; ++ } else { # Unpack it into a string var ++ $hostip = inet_ntoa($packed); ++ } + } + + # Create a sortname using hostname and SSRC