public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/mtr/files/, net-analyzer/mtr/
Date: Thu,  4 Aug 2016 14:07:31 +0000 (UTC)	[thread overview]
Message-ID: <1470319649.63d3dcfd13613f7b9eb23f2b20533dc0e310112c.jer@gentoo> (raw)

commit:     63d3dcfd13613f7b9eb23f2b20533dc0e310112c
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  4 14:07:17 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Aug  4 14:07:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63d3dcfd

net-analyzer/mtr: Fix building with USE="-ipv6 -gtk".

Package-Manager: portage-2.3.0

 net-analyzer/mtr/files/mtr-9999-ipv6.patch    | 59 +++++++++++++++++++++++++++
 net-analyzer/mtr/files/mtr-9999-strings.patch | 12 ++++++
 net-analyzer/mtr/mtr-0.87.ebuild              |  2 +
 net-analyzer/mtr/mtr-9999.ebuild              | 21 ++++++----
 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 0000000..32a6285
--- /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 0000000..878382b
--- /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 afac241..f1a2c37 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 2af7b97..f54af4f 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
 }
 


             reply	other threads:[~2016-08-04 14:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 14:07 Jeroen Roovers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-11 22:06 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/mtr/files/, net-analyzer/mtr/ Sam James
2017-06-04 21:21 Jeroen Roovers
2015-08-18  4:51 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470319649.63d3dcfd13613f7b9eb23f2b20533dc0e310112c.jer@gentoo \
    --to=jer@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox