summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-analyzer/mtr/files/mtr-9999-ipv6.patch59
-rw-r--r--net-analyzer/mtr/files/mtr-9999-strings.patch12
-rw-r--r--net-analyzer/mtr/mtr-0.87.ebuild2
-rw-r--r--net-analyzer/mtr/mtr-9999.ebuild21
4 files changed, 86 insertions, 8 deletions
diff --git a/net-analyzer/mtr/files/mtr-9999-ipv6.patch b/net-analyzer/mtr/files/mtr-9999-ipv6.patch
new file mode 100644
index 000000000000..32a62853387c
--- /dev/null
+++ b/net-analyzer/mtr/files/mtr-9999-ipv6.patch
@@ -0,0 +1,59 @@
+--- a/net.c
++++ b/net.c
+@@ -320,9 +320,13 @@
+ struct sockaddr_storage local;
+ struct sockaddr_storage remote;
+ struct sockaddr_in *local4 = (struct sockaddr_in *) &local;
++#ifdef ENABLE_IPV6
+ struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local;
++#endif
+ struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote;
++#ifdef ENABLE_IPV6
+ struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote;
++#endif
+ socklen_t len;
+
+ ttl = index + 1;
+@@ -437,9 +441,13 @@
+ struct sockaddr_storage local;
+ struct sockaddr_storage remote;
+ struct sockaddr_in *local4 = (struct sockaddr_in *) &local;
++#ifdef ENABLE_IPV6
+ struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local;
++#endif
+ struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote;
++#ifdef ENABLE_IPV6
+ struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote;
++#endif
+ socklen_t len;
+
+ ttl = index + 1;
+@@ -726,8 +734,12 @@
+
+ /* sendto() assumes packet length includes the IPv4 header but not the
+ IPv6 header. */
++#ifdef ENABLE_IPV6
+ spacketsize = abs(packetsize) -
+ ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) );
++#else
++ spacketsize = abs(packetsize);
++#endif
+ rv = sendto(sendsock, packet, spacketsize, 0, remotesockaddr, salen);
+ if (first && (rv < 0) && ((errno == EINVAL) || (errno == EMSGSIZE))) {
+ /* Try the first packet again using host byte order. */
+@@ -1535,11 +1547,15 @@
+ struct sockaddr_in name_struct;
+ #endif
+ struct sockaddr_in * sa4;
++#ifdef ENABLE_IPV6
+ struct sockaddr_in6 * sa6;
++#endif
+ struct sockaddr * name = (struct sockaddr *) &name_struct;
+ struct sockaddr_storage remote;
+ struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote;
++#ifdef ENABLE_IPV6
+ struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote;
++#endif
+ socklen_t len;
+ int s;
+
diff --git a/net-analyzer/mtr/files/mtr-9999-strings.patch b/net-analyzer/mtr/files/mtr-9999-strings.patch
new file mode 100644
index 000000000000..878382bde772
--- /dev/null
+++ b/net-analyzer/mtr/files/mtr-9999-strings.patch
@@ -0,0 +1,12 @@
+--- a/dns.c
++++ b/dns.c
+@@ -49,7 +49,8 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ //#include <ctype.h>
+-//#include <string.h>
++#include <string.h>
++#include <strings.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <signal.h>
diff --git a/net-analyzer/mtr/mtr-0.87.ebuild b/net-analyzer/mtr/mtr-0.87.ebuild
index afac24180f50..f1a2c37eee36 100644
--- a/net-analyzer/mtr/mtr-0.87.ebuild
+++ b/net-analyzer/mtr/mtr-0.87.ebuild
@@ -30,6 +30,8 @@ DEPEND="
DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
FILECAPS=( cap_net_raw /usr/sbin/mtr )
PATCHES=(
+ "${FILESDIR}"/${PN}-0.80-impl-dec.patch
+ "${FILESDIR}"/${PN}-9999-ipv6.patch
"${FILESDIR}"/${PN}-9999-tinfo.patch
)
diff --git a/net-analyzer/mtr/mtr-9999.ebuild b/net-analyzer/mtr/mtr-9999.ebuild
index 2af7b978a2f6..f54af4fbe106 100644
--- a/net-analyzer/mtr/mtr-9999.ebuild
+++ b/net-analyzer/mtr/mtr-9999.ebuild
@@ -1,10 +1,9 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
-
-inherit eutils autotools fcaps flag-o-matic git-r3
+EAPI=6
+inherit autotools eutils fcaps flag-o-matic git-r3
DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool"
HOMEPAGE="http://www.bitwizard.nl/mtr/"
@@ -31,6 +30,12 @@ DEPEND="
DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
FILECAPS=( cap_net_raw /usr/sbin/mtr )
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.80-impl-dec.patch
+ "${FILESDIR}"/${PN}-9999-ipv6.patch
+ "${FILESDIR}"/${PN}-9999-strings.patch
+ "${FILESDIR}"/${PN}-9999-tinfo.patch
+)
src_unpack() {
git-r3_src_unpack
@@ -38,16 +43,16 @@ src_unpack() {
}
src_prepare() {
- epatch \
- "${FILESDIR}"/${PN}-0.80-impl-dec.patch \
- "${FILESDIR}"/${PN}-0.85-gtk.patch \
- "${FILESDIR}"/${PN}-9999-tinfo.patch
+ default
sed -i -e "/^\s*xver=/s|$.*)|${EGIT_VERSION:0:8}|" Makefile.am || die
# Keep this comment and following mv, even in case ebuild does not need
# it: kept gtk-2.0.m4 in SRC_URI but you'll have to mv it before autoreconf
mv "${WORKDIR}"/gtk-2.0-for-mtr.m4 gtk-2.0.m4 || die #222909
+
+ eapply_user
+
AT_M4DIR="." eautoreconf
}