diff options
Diffstat (limited to 'net-analyzer/iftop')
-rw-r--r-- | net-analyzer/iftop/Manifest | 13 | ||||
-rw-r--r-- | net-analyzer/iftop/files/ax_pthread.m4 | 317 | ||||
-rw-r--r-- | net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch | 11 | ||||
-rw-r--r-- | net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch | 278 | ||||
-rw-r--r-- | net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch | 46 | ||||
-rw-r--r-- | net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch | 55 | ||||
-rw-r--r-- | net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch | 12 | ||||
-rw-r--r-- | net-analyzer/iftop/files/iftoprc | 59 | ||||
-rw-r--r-- | net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild | 45 | ||||
-rw-r--r-- | net-analyzer/iftop/iftop-1.0_pre4.ebuild | 42 | ||||
-rw-r--r-- | net-analyzer/iftop/metadata.xml | 8 |
11 files changed, 886 insertions, 0 deletions
diff --git a/net-analyzer/iftop/Manifest b/net-analyzer/iftop/Manifest new file mode 100644 index 000000000000..c687b06d8c92 --- /dev/null +++ b/net-analyzer/iftop/Manifest @@ -0,0 +1,13 @@ +AUX ax_pthread.m4 12983 SHA256 8cab55885c9839deded96f0afedb7f20f9833d3a51c148f01049820d81211516 SHA512 93c7ba3bb00712308de95273563f41814d05a6650ae2eec25f2b198f757b7f0206ae2e5679ff436da939be9bd962f37317978759ac08c1d14df0beb03440f84a WHIRLPOOL 73219045ad2e38027e104e2734e3df773f67263e3f570d47cb0ea7d7c0662ed746119b5e550406b8a7fc59bbdb0a27d8da975f24b330379f992d543b638fd162 +AUX iftop-1.0_pre4-Makefile.am.patch 378 SHA256 919b949c4bf57347c91f376e49f4974c31435c60c860e6c12410604345259825 SHA512 c7a81669de83701054493ee0f9979da8bfa481bd0769a501364598889cfb5aa762473e5099904ee13dad9052bfdd27913306df8ad4a91132532ac874504321fa WHIRLPOOL 90ad054bd4c6d4b32ec103706eab765530c80a4e406eab8e5f7ad1028a6fe318e73223b1809ef3261d4b3de996df4d0368433332438d7fce2114466c0fbbcf40 +AUX iftop-1.0_pre4-configure.ac.patch 9916 SHA256 2a2e0566eb87f061f4d3291f1376f95b9c8cc97cf4b3da5136272396e0b30078 SHA512 5b83cdb69805d3ed8b188b1390d1d536dc99732312fa49951fad38810c7eb9c931d04daaaea7152d5289352dd3d167907ac5a25a994e4b1584b7b5a578fc0698 WHIRLPOOL 795a043cacc551ddcfa21c172d72fd5bab53fe845b1f13dde227b79b005ca5f4f69592e4b18c1a7d661d7ef41c40cb5e8e9d59febf51f5a132b5e765450aab15 +AUX iftop-1.0_pre4-pthread.patch 1462 SHA256 ad36fa74aaf72c2e79775fae8f26386c0436a39ac032d3ffd72f4ef72cd4f6b7 SHA512 0befb38a673d826f25319517d64e4aecea641cdc8626ab51bd468dc0e2f23c779854fbfd9e7cfe51e30ecdf04e3c831fc793ab5e402df3c8153044c679add2b8 WHIRLPOOL 4e486cfd9a55313c872857a3e04bc76ce0e4c9817b53411135c3c54f50ecf535ca11201f9a33537f69922abb775a2c74c617f844ebd2f61e013879cc1b9776ea +AUX iftop-1.0_pre4-tinfo.patch 1560 SHA256 1040d38d427c1be3c92683d22d4eab025b553f3379a440e31989b9ab23a1b0c6 SHA512 d47095fdc65f0dea60471d0c927ab7bf4d51129826bfbf1cc95233054a8d17d36de7e86042c7d2ac0faa0b27f3ced169b5063cc8d36dcf78c548a920ae59f4e2 WHIRLPOOL f629c47a83fcb7971841b37a0cab9e3d1c79b874be4a3780da1684dfabba3c6f22e9a64918579874c47d84ffa5a06e26b89febaaafd27a3c211ff50dcb40b112 +AUX iftop-1.0_pre4-tsent-set-but-not-used.patch 229 SHA256 d59b0674109223781758f47a28aca6d3c7a8b22c51da0adef40fd8925a12a015 SHA512 06d26d9497c6afc6b7eb5db508def08c8945408e89127f3938667973f8a8b7884dc0e7b005c115a7acd66d62107de5d47d49a869b89f25f24dd999161b0fb0bf WHIRLPOOL 708e4d01e378e6928abfff6c506229e9a220e3f89f9526ec57bd4405f8654abdaf092a40d417cd04644371ed385d59d09b3a435538565415f02625a2849aa4e7 +AUX iftoprc 1391 SHA256 f21c0324774c4b6635359e4de76d13ad6bafdebdcbb29df9f986cc47d3569fa2 SHA512 01373add0177399e7cf4ae0ecba893fdd9c73bad5243478b4ac9ac5e936647738a22906ee1e8b22b51d541cc4150d0e0619f134666a1e3d0cb78a59a5c04b95b WHIRLPOOL 6dfc9099bf5d906844fce63b8aac8326535e0684cf5c26f13a39b9a7df8120dbd1f3bd246e81990f11cc4af2a3e0434958b072f4a63db66f6ae22fff65003eea +DIST iftop-1.0pre4.tar.gz 204665 SHA256 f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97 SHA512 abd74e8025bb82fef9ebab4997b1d018201a523d47c0128128ca37797490046538d74758dc4471735c22b890e5bd238ad6b2a30776d465138ede367cdd263d22 WHIRLPOOL 5c02d8d23fe3d73ced4c0e8626226323f2266ef16ef00dc2b00059f4a213066c22c366f9458fe516da05a59830acd581ee23f17dc92e097ca720b220e88103cb +EBUILD iftop-1.0_pre4-r2.ebuild 943 SHA256 789638117cce265ff59a951f8aafd1bdc87e7f93bd5053e327c85b8505f78571 SHA512 1893bee7314377599cb210dbda81fae8b81b6e0518833926b78cdf2045c88ef1c5b1bccb8d189d8281b71497c64c1b8f225850b68607cd9df88e4e6f497a0989 WHIRLPOOL c1378bf6f522c0dbef654315c47ebfe50b36821967cc6c220f93f75bf030622e99a3b603ca13f3f4a665f018d047f25eac6f509f2b7e7408757f28a950f61228 +EBUILD iftop-1.0_pre4.ebuild 878 SHA256 58378d5f109cbedeebea803d5e85ed5c8de658e6a863c70b35e1c88e7bee5f84 SHA512 343e55b2ce782d9c7e15d9c0e12620c16ae222a5666258215eac083f6a87721fa64ecadfaa83b39bf691b65925ed11f82c6044421f751da5fc2bf7a3bff8705c WHIRLPOOL 34475732003a44e2c1a484990281dbd26875c2dc13ae7bc43951919e8b611ec0b2a60440511639399821be75fea9c406c7c3f4709d93934b3ccb84fcb974bbd7 +MISC ChangeLog 3258 SHA256 04ccb32842470adcac63bcba948137df2f0b782639e542f161ccc2b5dd404652 SHA512 e53e5f2566604a979b4edfe5cc41e22940bfdfe172545e6096b0129e272702b0b4bb8ba704ecb2798c5256c393ffde9a6412c1106fb0fdae8f9b2c44f371c0d4 WHIRLPOOL 54609ee797acd3a7b807d46866b43c374c949e5edb08f6d8359cc507c1fd9726df7838ea88f54ab450dfd95a74774cdc09514c9c723e90e912fe549b4f2f7343 +MISC ChangeLog-2015 10127 SHA256 9fe81554c18a310b194c6e780f805903545e811adeb88287ded62680a0d9070f SHA512 c29bd935ec5a2ae353af752cf9309109e5b5375e5bac18013eb7f975b9524218534c434073f1f8f89c96e271b4c4fa1649a4a90d25f9f0dbc47e8161fe018e9b WHIRLPOOL 2bc88b3bfb9ea190e323e5a12712b29a7f7a8cca367b95f674e393f79b83ebc232d9488f4a921d6660fe61c7edd1003a618389e6957106a2bd5ed093fd6bfdec +MISC metadata.xml 286 SHA256 61b7f36c3fb4ce2345ee3017334a6013dd52429ba107768abc2c146629e84dcd SHA512 cfd1ca7999686b831b0b459f5b06ea80fd28b4f24d3404a8ad90bb4d6461a011f6a2b338ebbf45c2eac621ec828dcc397b26c2ae82068e5b703271a85c76e760 WHIRLPOOL bb6b105c081b12e37fbf26bc041e829ef7ab8ba855b96f040479ca85ad9633b8e83c7be4afa686838991ebf358ad8cf78c1a79fd54ad51f7928aaa7a63f0e5bb 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..bcbf844fda31 --- /dev/null +++ b/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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:0= +" +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..84f5ff4d23af --- /dev/null +++ b/net-analyzer/iftop/iftop-1.0_pre4.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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:0=" +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..789a44405524 --- /dev/null +++ b/net-analyzer/iftop/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> +</pkgmetadata> |