From a4ab2ffa1bd7c6a585606ec88f131e581d62b1fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcelo=20G=C3=B3es?= Date: Sat, 3 Sep 2005 16:25:48 +0000 Subject: [PATCH] bug 104718 Package-Manager: portage-2.0.51.22-r2 --- net-analyzer/mtr/ChangeLog | 9 +- net-analyzer/mtr/Manifest | 11 ++- net-analyzer/mtr/files/digest-mtr-0.69-r1 | 1 + net-analyzer/mtr/files/mtr-0.69-debian.patch | 93 ++++++++++++++++++++ net-analyzer/mtr/mtr-0.69-r1.ebuild | 62 +++++++++++++ 5 files changed, 171 insertions(+), 5 deletions(-) create mode 100644 net-analyzer/mtr/files/digest-mtr-0.69-r1 create mode 100644 net-analyzer/mtr/files/mtr-0.69-debian.patch create mode 100644 net-analyzer/mtr/mtr-0.69-r1.ebuild diff --git a/net-analyzer/mtr/ChangeLog b/net-analyzer/mtr/ChangeLog index 9ae87300e726..40b5a4925448 100644 --- a/net-analyzer/mtr/ChangeLog +++ b/net-analyzer/mtr/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/mtr # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/mtr/ChangeLog,v 1.48 2005/08/24 23:25:40 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/mtr/ChangeLog,v 1.49 2005/09/03 16:25:48 vanquirius Exp $ + +*mtr-0.69-r1 (03 Sep 2005) + + 03 Sep 2005; Marcelo Goes + +files/mtr-0.69-debian.patch, +mtr-0.69-r1.ebuild: + Use patch from Debian to fix failed to bind to interface problem when using + --address. Fixes bug 104718. Thanks to Claudiu Gafton . 24 Aug 2005; Aron Griffis mtr-0.69.ebuild: stable on ia64 diff --git a/net-analyzer/mtr/Manifest b/net-analyzer/mtr/Manifest index 807390c178d4..d6710d47428a 100644 --- a/net-analyzer/mtr/Manifest +++ b/net-analyzer/mtr/Manifest @@ -1,7 +1,10 @@ MD5 8fe99a74d5a26127140f3435860dd4d2 mtr-0.67.ebuild 1296 -MD5 720bffd73acf542e859034ca9d443c19 metadata.xml 244 -MD5 4c747c3aec88e4597e3f45b10c04d8f0 ChangeLog 5347 +MD5 24a16181446e8046321e3f259794bbbd mtr-0.69-r1.ebuild 1471 MD5 6dcd2450970cd65f5b6182b287b390b4 mtr-0.69.ebuild 1407 -MD5 ce43e9fae32e2db595e780b4a4b2fcd8 files/digest-mtr-0.69 60 -MD5 ed7a57f974bbb8a86b2fc02be7277c94 files/digest-mtr-0.67 60 +MD5 6fd1a039deaf9ef9bb871b0ceec28495 ChangeLog 5637 +MD5 720bffd73acf542e859034ca9d443c19 metadata.xml 244 MD5 0bbdffc84e47f22daaf46c76e941a02a files/mtr-ac-res_mkquery.patch 510 +MD5 1b2fafeb55048e9993c48c330ca7a4bf files/mtr-0.69-debian.patch 2558 +MD5 ed7a57f974bbb8a86b2fc02be7277c94 files/digest-mtr-0.67 60 +MD5 ce43e9fae32e2db595e780b4a4b2fcd8 files/digest-mtr-0.69 60 +MD5 ce43e9fae32e2db595e780b4a4b2fcd8 files/digest-mtr-0.69-r1 60 diff --git a/net-analyzer/mtr/files/digest-mtr-0.69-r1 b/net-analyzer/mtr/files/digest-mtr-0.69-r1 new file mode 100644 index 000000000000..609a70cb974a --- /dev/null +++ b/net-analyzer/mtr/files/digest-mtr-0.69-r1 @@ -0,0 +1 @@ +MD5 58904d6d8d70114195cdeb653d56914c mtr-0.69.tar.gz 183216 diff --git a/net-analyzer/mtr/files/mtr-0.69-debian.patch b/net-analyzer/mtr/files/mtr-0.69-debian.patch new file mode 100644 index 000000000000..5842777d4de6 --- /dev/null +++ b/net-analyzer/mtr/files/mtr-0.69-debian.patch @@ -0,0 +1,93 @@ +--- mtr-0.69.orig/mtr.c ++++ mtr-0.69/mtr.c +@@ -388,10 +388,6 @@ + } + + +- if (net_set_interfaceaddress (InterfaceAddress) != 0) { +- fprintf (stderr, "mtr: Couldn't set interface addres.\n"); +- exit (1); +- } + + #ifdef ENABLE_IPV6 + /* gethostbyname2() is deprecated so we'll use getaddrinfo() instead. */ +@@ -442,6 +438,11 @@ + exit(1); + } + ++ if (net_set_interfaceaddress (InterfaceAddress) != 0) { ++ fprintf (stderr, "mtr: Couldn't set interface address.\n"); ++ exit (1); ++ } ++ + display_open(); + dns_open(); + +--- mtr-0.69.orig/net.c ++++ mtr-0.69/net.c +@@ -322,7 +322,15 @@ + int oldavg; /* usedByMin */ + int oldjavg; /* usedByMin */ + int i; /* usedByMin */ ++#ifdef ENABLE_IPV6 ++ char addrcopy[sizeof(struct in6_addr)]; ++#else ++ char addrcopy[sizeof(struct in_addr)]; ++#endif + ++ /* Copy the from address ASAP because it can be overwritten */ ++ addrcpy( (void *) &addrcopy, addr, af ); ++ + if (seq < 0 || seq >= MaxSequence) + return; + +@@ -339,22 +347,22 @@ + if ( addrcmp( (void *) &(host[index].addr), + (void *) &unspec_addr, af ) == 0 ) { + // should be out of if as addr can change +- addrcpy( (void *) &(host[index].addr), addr, af ); ++ addrcpy( (void *) &(host[index].addr), addrcopy, af ); + display_rawhost(index, (void *) &(host[index].addr)); + + /* multi paths by Min */ +- addrcpy( (void *) &(host[index].addrs[0]), addr, af ); ++ addrcpy( (void *) &(host[index].addrs[0]), addrcopy, af ); + } else { + for( i=0; i= 0) close(sendsock4); ++ if (recvsock4 >= 0) close(recvsock4); ++ if (sendsock6 >= 0) close(sendsock6); ++ if (recvsock6 >= 0) close(recvsock6); + } + + +--- mtr-0.69.orig/net.h ++++ mtr-0.69/net.h +@@ -117,3 +117,6 @@ + extern char available_options[]; + + ip_t unspec_addr; ++ ++FILE *ADDRCMP; ++int i; diff --git a/net-analyzer/mtr/mtr-0.69-r1.ebuild b/net-analyzer/mtr/mtr-0.69-r1.ebuild new file mode 100644 index 000000000000..49ab8afb82a2 --- /dev/null +++ b/net-analyzer/mtr/mtr-0.69-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/mtr/mtr-0.69-r1.ebuild,v 1.1 2005/09/03 16:25:48 vanquirius Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="My TraceRoute. Excellent network diagnostic tool." +HOMEPAGE="http://www.bitwizard.nl/mtr/" +SRC_URI="ftp://ftp.bitwizard.nl/mtr/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc-macos ~s390 ~sparc ~x86" +IUSE="gtk gtk2 ipv6" + +DEPEND="dev-util/pkgconfig" +RDEPEND=">=sys-libs/ncurses-5.2 + gtk? ( + !gtk2? ( =x11-libs/gtk+-1.2* ) + gtk2? ( >=x11-libs/gtk+-2 ) + )" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PN}-ac-res_mkquery.patch + # bug 104718 + epatch ${FILESDIR}/${P}-debian.patch +} + +src_compile() { + autoconf || die "autoconf failed" + + local myconf + use gtk || myconf="${myconf} --without-gtk" + + if use ppc-macos; + then + append-flags "-DBIND_8_COMPAT" + else + append-ldflags -Wl,-z,now + fi + + econf ${myconf} \ + $(use_enable gtk2) \ + $(use_enable ipv6) \ + || die "econf failed" + + emake || die "emake failed" +} + +src_install() { + # this binary is universal. ie: it does both console and gtk. + make DESTDIR=${D} sbindir=/usr/bin install || die "make install failed" + + insinto /usr/share/${PN} ; doins img/mtr_icon.xpm + + fowners root:wheel /usr/bin/mtr + fperms 4710 /usr/bin/mtr + + dodoc AUTHORS COPYING ChangeLog FORMATS NEWS README SECURITY TODO +} -- 2.26.2