summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/fping')
-rw-r--r--net-analyzer/fping/files/fping-4.2-fping6-6.patch21
-rw-r--r--net-analyzer/fping/fping-4.2-r1.ebuild36
2 files changed, 57 insertions, 0 deletions
diff --git a/net-analyzer/fping/files/fping-4.2-fping6-6.patch b/net-analyzer/fping/files/fping-4.2-fping6-6.patch
new file mode 100644
index 000000000000..63138d3e2d2c
--- /dev/null
+++ b/net-analyzer/fping/files/fping-4.2-fping6-6.patch
@@ -0,0 +1,21 @@
+From 6fd4f8bd91abc43f80078bdd0084cb6d2b1de7f1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johan=20Str=C3=B6m?= <johan@stromnet.se>
+Date: Tue, 25 Jun 2019 14:03:14 +0200
+Subject: [PATCH] Do not fail if using fping6 with -6 flag
+
+Mostly for backwards compatability
+---
+ src/fping.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/fping.c
++++ b/src/fping.c
+@@ -435,7 +435,7 @@
+ break;
+ case '6':
+ #ifdef IPV6
+- if (hints_ai_family != AF_UNSPEC) {
++ if (hints_ai_family != AF_UNSPEC && hints_ai_family != AF_INET6) {
+ fprintf(stderr, "%s: can't specify both -4 and -6\n", prog);
+ exit(1);
+ }
diff --git a/net-analyzer/fping/fping-4.2-r1.ebuild b/net-analyzer/fping/fping-4.2-r1.ebuild
new file mode 100644
index 000000000000..0e1b61dd97e7
--- /dev/null
+++ b/net-analyzer/fping/fping-4.2-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit fcaps
+
+DESCRIPTION="A utility to ping multiple hosts at once"
+HOMEPAGE="https://fping.org/"
+SRC_URI="https://fping.org/dist/${P}.tar.gz"
+
+LICENSE="fping"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6 suid"
+
+FILECAPS=( cap_net_raw+ep usr/sbin/fping )
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.2-fno-common.patch
+ "${FILESDIR}"/${PN}-4.2-fping6-6.patch
+)
+
+src_configure() {
+ econf $(use_enable ipv6)
+}
+
+src_install() {
+ default
+
+ if use suid; then
+ fperms u+s /usr/sbin/fping
+ fi
+
+ if use ipv6; then
+ dosym fping /usr/sbin/fping6
+ fi
+}