summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/iftop
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/iftop')
-rw-r--r--net-analyzer/iftop/Manifest1
-rw-r--r--net-analyzer/iftop/files/ax_pthread.m4317
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch11
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch278
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch46
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch55
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch12
-rw-r--r--net-analyzer/iftop/files/iftoprc59
-rw-r--r--net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild46
-rw-r--r--net-analyzer/iftop/iftop-1.0_pre4.ebuild43
-rw-r--r--net-analyzer/iftop/metadata.xml5
11 files changed, 873 insertions, 0 deletions
diff --git a/net-analyzer/iftop/Manifest b/net-analyzer/iftop/Manifest
new file mode 100644
index 000000000000..616233396884
--- /dev/null
+++ b/net-analyzer/iftop/Manifest
@@ -0,0 +1 @@
+DIST iftop-1.0pre4.tar.gz 204665 SHA256 f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97 SHA512 abd74e8025bb82fef9ebab4997b1d018201a523d47c0128128ca37797490046538d74758dc4471735c22b890e5bd238ad6b2a30776d465138ede367cdd263d22 WHIRLPOOL 5c02d8d23fe3d73ced4c0e8626226323f2266ef16ef00dc2b00059f4a213066c22c366f9458fe516da05a59830acd581ee23f17dc92e097ca720b220e88103cb
diff --git a/net-analyzer/iftop/files/ax_pthread.m4 b/net-analyzer/iftop/files/ax_pthread.m4
new file mode 100644
index 000000000000..6d400ed4e8e2
--- /dev/null
+++ b/net-analyzer/iftop/files/ax_pthread.m4
@@ -0,0 +1,317 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads. It
+# sets the PTHREAD_LIBS output variable to the threads library and linker
+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+# flags that are needed. (The user can also force certain compiler
+# flags/libs to be tested by setting these environment variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise). (This
+# is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these flags,
+# but also link it with them as well. e.g. you should link with
+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+# If you are only building threads programs, you may wish to use these
+# variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+# PTHREAD_CFLAGS.
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+# is not found. If ACTION-IF-FOUND is not specified, the default action
+# will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or if
+# you have any other suggestions or comments. This macro was based on work
+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
+# grateful for the helpful feedback of numerous users.
+#
+# Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 20
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
+ AC_MSG_RESULT($ax_pthread_ok)
+ if test x"$ax_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case ${host_os} in
+ solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+ ;;
+
+ darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
+ ;;
+esac
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$flag])
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+ static void routine(void *a) { a = 0; }
+ static void *start_routine(void *a) { return a; }],
+ [pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */])],
+ [ax_pthread_ok=yes],
+ [])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($ax_pthread_ok)
+ if test "x$ax_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [int attr = $attr; return attr /* ; */])],
+ [attr_name=$attr; break],
+ [])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ fi
+
+ AC_MSG_CHECKING([if more special flags are required for pthreads])
+ flag=no
+ case ${host_os} in
+ aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+ osf* | hpux*) flag="-D_REENTRANT";;
+ solaris*)
+ if test "$GCC" = "yes"; then
+ flag="-D_REENTRANT"
+ else
+ flag="-mt -D_REENTRANT"
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT(${flag})
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+ ax_cv_PTHREAD_PRIO_INHERIT, [
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
+ [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+ [ax_cv_PTHREAD_PRIO_INHERIT=no])
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+ AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != xyes; then
+ case $host_os in
+ aix*)
+ AS_CASE(["x/$CC"],
+ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+ [#handle absolute path differently from PATH based program lookup
+ AS_CASE(["x$CC"],
+ [x/*],
+ [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+ [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ ax_pthread_ok=no
+ $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch
new file mode 100644
index 000000000000..0b1308ab36c5
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,7 +25,7 @@ iftop_SOURCES = addr_hash.c edline.c hash.c iftop.c ns_hash.c \
+ # addrs_ioctl.c addrs_dlpi.c dlcommon.c \
+ # stringmap.c cfgfile.c
+
+-
++iftop_LDADD = $(ncurses_LIBS)
+
+ noinst_HEADERS = addr_hash.h ether.h ethertype.h extract.h hash.h iftop.h \
+ integers.h ip.h llc.h ns_hash.h options.h resolver.h \
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch
new file mode 100644
index 000000000000..ff13fd89fb57
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch
@@ -0,0 +1,278 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,10 +51,10 @@
+ forking use the REALLY SUCKY forking resolver.
+ guess run experiments to guess a
+ reasonable value. Only works if you
+- aren't cross-compiling. This
++ are not cross-compiling. This
+ is the default. guess will
+ either select netdb or netdb_1thread.
+- none don't do name resolution.],
++ none do not do name resolution.],
+ [resolver=$withval],
+ [resolver=guess])
+
+@@ -98,45 +98,14 @@
+ AC_CHECK_FUNCS(inet_aton inet_pton)
+
+ dnl
+-dnl Find integers of known physical size. This is a pain in the arse because
+-dnl we can't use AC_CHECK_SIZEOF to find the original variables, since that
+-dnl function doesn't permit us to include a header file. Sigh.
+-dnl
+-
+-for type in u_int8_t u_int16_t u_int32_t ; do
+- AC_MSG_CHECKING([size of $type])
+- AC_RUN_IFELSE([AC_LANG_SOURCE([
+-#include <sys/types.h>
+-#include <stdio.h>
+-int main() {
+- $type dummy;
+- FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
+- fprintf(f, "%d\n", sizeof($1));
+- exit(0);
+-}
+- ])], [
+- x=`cat conftestval`
+- eval "size_$type=$x"
+- AC_MSG_RESULT([$x])
+- ], [
+- eval "size_$type=0"
+- AC_MSG_RESULT([unknown type])
+- ], [
+- eval "size_$type=0"
+- AC_MSG_RESULT([can't determine when cross-compiling])
+- ])
+-done
+-
+-dnl Groan. Have to do things this way so that autoheader can do its thing....
+-AC_DEFINE_UNQUOTED(SIZEOF_U_INT8_T, [$size_u_int8_t], [size of u_int8_t])
+-AC_DEFINE_UNQUOTED(SIZEOF_U_INT16_T, [$size_u_int16_t], [size of u_int16_t])
+-AC_DEFINE_UNQUOTED(SIZEOF_U_INT32_T, [$size_u_int32_t], [size of u_int32_t])
++dnl Find integers of known physical size.
++dnl
+
+-dnl If we already have these types, don't piss about any more....
++AC_CHECK_SIZEOF([u_int8_t])
++AC_CHECK_SIZEOF([u_int16_t])
++AC_CHECK_SIZEOF([u_int32_t])
+
+-if test $size_u_int8_t != 1 || test $size_u_int16_t != 2 || test $size_u_int32_t != 4 ; then
+-dnl XXXif test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then
++if test $ac_cv_sizeof_u_int8_t = 0 || test $ac_cv_sizeof_u_int16_t = 0 || test $ac_cv_sizeof_u_int32_t = 0; then
+ do_int_types=1
+ AC_CHECK_HEADERS(
+ stdint.h dnl C99
+@@ -154,12 +123,16 @@
+ fi
+ fi
+
++AC_DEFINE_UNQUOTED([SIZEOF_U_INT8_T],[$ac_cv_sizeof_u_int8_t],[size of u_int8_t])
++AC_DEFINE_UNQUOTED([SIZEOF_U_INT16_T],[$ac_cv_sizeof_u_int16_t],[size of u_int16_t])
++AC_DEFINE_UNQUOTED([SIZEOF_U_INT32_T],[$ac_cv_sizeof_u_int32_t],[size of u_int32_t])
++
+ dnl
+ dnl Name resolution.
+ dnl
+ dnl This is complicated because we need some sort of reentrant mechanism for
+ dnl name resolution. Naturally, UNIX vendors have come up with a variety of
+-dnl incompatible schemes for this, many of which don't work at all.
++dnl incompatible schemes for this, many of which do not work at all.
+ dnl
+
+ dnl First, the default resolver, which uses getnameinfo or gethostbyaddr_r. If
+@@ -175,7 +148,7 @@
+ use_getnameinfo=0
+ AC_SEARCH_LIBS(getnameinfo, [nsl], [use_getnameinfo=1])
+
+- dnl XXX For the moment, don't use getnameinfo, since it isn't actually
++ dnl XXX For the moment, do not use getnameinfo, since it is not actually
+ dnl thread safe on, e.g., NetBSD.
+ use_getnameinfo=0
+
+@@ -192,7 +165,7 @@
+ dnl Can use gethostbyaddr_r?
+ AC_SEARCH_LIBS(gethostbyaddr_r, [nsl], , [resolver=guess])
+ if test x$resolver = xguess && test x$specified_resolver != xguess ; then
+- dnl They wanted gethostbyaddr_r, but they can't have it, so stop.
++ dnl They wanted gethostbyaddr_r, but they cannot have it, so stop.
+ AC_MSG_ERROR([no library defines gethostbyaddr_r])
+ fi
+ fi
+@@ -216,15 +189,15 @@
+ AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT, 1,
+ [8-argument gethostbyaddr_r returns int])], [
+ dnl Neither.
+- AC_MSG_RESULT([don't know how])
++ AC_MSG_RESULT([do not know how])
+ resolver=guess])])
+ if test x$resolver = xguess && test x$specified_resolver != xguess ; then
+- dnl They wanted gethostbyaddr_r, but they can't have it, so stop.
++ dnl They wanted gethostbyaddr_r, but they cannot have it, so stop.
+ AC_MSG_ERROR([gethostbyaddr_r has no known calling convention])
+ fi
+ fi
+
+-dnl If we still want to do gethostbyaddr_r, and we aren't
++dnl If we still want to do gethostbyaddr_r, and we are not
+ dnl cross-compiling, test it.
+ if test x$resolver = xnetdb ; then
+ if test x$ghba_args = x8 ; then
+@@ -237,13 +210,13 @@
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ resolver=guess],
+- [AC_MSG_RESULT([can't test because we are cross-compiling])])
++ [AC_MSG_RESULT([cannot test because we are cross-compiling])])
+ if test x$resolver = xguess ; then
+ if test x$specified_resolver = xguess ; then
+- AC_MSG_RESULT([gethostbyaddr_r doesn't work, so we'll try something else])
++ AC_MSG_RESULT([gethostbyaddr_r does not work, so we will try something else])
+ else
+- dnl They wanted gethostbyaddr_r, but it doesn't work, so stop.
+- AC_MSG_ERROR([gethostbyaddr_r doesn't work])
++ dnl They wanted gethostbyaddr_r, but it does not work, so stop.
++ AC_MSG_ERROR([gethostbyaddr_r does not work])
+ fi
+ fi
+ fi
+@@ -260,11 +233,11 @@
+ AC_SEARCH_LIBS(ares_init, [ares], [
+ AC_DEFINE(USE_ARES, 1, [use ARES for name resolution])
+ ], [
+- dnl They asked for ares, but we can't give it to them, so stop.
+- AC_MSG_ERROR([can't find ARES. Re-run configure and ask for a different resolver.])])
++ dnl They asked for ares, but we cannot give it to them, so stop.
++ AC_MSG_ERROR([cannot find ARES. Re-run configure and ask for a different resolver.])])
+ fi
+
+-dnl Last thing to try if we haven't decided yet is netdb_1thread.
++dnl Last thing to try if we have not decided yet is netdb_1thread.
+ if test x$resolver = xguess ; then
+ resolver=netdb_1thread
+ fi
+@@ -317,16 +290,16 @@
+
+ if test $foundpcaph = 0 ; then
+ AC_MSG_RESULT([no idea])
+- AC_MSG_ERROR([can't find pcap.h
+- You're not going to get very far without libpcap.])
++ AC_MSG_ERROR([cannot find pcap.h
++ You are not going to get very far without libpcap.])
+ else
+ dnl assume that -lpcap is under $test_prefix/lib
+ if test x$test_prefix != x ; then
+ LDFLAGS="$LDFLAGS -L$test_prefix/lib"
+ fi
+ AC_CHECK_LIB(pcap, pcap_open_live, , [
+- AC_MSG_ERROR([can't find libpcap
+- You're not going to get very far without libpcap.])
++ AC_MSG_ERROR([cannot find libpcap
++ You are not going to get very far without libpcap.])
+ ])
+ fi
+
+@@ -337,79 +310,50 @@
+ ])
+
+ if test $foundpcap = 0 ; then
+- AC_MSG_ERROR([can't find pcap.h
+- You're not going to get very far without libpcap.])
++ AC_MSG_ERROR([cannot find pcap.h
++ You are not going to get very far without libpcap.])
+ fi
+
+ dnl
+ dnl Curses. Really, we need ncurses or something similarly advanced, since
+ dnl we use the (apparently obscure) mvchgat function. Unfortunately, there's
+-dnl a solid chance that mvchgat is a macro, so we can't just use
++dnl a solid chance that mvchgat is a macro, so we cannot just use
+ dnl AC_SEARCH_LIBS....
+ dnl
+
+-AC_MSG_CHECKING([for a curses library containing mvchgat])
+-oldLIBS=$LIBS
+-for curseslib in ncursesw curses ncurses ; do
+- LIBS="$oldLIBS -l$curseslib"
+- AC_TRY_LINK([
++PKG_PROG_PKG_CONFIG()
++
++PKG_CHECK_MODULES([ncurses], [ncursesw], [foundcurseslib="$ncurses_LIBS"], [
++ PKG_CHECK_MODULES([ncurses], [ncurses], [foundcurseslib="$ncurses_LIBS"], [
++ AC_MSG_CHECKING([for a curses library containing mvchgat])
++ oldLIBS=$LIBS
++ for curseslib in ncursesw curses ncurses ; do
++ LIBS="$oldLIBS -l$curseslib"
++ AC_TRY_LINK([
+ #include <$curseslib.h>
+ ], [
+ mvchgat(0, 0, 1, A_REVERSE, 0, NULL)
+ ], [
+- foundcurseslib=$curseslib
++ foundcurseslib=-l$curseslib
+ break
+ ])
+-done
+-
+-if test x$foundcurseslib = x ; then
+- AC_MSG_RESULT([none found])
++ done
++ ],
+ AC_MSG_ERROR([Curses! Foiled again!
+- (Can't find a curses library supporting mvchgat.)
++ (Cannot find a curses library supporting mvchgat.)
+ Consider installing ncurses.])
+-else
+- AC_MSG_RESULT([-l$foundcurseslib])
+-fi
+-
++ )
++])
+
+ dnl
+ dnl POSIX threads. Different systems like different combinations of flags,
+ dnl libraries, etc. We use a test program to figure this stuff out.
+ dnl
+
+-AC_MSG_CHECKING([POSIX threads compilation])
+-thrfail=1
+-oldCFLAGS=$CFLAGS
+-oldLIBS=$LIBS
+-for flag in "" -mt -pthread -thread ; do
+- CFLAGS="$oldCFLAGS $flag"
+- for lib in "" -lpthread "-lpthread -lposix4" ; do
+- LIBS="$oldLIBS $lib"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], [
+- foundthrlib=$lib
+- foundthrflag=$flag
+- thrfail=0
+- break
+- ])
+- done
+- if test $thrfail = 0 ; then
+- break
+- fi
+-done
+-
+-if test $thrfail = 1 ; then
+- AC_MSG_RESULT([no idea])
+- AC_MSG_ERROR([can't figure out how to compile with POSIX threads
+- If your system actually supports POSIX threads, this means we've messed up.])
+-fi
+-
+-AC_MSG_RESULT([CFLAGS=$foundthrflag and LIBS=$foundthrlib])
+-AC_MSG_CHECKING([POSIX threads usability])
+-AC_RUN_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR(
+- [it fails. We probably guessed the wrong CFLAGS.])],
+- [AC_MSG_RESULT([can't test because we are cross-compiling])])
++AX_PTHREAD(
++ [LIBS="$PTHREAD_LIBS $LIBS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"],
++ AC_MSG_ERROR([Could not find out how to enable POSIX threads]))
+
+ dnl
+ dnl Are we on a system (like Solaris) that requires promiscuous mode in order to
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch
new file mode 100644
index 000000000000..ce04c46a65ef
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch
@@ -0,0 +1,46 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -383,39 +383,10 @@
+ dnl libraries, etc. We use a test program to figure this stuff out.
+ dnl
+
+-AC_MSG_CHECKING([POSIX threads compilation])
+-thrfail=1
+-oldCFLAGS=$CFLAGS
+-oldLIBS=$LIBS
+-for flag in "" -mt -pthread -thread ; do
+- CFLAGS="$oldCFLAGS $flag"
+- for lib in "" -lpthread "-lpthread -lposix4" ; do
+- LIBS="$oldLIBS $lib"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], [
+- foundthrlib=$lib
+- foundthrflag=$flag
+- thrfail=0
+- break
+- ])
+- done
+- if test $thrfail = 0 ; then
+- break
+- fi
+-done
+-
+-if test $thrfail = 1 ; then
+- AC_MSG_RESULT([no idea])
+- AC_MSG_ERROR([can't figure out how to compile with POSIX threads
+- If your system actually supports POSIX threads, this means we've messed up.])
+-fi
+-
+-AC_MSG_RESULT([CFLAGS=$foundthrflag and LIBS=$foundthrlib])
+-AC_MSG_CHECKING([POSIX threads usability])
+-AC_RUN_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR(
+- [it fails. We probably guessed the wrong CFLAGS.])],
+- [AC_MSG_RESULT([can't test because we are cross-compiling])])
++AX_PTHREAD(
++ [LIBS="$PTHREAD_LIBS $LIBS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"],
++ AC_MSG_ERROR([Could not find out how to enable POSIX threads]))
+
+ dnl
+ dnl Are we on a system (like Solaris) that requires promiscuous mode in order to
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch
new file mode 100644
index 000000000000..bb14b3c6ca47
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch
@@ -0,0 +1,55 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,7 +25,7 @@ iftop_SOURCES = addr_hash.c edline.c hash.c iftop.c ns_hash.c \
+ # addrs_ioctl.c addrs_dlpi.c dlcommon.c \
+ # stringmap.c cfgfile.c
+
+-
++iftop_LDADD = $(ncurses_LIBS)
+
+ noinst_HEADERS = addr_hash.h ether.h ethertype.h extract.h hash.h iftop.h \
+ integers.h ip.h llc.h ns_hash.h options.h resolver.h \
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,29 +348,27 @@
+ dnl AC_SEARCH_LIBS....
+ dnl
+
+-AC_MSG_CHECKING([for a curses library containing mvchgat])
+-oldLIBS=$LIBS
+-for curseslib in ncursesw curses ncurses ; do
+- LIBS="$oldLIBS -l$curseslib"
+- AC_TRY_LINK([
++PKG_CHECK_MODULES([ncurses], [ncursesw], [foundcurseslib="$ncurses_LIBS"], [
++ PKG_CHECK_MODULES([ncurses], [ncurses], [foundcurseslib="$ncurses_LIBS"], [
++ AC_MSG_CHECKING([for a curses library containing mvchgat])
++ oldLIBS=$LIBS
++ for curseslib in ncursesw curses ncurses ; do
++ LIBS="$oldLIBS -l$curseslib"
++ AC_TRY_LINK([
+ #include <$curseslib.h>
+ ], [
+ mvchgat(0, 0, 1, A_REVERSE, 0, NULL)
+ ], [
+- foundcurseslib=$curseslib
++ foundcurseslib=-l$curseslib
+ break
+ ])
+-done
+-
+-if test x$foundcurseslib = x ; then
+- AC_MSG_RESULT([none found])
++ done
++ ],
+ AC_MSG_ERROR([Curses! Foiled again!
+ (Can't find a curses library supporting mvchgat.)
+ Consider installing ncurses.])
+-else
+- AC_MSG_RESULT([-l$foundcurseslib])
+-fi
+-
++ )
++])
+
+ dnl
+ dnl POSIX threads. Different systems like different combinations of flags,
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch
new file mode 100644
index 000000000000..5e12b341fe97
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch
@@ -0,0 +1,12 @@
+--- a/ui_common.c
++++ b/ui_common.c
+@@ -263,9 +263,6 @@
+ } u_screen_line = { &screen_line };
+ addr_pair ap;
+ int i;
+- int tsent, trecv;
+- tsent = trecv = 0;
+-
+
+ ap = *(addr_pair*)n->key;
+
diff --git a/net-analyzer/iftop/files/iftoprc b/net-analyzer/iftop/files/iftoprc
new file mode 100644
index 000000000000..83b136952734
--- /dev/null
+++ b/net-analyzer/iftop/files/iftoprc
@@ -0,0 +1,59 @@
+
+# Sets the network interface to if.
+# interface: if
+interface: ppp0
+
+# Controls reverse lookup of IP addresses.
+# dns-resolution: (yes|no)
+dns-resolution: yes
+
+# Controls conversion of port numbers to service names.
+# port-resolution: (yes|no)
+port-resolution: yes
+
+# Sets the filter code to bpf.
+# filter-code: bpf
+
+# Controls display of bar graphs.
+# show-bars: (yes|no)
+show-bars: yes
+
+# Puts the interface into promiscuous mode.
+# promiscuous: (yes|no)
+
+# Controls display of port numbers.
+# port-display: (off|source-only|destination-only|on)
+port-display: on
+
+# Hides source host names.
+# hide-source: (yes|no)
+
+# Hides destination host names.
+# hide-destination: (yes|no)
+
+# Use bytes for bandwidth display, rather than bits.
+# use-bytes: (yes|no)
+use-bytes: yes
+
+# Sets which column is used to sort the display.
+# sort: (2s|10s|40s|source|destination)
+
+# Controls the appearance of each item in the display.
+# line-display: (two-line|one-line-both|one-line-sent|one-line-received)
+
+# Shows cummulative total for each item.
+# show-totals: (yes|no)
+show-totals: yes
+
+# Use a logarithmic scale for bar graphs.
+# log-scale: (yes|no)
+
+# Fixes the maximum for the bar graph scale to bw, e.g. "10M"
+# max-bandwidth: bw
+
+# Defines an IP network boundary for determining packet direction.
+# net-filter: net/mask
+
+# Sets a regular expression to filter screen output.
+# screen-filter: regexp
+
diff --git a/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild b/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild
new file mode 100644
index 000000000000..1bf3dddfb841
--- /dev/null
+++ b/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="display bandwidth usage on an interface"
+SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz"
+HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}"/${P/_/}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-configure.ac.patch \
+ "${FILESDIR}"/${P}-Makefile.am.patch \
+ "${FILESDIR}"/${P}-tsent-set-but-not-used.patch
+
+ # bug 490168
+ cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die
+
+ eautoreconf
+}
+
+src_install() {
+ dosbin iftop
+ doman iftop.8
+
+ dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc
+}
diff --git a/net-analyzer/iftop/iftop-1.0_pre4.ebuild b/net-analyzer/iftop/iftop-1.0_pre4.ebuild
new file mode 100644
index 000000000000..147036bace72
--- /dev/null
+++ b/net-analyzer/iftop/iftop-1.0_pre4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="display bandwidth usage on an interface"
+SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz"
+HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}"/${P/_/}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+
+ # bug 490168
+ cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die
+ epatch "${FILESDIR}"/${P}-pthread.patch
+
+ eautoreconf
+}
+
+src_install() {
+ dosbin iftop
+ doman iftop.8
+
+ dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc
+}
diff --git a/net-analyzer/iftop/metadata.xml b/net-analyzer/iftop/metadata.xml
new file mode 100644
index 000000000000..43ff75467369
--- /dev/null
+++ b/net-analyzer/iftop/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>