View | Details | Raw Unified | Return to bug 169949 | Differences between
and this patch

Collapse All | Expand All

(-)head/net/fping/pkg-descr (-1 / +1 lines)
Lines 13-16 Link Here
13
     Unlike ping, fping is meant to be used in scripts and its
13
     Unlike ping, fping is meant to be used in scripts and its
14
     output is easy to parse.
14
     output is easy to parse.
15
15
16
WWW: http://www.fping.com/
16
WWW: http://www.fping.org/
(-)head/net/fping/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (fping-2.4b2_to-ipv6.tar.gz) = 77e1a90af4fff4a5ffc4b70542c6ff44130558357e7d549f99a9eff23108d172
1
SHA256 (fping-3.2.tar.gz) = b26739a1fa3471775ff1958a1e3d7597f12c9eb56429c29cf956e52f5046e2c1
2
SIZE (fping-2.4b2_to-ipv6.tar.gz) = 63333
2
SIZE (fping-3.2.tar.gz) = 137967
(-)head/net/fping/files/patch-03 (-32 lines)
Lines 1-32 Link Here
1
--- fping.8.orig	Mon Jan 21 01:05:48 2002
2
+++ fping.8	Sun Jul  7 22:03:43 2002
3
@@ -1,4 +1,4 @@
4
-.TH fping l
5
+.TH fping 8
6
 .SH NAME
7
 fping \- send ICMP ECHO_REQUEST packets to network hosts
8
 .SH SYNOPSIS
9
@@ -152,12 +152,12 @@
10
 example none the less. 
11
 .nf
12
 
13
-#!/usr/local/bin/perl
14
+#!/usr/bin/perl
15
 require 'open2.pl';
16
 
17
 $MAILTO = "root";
18
 
19
-$pid = &open2("OUTPUT","INPUT","/usr/local/bin/fping -u");
20
+$pid = &open2("OUTPUT","INPUT","/usr/local/sbin/fping -u");
21
 
22
 @check=("slapshot","foo","foobar");
23
 
24
@@ -178,7 +178,7 @@
25
 that are currently reachable.
26
 .nf
27
 
28
-#!/usr/local/bin/perl
29
+#!/usr/bin/perl
30
 
31
 $hosts_to_backup = `cat /etc/hosts.backup | fping -a`;
32
 
(-)head/net/fping/files/patch-src_Makefile.in (+96 lines)
Line 0 Link Here
1
--- src/Makefile.in.orig	2012-07-18 21:51:51.000000000 +0200
2
+++ src/Makefile.in	2012-07-18 21:51:10.000000000 +0200
3
@@ -35,7 +35,9 @@
4
 build_triplet = @build@
5
 host_triplet = @host@
6
 target_triplet = @target@
7
-sbin_PROGRAMS = fping$(EXEEXT)
8
+@IPV4_TRUE@am__append_1 = fping
9
+@IPV6_TRUE@am__append_2 = fping6
10
+sbin_PROGRAMS = $(am__EXEEXT_3)
11
 subdir = src
12
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
13
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
14
@@ -46,11 +48,19 @@
15
 CONFIG_HEADER = $(top_builddir)/config.h
16
 CONFIG_CLEAN_FILES =
17
 CONFIG_CLEAN_VPATH_FILES =
18
+@IPV4_TRUE@am__EXEEXT_1 = fping$(EXEEXT)
19
+@IPV6_TRUE@am__EXEEXT_2 = fping6$(EXEEXT)
20
+am__EXEEXT_3 = $(am__EXEEXT_1) $(am__EXEEXT_2)
21
 am__installdirs = "$(DESTDIR)$(sbindir)"
22
 PROGRAMS = $(sbin_PROGRAMS)
23
 am_fping_OBJECTS = fping.$(OBJEXT)
24
 fping_OBJECTS = $(am_fping_OBJECTS)
25
 fping_LDADD = $(LDADD)
26
+am_fping6_OBJECTS = fping6-fping.$(OBJEXT)
27
+fping6_OBJECTS = $(am_fping6_OBJECTS)
28
+fping6_LDADD = $(LDADD)
29
+fping6_LINK = $(CCLD) $(fping6_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
30
+	$(LDFLAGS) -o $@
31
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
32
 depcomp = $(SHELL) $(top_srcdir)/depcomp
33
 am__depfiles_maybe = depfiles
34
@@ -59,8 +69,8 @@
35
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
36
 CCLD = $(CC)
37
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
38
-SOURCES = $(fping_SOURCES)
39
-DIST_SOURCES = $(fping_SOURCES)
40
+SOURCES = $(fping_SOURCES) $(fping6_SOURCES)
41
+DIST_SOURCES = $(fping_SOURCES) $(fping6_SOURCES)
42
 ETAGS = etags
43
 CTAGS = ctags
44
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
45
@@ -163,8 +173,12 @@
46
 top_build_prefix = @top_build_prefix@
47
 top_builddir = @top_builddir@
48
 top_srcdir = @top_srcdir@
49
+prog = $(am__append_1) $(am__append_2)
50
 fping_SOURCES = fping.c options.h
51
 fping_DEPENDENCIES = ../config.h
52
+fping6_SOURCES = fping.c options.h
53
+fping6_DEPENDENCIES = ../config.h
54
+fping6_CFLAGS = $(AM_CFLAGS) -DIPV6
55
 all: all-am
56
 
57
 .SUFFIXES:
58
@@ -239,6 +253,9 @@
59
 fping$(EXEEXT): $(fping_OBJECTS) $(fping_DEPENDENCIES) 
60
 	@rm -f fping$(EXEEXT)
61
 	$(LINK) $(fping_OBJECTS) $(fping_LDADD) $(LIBS)
62
+fping6$(EXEEXT): $(fping6_OBJECTS) $(fping6_DEPENDENCIES) 
63
+	@rm -f fping6$(EXEEXT)
64
+	$(fping6_LINK) $(fping6_OBJECTS) $(fping6_LDADD) $(LIBS)
65
 
66
 mostlyclean-compile:
67
 	-rm -f *.$(OBJEXT)
68
@@ -247,6 +264,7 @@
69
 	-rm -f *.tab.c
70
 
71
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fping.Po@am__quote@
72
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fping6-fping.Po@am__quote@
73
 
74
 .c.o:
75
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
76
@@ -262,6 +280,20 @@
77
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
78
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
79
 
80
+fping6-fping.o: fping.c
81
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fping6_CFLAGS) $(CFLAGS) -MT fping6-fping.o -MD -MP -MF $(DEPDIR)/fping6-fping.Tpo -c -o fping6-fping.o `test -f 'fping.c' || echo '$(srcdir)/'`fping.c
82
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/fping6-fping.Tpo $(DEPDIR)/fping6-fping.Po
83
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fping.c' object='fping6-fping.o' libtool=no @AMDEPBACKSLASH@
84
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
85
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fping6_CFLAGS) $(CFLAGS) -c -o fping6-fping.o `test -f 'fping.c' || echo '$(srcdir)/'`fping.c
86
+
87
+fping6-fping.obj: fping.c
88
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fping6_CFLAGS) $(CFLAGS) -MT fping6-fping.obj -MD -MP -MF $(DEPDIR)/fping6-fping.Tpo -c -o fping6-fping.obj `if test -f 'fping.c'; then $(CYGPATH_W) 'fping.c'; else $(CYGPATH_W) '$(srcdir)/fping.c'; fi`
89
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/fping6-fping.Tpo $(DEPDIR)/fping6-fping.Po
90
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='fping.c' object='fping6-fping.obj' libtool=no @AMDEPBACKSLASH@
91
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
92
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fping6_CFLAGS) $(CFLAGS) -c -o fping6-fping.obj `if test -f 'fping.c'; then $(CYGPATH_W) 'fping.c'; else $(CYGPATH_W) '$(srcdir)/fping.c'; fi`
93
+
94
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
95
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
96
 	unique=`for i in $$list; do \
(-)head/net/fping/files/patch-sourceaddr (-88 lines)
Lines 1-88 Link Here
1
diff -ru ../fping-2.4b2_to-ipv6-orig/fping.c ./fping.c
2
--- ../fping-2.4b2_to-ipv6-orig/fping.c	Sun Jan 20 19:06:30 2002
3
+++ ./fping.c	Fri Apr 13 14:36:02 2007
4
@@ -283,6 +283,12 @@
5
 u_int count = 1;
6
 u_int trials;
7
 u_int report_interval = 0;
8
+int src_addr_present = 0;
9
+#ifndef IPV6
10
+struct in_addr src_addr;
11
+#else
12
+struct in6_addr src_addr;
13
+#endif
14
 
15
 /* global stats */
16
 long max_reply = 0;
17
@@ -408,6 +414,11 @@
18
 	struct protoent *proto;
19
 	char *buf;
20
 	uid_t uid;
21
+#ifndef IPV6
22
+	struct sockaddr_in sa;
23
+#else
24
+	struct sockaddr_in6 sa;
25
+#endif
26
 	/* check if we are root */
27
 
28
 	if( geteuid() )
29
@@ -491,7 +502,7 @@
30
 
31
 	/* get command line options */
32
 
33
-	while( ( c = getopt( argc, argv, "gedhlmnqusaAvz:t:i:p:f:r:c:b:C:Q:B:" ) ) != EOF )
34
+	while( ( c = getopt( argc, argv, "gedhlmnqusaAvz:t:i:p:f:r:c:b:C:Q:B:S:" ) ) != EOF )
35
 	{
36
 		switch( c )
37
 		{
38
@@ -639,6 +650,16 @@
39
 			generate_flag = 1;
40
 			break;
41
 
42
+		case 'S':
43
+#ifndef IPV6
44
+			if( ! inet_pton( AF_INET, optarg, &src_addr ) )
45
+#else
46
+			if( ! inet_pton( AF_INET6, optarg, &src_addr ) )
47
+#endif
48
+				usage();
49
+			src_addr_present = 1;
50
+			break;
51
+
52
 		default:
53
 			usage();
54
 			break;
55
@@ -962,6 +983,22 @@
56
 	if( !num_hosts )
57
 		exit( 2 );
58
 
59
+	/* set the source address */
60
+
61
+	if( src_addr_present )
62
+	{
63
+		memset( &sa, 0, sizeof( sa ) );
64
+#ifndef IPV6
65
+		sa.sin_family = AF_INET;
66
+		sa.sin_addr = src_addr;
67
+#else
68
+		sa.sin6_family = AF_INET6;
69
+		sa.sin6_addr = src_addr;
70
+#endif
71
+		if ( bind( s, (struct sockaddr *)&sa, sizeof( sa ) ) < 0 )
72
+			errno_crash_and_burn( "cannot bind source address" );
73
+	}
74
+
75
 	/* allocate array to hold outstanding ping requests */
76
 
77
 	table = ( HOST_ENTRY** )malloc( sizeof( HOST_ENTRY* ) * num_hosts );
78
@@ -2732,6 +2769,7 @@
79
 	fprintf( stderr, "   -Q n       same as -q, but show summary every n seconds\n" );
80
 	fprintf( stderr, "   -r n       number of retries (default %d)\n", retry );
81
 	fprintf( stderr, "   -s         print final stats\n" );
82
+	fprintf( stderr, "   -S addr    set source address\n" );
83
 	fprintf( stderr, "   -t n       individual target initial timeout (in millisec) (default %d)\n", timeout / 100 );
84
 	fprintf( stderr, "   -u         show targets that are unreachable\n" );
85
 	fprintf( stderr, "   -v         show version\n" );
86
87
88
(-)head/net/fping/files/patch-02 (-146 lines)
Lines 1-146 Link Here
1
--- fping.c.orig	Mon Jan 21 02:06:30 2002
2
+++ fping.c	Tue Jul 12 18:11:30 2005
3
@@ -42,7 +42,6 @@
4
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
5
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
6
  */
7
-#define IPV6 1						/* This should be a compiler option, or even better be done from the Makefile... ;) */
8
 
9
 #ifndef _NO_PROTO
10
 #if !__STDC__ && !defined( __cplusplus ) && !defined( FUNCPROTO ) \
11
@@ -67,7 +66,7 @@
12
 
13
 /*** autoconf includes ***/
14
 
15
-
16
+#include <sys/types.h>
17
 #include <stdio.h>
18
 #include <errno.h>
19
 #include <time.h>
20
@@ -88,7 +87,6 @@
21
 #include <string.h>
22
 #include <stddef.h>
23
 
24
-#include <sys/types.h>
25
 #include <sys/time.h>
26
 #include <sys/socket.h>
27
 
28
@@ -112,6 +110,10 @@
29
 #include <arpa/inet.h>
30
 #include <netdb.h>
31
 
32
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
33
+#include <sys/param.h>
34
+#endif
35
+
36
 /* RS6000 has sys/select.h */
37
 #ifdef HAVE_SYS_SELECT_H
38
 #include <sys/select.h>
39
@@ -246,13 +248,13 @@
40
      struct timeval       last_send_time;     /* time of last packet sent */
41
      int                  num_sent;           /* number of ping packets sent */
42
      int                  num_recv;           /* number of pings received */
43
-     int                  max_reply;          /* longest response time */
44
-     int                  min_reply;          /* shortest response time */
45
+     long                 max_reply;          /* longest response time */
46
+     long                 min_reply;          /* shortest response time */
47
      int                  total_time;         /* sum of response times */
48
      int                  num_sent_i;         /* number of ping packets sent */
49
      int                  num_recv_i;         /* number of pings received */
50
-     int                  max_reply_i;        /* longest response time */
51
-     int                  min_reply_i;        /* shortest response time */
52
+     long                 max_reply_i;        /* longest response time */
53
+     long                 min_reply_i;        /* shortest response time */
54
      int                  total_time_i;       /* sum of response times */
55
      int                  *resp_times;        /* individual response times */
56
 #if defined( DEBUG ) || defined( _DEBUG )
57
@@ -482,7 +484,7 @@
58
 
59
 	}/* IF */
60
 
61
-	prog = argv[0];
62
+	prog = (prog = strrchr(argv[0], '/')) ? prog + 1 : argv[0];
63
 	ident = getpid() & 0xFFFF;
64
 
65
 	verbose_flag = 1;
66
@@ -502,8 +504,8 @@
67
 			break;
68
 		
69
 		case 'r':
70
-			if( !( retry = ( u_int )atoi( optarg ) ) )
71
-				usage();
72
+			retry = ( u_int )atoi( optarg );
73
+
74
 
75
 			break;
76
 		
77
@@ -823,6 +825,7 @@
78
 
79
 		while( fgets( line, 132, ping_file ) )
80
 		{
81
+			line[132-1] = '\0';
82
 			if( sscanf( line, "%s", host ) != 1 )
83
 				continue;
84
 			
85
@@ -1503,7 +1506,6 @@
86
 	memset( buffer, 0, ping_pkt_size * sizeof( char ) );
87
 	icp = ( FPING_ICMPHDR* )buffer;
88
 
89
-	gettimeofday( &h->last_send_time, &tz );
90
 #ifndef IPV6
91
 	icp->icmp_type = ICMP_ECHO;
92
 	icp->icmp_code = 0;
93
@@ -1512,6 +1514,8 @@
94
 	icp->icmp_id = ident;
95
 
96
 	pdp = ( PING_DATA* )( buffer + SIZE_ICMP_HDR );
97
+	/* set the time at the very last possible point */
98
+	gettimeofday(&h->last_send_time,&tz);
99
 	pdp->ping_ts = h->last_send_time;
100
 	pdp->ping_count = h->num_sent;
101
 
102
@@ -1523,6 +1527,8 @@
103
 	icp->icmp6_id = ident;
104
 
105
 	pdp = ( PING_DATA* )( buffer + SIZE_ICMP_HDR );
106
+	/* set the time at the very last possible point */
107
+	gettimeofday(&h->last_send_time,&tz);
108
 	pdp->ping_ts = h->last_send_time;
109
 	pdp->ping_count = h->num_sent;
110
 
111
@@ -1611,6 +1617,9 @@
112
 
113
 	result = recvfrom_wto( s, buffer, sizeof(buffer), &response_addr, select_time );
114
 
115
+	/* get time of receipt as close to the real time as possible */
116
+	gettimeofday(&current_time,&tz);
117
+
118
 	if( result < 0 )
119
 		return 0;	/* timeout */
120
   
121
@@ -1625,7 +1634,7 @@
122
 
123
 	ip = ( struct ip* )buffer;
124
 #ifndef IPV6
125
-#if defined( __alpha__ ) && __STDC__ && !defined( __GLIBC__ )
126
+#if defined( __alpha__ ) && defined(__osf1__) && __STDC__ && !defined( __GLIBC__ )
127
 	/* The alpha headers are decidedly broken.
128
 	 * Using an ANSI compiler, it provides ip_vhl instead of ip_hl and
129
 	 * ip_v.  So, to get ip_hl, we mask off the bottom four bits.
130
@@ -1633,7 +1642,7 @@
131
 	hlen = ( ip->ip_vhl & 0x0F ) << 2;
132
 #else
133
 	hlen = ip->ip_hl << 2;
134
-#endif /* defined(__alpha__) && __STDC__ */
135
+#endif /* defined(__alpha__) && defined(__osf1__) && __STDC__ */
136
 	if( result < hlen + ICMP_MINLEN )
137
 #else
138
 	if( result < sizeof(FPING_ICMPHDR) )
139
@@ -1690,7 +1699,6 @@
140
 	h = table[n];
141
 
142
 	/* received ping is cool, so process it */
143
-	gettimeofday( &current_time, &tz );
144
 	h->waiting = 0;
145
 	h->timeout = timeout;
146
 	h->num_recv++;
(-)head/net/fping/files/patch-configure (+97 lines)
Line 0 Link Here
1
--- configure.orig	2012-07-18 21:49:41.000000000 +0200
2
+++ configure	2012-07-18 21:49:47.000000000 +0200
3
@@ -651,6 +651,10 @@
4
 build_vendor
5
 build_cpu
6
 build
7
+IPV6_FALSE
8
+IPV6_TRUE
9
+IPV4_FALSE
10
+IPV4_TRUE
11
 target_alias
12
 host_alias
13
 build_alias
14
@@ -692,6 +696,8 @@
15
 ac_subst_files=''
16
 ac_user_opts='
17
 enable_option_checking
18
+enable_ipv4
19
+enable_ipv6
20
 enable_maintainer_mode
21
 enable_dependency_tracking
22
 '
23
@@ -1325,6 +1331,8 @@
24
   --disable-option-checking  ignore unrecognized --enable/--with options
25
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
26
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
27
+  --enable-ipv4    Build IPv4 capable fping
28
+  --enable-ipv6    Build IPv6 capable fping6
29
   --enable-maintainer-mode  enable make rules and dependencies not useful
30
 			  (and sometimes confusing) to the casual installer
31
   --disable-dependency-tracking  speeds up one-time build
32
@@ -2120,6 +2128,50 @@
33
 
34
 
35
 
36
+# Check whether --enable-ipv4 was given.
37
+if test "${enable_ipv4+set}" = set; then :
38
+  enableval=$enable_ipv4; case "${enableval}" in
39
+   yes)	ipv4=true ;;
40
+   no)	ipv4=false ;;
41
+   *)	as_fn_error $? "bad value ${enableval} for --enable-ipv4" "$LINENO" 5  ;;
42
+   esac
43
+else
44
+  ipv4=true
45
+fi
46
+
47
+   if test x$ipv4 = xtrue; then
48
+  IPV4_TRUE=
49
+  IPV4_FALSE='#'
50
+else
51
+  IPV4_TRUE='#'
52
+  IPV4_FALSE=
53
+fi
54
+
55
+
56
+# Check whether --enable-ipv6 was given.
57
+if test "${enable_ipv6+set}" = set; then :
58
+  enableval=$enable_ipv6; case "${enableval}" in
59
+   yes)	ipv6=true ;;
60
+   no)	ipv6=false ;;
61
+   *)	as_fn_error $? "bad value ${enableval} for --enable-ipv6" "$LINENO" 5  ;;
62
+   esac
63
+else
64
+  ipv6=false
65
+fi
66
+
67
+   if test x$ipv6 = xtrue; then
68
+  IPV6_TRUE=
69
+  IPV6_FALSE='#'
70
+else
71
+  IPV6_TRUE='#'
72
+  IPV6_FALSE=
73
+fi
74
+
75
+
76
+if test x$ipv4 = xfalse && test x$ipv6 = xfalse; then
77
+  as_fn_error $? "You must enable at least one of IPv4 and IPv6." "$LINENO" 5
78
+fi
79
+
80
 ac_aux_dir=
81
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
82
   if test -f "$ac_dir/install-sh"; then
83
@@ -4369,6 +4421,14 @@
84
 LTLIBOBJS=$ac_ltlibobjs
85
 
86
 
87
+if test -z "${IPV4_TRUE}" && test -z "${IPV4_FALSE}"; then
88
+  as_fn_error $? "conditional \"IPV4\" was never defined.
89
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
90
+fi
91
+if test -z "${IPV6_TRUE}" && test -z "${IPV6_FALSE}"; then
92
+  as_fn_error $? "conditional \"IPV6\" was never defined.
93
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
94
+fi
95
  if test -n "$EXEEXT"; then
96
   am__EXEEXT_TRUE=
97
   am__EXEEXT_FALSE='#'
(-)head/net/fping/Makefile (-13 / +27 lines)
Lines 7-39 Link Here
7
#
7
#
8
8
9
PORTNAME=	fping
9
PORTNAME=	fping
10
PORTVERSION=	2.4b2
10
PORTVERSION=	3.2
11
PORTREVISION=	1
12
CATEGORIES=	net ipv6
11
CATEGORIES=	net ipv6
13
MASTER_SITES=	http://keyserver.kjsl.com/~jharris/distfiles/
12
MASTER_SITES=   http://fping.org/dist/
14
#MASTER_SITES=	http://www.fping.com/download/
15
DISTNAME=	${PORTNAME}-${PORTVERSION}_to-ipv6
16
13
17
MAINTAINER=	jharris@widomaker.com
14
MAINTAINER=	rodrigo@bebik.net
18
COMMENT=	Quickly ping N hosts w/o flooding the network
15
COMMENT=	Quickly ping N hosts w/o flooding the network
19
16
20
PLIST_FILES=	sbin/fping
17
OPTIONS_MULTI=		NET
18
OPTIONS_MULTI_NET=	IPV4 IPV6
19
OPTIONS_DEFAULT=	IPV4
21
20
22
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
23
CONFIGURE_ARGS=	--bindir="${PREFIX}/sbin"
22
CONFIGURE_ARGS=	--bindir="${PREFIX}/sbin"
23
24
MAN8=		fping.8
24
MAN8=		fping.8
25
25
26
.if defined(WITH_IPV6)
26
.include <bsd.port.options.mk>
27
# IPv6 not enabled by default, as it does not work together with IPv4.
27
28
CFLAGS+=	-DIPV6
28
.if ${PORT_OPTIONS:MIPV4}
29
CONFIGURE_ARGS+=--enable-ipv4
30
PLIST_FILES+=sbin/fping
31
.else
32
CONFIGURE_ARGS+=--disable-ipv4
29
.endif
33
.endif
30
34
31
post-patch:
35
.if ${PORT_OPTIONS:MIPV6}
32
	@${REINPLACE_CMD} -e 's/fping@/${MAINTAINER:S/@/\\@/g} or fping@/g' \
36
CONFIGURE_ARGS+=--enable-ipv6
33
		${WRKSRC}/fping.c
37
PLIST_FILES+=sbin/fping6
38
MLINKS=	fping.8	fping6.8
39
.else
40
CONFIGURE_ARGS+=--disable-ipv6
41
.endif
34
42
35
post-install:
43
post-install:
44
.if ${PORT_OPTIONS:MIPV4}
36
	@${STRIP_CMD} ${PREFIX}/sbin/fping
45
	@${STRIP_CMD} ${PREFIX}/sbin/fping
37
	@${CHMOD} 4555 ${PREFIX}/sbin/fping
46
	@${CHMOD} 4555 ${PREFIX}/sbin/fping
47
.endif
48
.if ${PORT_OPTIONS:MIPV6}
49
	@${STRIP_CMD} ${PREFIX}/sbin/fping6
50
	@${CHMOD} 4555 ${PREFIX}/sbin/fping6
51
.endif
38
52
39
.include <bsd.port.mk>
53
.include <bsd.port.mk>

Return to bug 169949