Gentoo Archives: gentoo-commits

From: Ben Kohler <bkohler@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/iftop/, net-analyzer/iftop/files/
Date: Thu, 07 Feb 2019 17:50:50
Message-Id: 1549561816.4b42f9409144423996b0240fbc49654a15788112.bkohler@gentoo
1 commit: 4b42f9409144423996b0240fbc49654a15788112
2 Author: Ben Kohler <bkohler <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 7 17:49:59 2019 +0000
4 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 7 17:50:16 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b42f940
7
8 net-analyzer/iftop: revbump for MAC formatting patch
9
10 Closes: https://bugs.gentoo.org/661890
11 Package-Manager: Portage-2.3.59, Repoman-2.3.12
12 Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
13
14 .../files/iftop-1.0_pre4-fix-MAC-formatting.patch | 22 +++++++++++
15 net-analyzer/iftop/iftop-1.0_pre4-r4.ebuild | 45 ++++++++++++++++++++++
16 2 files changed, 67 insertions(+)
17
18 diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-fix-MAC-formatting.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-fix-MAC-formatting.patch
19 new file mode 100644
20 index 00000000000..d68a8095dce
21 --- /dev/null
22 +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-fix-MAC-formatting.patch
23 @@ -0,0 +1,22 @@
24 +From: Xiaoguang Sun <sun.xiaoguang@×××××××.com>
25 +Date: Tue, 11 Mar 2014 13:18:46 +0100
26 +Subject: MAC address format
27 +
28 +Forwarded: http://lists.beasts.org/pipermail/iftop-users/2014-March/000413.html
29 +---
30 + iftop.c | 2 +-
31 + 1 file changed, 1 insertion(+), 1 deletion(-)
32 +
33 +diff --git a/iftop.c b/iftop.c
34 +index a090dcf..883782e 100644
35 +--- a/iftop.c
36 ++++ b/iftop.c
37 +@@ -713,7 +713,7 @@ void packet_init() {
38 + if(have_hw_addr) {
39 + fprintf(stderr, "MAC address is:");
40 + for (i = 0; i < 6; ++i)
41 +- fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned int)if_hw_addr[i]);
42 ++ fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned char)if_hw_addr[i]);
43 + fprintf(stderr, "\n");
44 + }
45 +
46
47 diff --git a/net-analyzer/iftop/iftop-1.0_pre4-r4.ebuild b/net-analyzer/iftop/iftop-1.0_pre4-r4.ebuild
48 new file mode 100644
49 index 00000000000..890ba6ff2ae
50 --- /dev/null
51 +++ b/net-analyzer/iftop/iftop-1.0_pre4-r4.ebuild
52 @@ -0,0 +1,45 @@
53 +# Copyright 1999-2019 Gentoo Authors
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=6
57 +inherit autotools eutils
58 +
59 +DESCRIPTION="display bandwidth usage on an interface"
60 +SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz"
61 +HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/"
62 +
63 +LICENSE="GPL-2"
64 +SLOT="0"
65 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
66 +
67 +RDEPEND="
68 + net-libs/libpcap
69 + sys-libs/ncurses:0=
70 +"
71 +DEPEND="
72 + ${RDEPEND}
73 + virtual/pkgconfig
74 +"
75 +S="${WORKDIR}"/${P/_/}
76 +PATCHES=(
77 + "${FILESDIR}"/${P}-configure.ac.patch
78 + "${FILESDIR}"/${P}-Makefile.am.patch
79 + "${FILESDIR}"/${P}-tsent-set-but-not-used.patch
80 + "${FILESDIR}"/${P}-ip6.arpa.patch
81 + "${FILESDIR}"/${P}-fix-MAC-formatting.patch
82 +)
83 +
84 +src_prepare() {
85 + default
86 + # bug 490168
87 + cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die
88 +
89 + eautoreconf
90 +}
91 +
92 +src_install() {
93 + dosbin iftop
94 + doman iftop.8
95 +
96 + dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc
97 +}