diff options
author | Marcelo Góes <vanquirius@gentoo.org> | 2008-05-14 02:02:08 +0000 |
---|---|---|
committer | Marcelo Góes <vanquirius@gentoo.org> | 2008-05-14 02:02:08 +0000 |
commit | f705de49e139e0dd5863896d8c0bc0e114650f6f (patch) | |
tree | b205f875901f742b919253807a78e7f8c078d1d2 /net-analyzer/tcpstat | |
parent | Fix DEPEND-RDEPEND for bug 211145. Thanks to José Manuel Ferrer Ortiz <jmfo1... (diff) | |
download | historical-f705de49e139e0dd5863896d8c0bc0e114650f6f.tar.gz historical-f705de49e139e0dd5863896d8c0bc0e114650f6f.tar.bz2 historical-f705de49e139e0dd5863896d8c0bc0e114650f6f.zip |
Do not build tcpprof so that we do not depend on db-1.85-r3. Make ipv6 support
optional, install catpcap and packetdump. Fixes bug 221815, thanks to Peter Alfredsen
<peter.alfredsen at gmail dot com>.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'net-analyzer/tcpstat')
-rw-r--r-- | net-analyzer/tcpstat/ChangeLog | 12 | ||||
-rw-r--r-- | net-analyzer/tcpstat/Manifest | 14 | ||||
-rw-r--r-- | net-analyzer/tcpstat/files/tcpstat-1.5-db.patch | 171 | ||||
-rw-r--r-- | net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild | 37 |
4 files changed, 231 insertions, 3 deletions
diff --git a/net-analyzer/tcpstat/ChangeLog b/net-analyzer/tcpstat/ChangeLog index e8907a92128d..31f2230583f4 100644 --- a/net-analyzer/tcpstat/ChangeLog +++ b/net-analyzer/tcpstat/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/tcpstat -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpstat/ChangeLog,v 1.18 2007/02/20 00:42:24 jokey Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpstat/ChangeLog,v 1.19 2008/05/14 02:02:08 vanquirius Exp $ + +*tcpstat-1.5-r1 (13 May 2008) + + 13 May 2008; Marcelo Goes <vanquirius@gentoo.org> + +files/tcpstat-1.5-db.patch, +tcpstat-1.5-r1.ebuild: + Do not build tcpprof so that we do not depend on db-1.85-r3. Make ipv6 + support optional, install catpcap and packetdump. Fixes bug 221815, thanks + to Peter Alfredsen <peter.alfredsen at gmail dot com>. 20 Feb 2007; Markus Ullmann <jokey@gentoo.org> ChangeLog: Redigest for Manifest2 diff --git a/net-analyzer/tcpstat/Manifest b/net-analyzer/tcpstat/Manifest index 6048739815ee..a19a170353c4 100644 --- a/net-analyzer/tcpstat/Manifest +++ b/net-analyzer/tcpstat/Manifest @@ -1,4 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX tcpstat-1.5-db.patch 5671 RMD160 72a096cf3fbd2a31095539aa2be4a1e7f007b237 SHA1 ac8bb58280c81d7500bc8c774b1ad759d2801ef4 SHA256 fe9ecf790c2727ff952190cee4ceec29e4ae6089a5b88184e4c8c530c4812206 DIST tcpstat-1.5.tar.gz 93102 RMD160 01aafe967d2ddb78d1517391e67019596ae65465 SHA1 3881edafe2a45c807a6f197792251036c599ec50 SHA256 46fde9458cc5678264b0c5f2197f84ada9101951197fdeec5f04b0801fcff0ba +EBUILD tcpstat-1.5-r1.ebuild 979 RMD160 57775235a794dbceca68f1cc79ab7691f06adfad SHA1 fec39efff0e257cdb9c27c2a34cd34715bc689ad SHA256 4958c3416928415967818c69ece570b8d07892495f1298c0e07cb90ed9d96a73 EBUILD tcpstat-1.5.ebuild 665 RMD160 0042525714f6f87c3f1183e7d3df992642b0e943 SHA1 1d71ca8f183938cf2757bae98f049c7cea411a9d SHA256 b5ddbbf6f8a8fa8e78ee8e8ac343c2de474f7155fcb614d28243eb84a50cec3e -MISC ChangeLog 2157 RMD160 e21546948d869060f5b680fcd46ecd65bb4dc958 SHA1 decd9bbb2ec21d43d59ef09a4c82b39da57a302a SHA256 44bbc4dc00f31ddd071f256b48ff2bd0cbd62f365f4736565470ec0823f398db +MISC ChangeLog 2508 RMD160 fde5bc446f03ffe3e739a654d4c0420cb8cbebe8 SHA1 7c2e8c335d71775d0f748162aaa433d8652110f6 SHA256 ad79f83119ec9c10cc4c4f5bcda83e95a5870ce7b06f1b1e5cb845e14beb7a86 MISC metadata.xml 159 RMD160 28e799fe0fd02aaab9d4bbe5595f133101606f5b SHA1 9f5df3eabd621951a959cc8e0e2e0d352cd1fe1e SHA256 b75c711bd971e46f0ec957e833c60879b0c5023e0bb94409a6255781b69f6dc6 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkgqHkEACgkQ0axuTq83etrbqQCfacqrGOgRvsHvKee5FoOX/4aq +c5oAn30tvJDdwyHiNImi8gia/UL1xggM +=vzxW +-----END PGP SIGNATURE----- diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch new file mode 100644 index 000000000000..1e3d146bae4b --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch @@ -0,0 +1,171 @@ +diff -NrU5 tcpstat-1.5.orig/configure.in tcpstat-1.5/configure.in +--- tcpstat-1.5.orig/configure.in 2002-07-27 02:50:46.000000000 +0200 ++++ tcpstat-1.5/configure.in 2008-05-12 13:01:52.000000000 +0200 +@@ -84,15 +84,26 @@ + dnl ####################### + dnl Checks for header files + dnl ####################### + AC_HEADER_STDC + AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h netinet/ip6.h) ++AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h) + + dnl BSD/OS Seems to not have a good ethernet header, so we gotta wing it + AC_CHECK_HEADERS(net/if.h net/ethernet.h netinet/if_ether.h net/ppp_defs.h) + ++AC_ARG_ENABLE( ipv6, [ AC_HELP_STRING([--enable-ipv6], [s use IPv6?]) ], ip6=$enableval ) ++if test "$ip6" = "yes" ++then ++ AC_CHECK_HEADER(netinet/ip6.h, , [AC_MSG_ERROR([I couldn't find netinet/ip6.h though you asked for ipv6 support.])] ) ++elif test "$ip6" != "no" ++then ++ AC_CHECK_HEADER(netinet/ip6.h) ++ ++fi ++ ++ + dnl ############################################################# + dnl Checks for typedefs, structures, and compiler characteristics + dnl ############################################################# + AC_C_CONST + AC_TYPE_SIZE_T +@@ -147,34 +158,11 @@ + If you already have... then please rerun configure with the option + --with-pcap-lib=DIR + with "DIR" being where libpcap is found.]) + ]) + +-dnl look for dbopen for tcpprof +-TCPPROF="" +-LD_TCPPROF="" +-AC_CHECK_LIB(c, dbopen, [ TCPPROF=tcpprof ], [ +- AC_CHECK_LIB(db1, dbopen, [ +- TCPPROF=tcpprof +- LD_TCPPROF="-ldb1" +- AC_DEFINE(USE_DB1_LIBRARY, 1, [ Use the sleepycat DB library. ]) +- ], [ +- AC_MSG_WARN([ +- +- *** WARNING *** +- I couldn't locate the Berkeley DB library. The extra utility +- "tcpprof" will not be built. THIS IS OK!!! "tcpstat" will +- continue to be built as if this never happened. +- +- If you wish to use the extra "tcpprof" program, please install +- the Berkeley DB library from: +- ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.gz +- ]) +- ]) +-]) + AC_SUBST(TCPPROF) +-AC_SUBST(LD_TCPPROF) + AC_SUBST(MATHLIB) + + AC_CONFIG_FILES([ + Makefile + doc/Makefile +diff -NrU5 tcpstat-1.5.orig/lib/process.c tcpstat-1.5/lib/process.c +--- tcpstat-1.5.orig/lib/process.c 2002-06-01 08:42:09.000000000 +0200 ++++ tcpstat-1.5/lib/process.c 2008-05-12 12:09:21.000000000 +0200 +@@ -230,12 +230,12 @@ + * calls a user function pointing to the data + * + * XXX: filter is not used. capture_seconds also isn't, but snoop is + * always read from a file. + */ +-int get_snoop_data(char *fname, char *filter, int flags, +- Double capture_seconds, void (*hook)(packet_data *, void **), ++int get_snoop_data(char *fname, char *filter __attribute__((unused)), int flags, ++ Double capture_seconds __attribute__((unused)), void (*hook)(packet_data *, void **), + void **args) { + + u_char *packet; + int fd, len, blen, ret = 0; + struct snoop_file_header fh; +diff -NrU5 tcpstat-1.5.orig/lib/tcpseq.c tcpstat-1.5/lib/tcpseq.c +--- tcpstat-1.5.orig/lib/tcpseq.c 2002-01-02 22:05:55.000000000 +0100 ++++ tcpstat-1.5/lib/tcpseq.c 2008-05-12 12:19:40.000000000 +0200 +@@ -54,11 +54,10 @@ + u_char flags; + struct tcpseq_ha test_ha; + struct tcphdr *tp = NULL; + struct ip *ip; + #ifdef INET6 +- int is_ip6 = 0; + struct ip6_hdr *ip6; + + ip6 = (struct ip6_hdr *) &pd->data.ip6.hdr; + if (is_ip6_packet(pd)) + tp= &(pd->data.ip6.body.tcphdr); +diff -NrU5 tcpstat-1.5.orig/src/catpcap.c tcpstat-1.5/src/catpcap.c +--- tcpstat-1.5.orig/src/catpcap.c 2002-09-18 23:00:29.000000000 +0200 ++++ tcpstat-1.5/src/catpcap.c 2008-05-12 12:15:33.000000000 +0200 +@@ -50,11 +50,11 @@ + if (c == ' ') return c; + if ((u_char)c > 0xa1 && SHOW_HIGH_BIT) return c; + return '.'; + } + +-void proc_pcap(u_char *user, const struct pcap_pkthdr *h, const u_char *p) { ++void proc_pcap(u_char *user __attribute__((unused)), const struct pcap_pkthdr *h, const u_char *p) { + u_int length = h->caplen, i, j, k, step; + u_char *r, *s; + char c; + + r = (u_char *)p; +@@ -90,11 +90,11 @@ + } + /* + * process_file() takes the output of tcpdump, saves packets, and displays + * statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + int run = 1, i; + pcap_t *pd; + char ebuf[PCAP_ERRBUF_SIZE]; + struct bpf_program bpf_prog; + +diff -NrU5 tcpstat-1.5.orig/src/dump.c tcpstat-1.5/src/dump.c +--- tcpstat-1.5.orig/src/dump.c 2002-09-18 23:00:29.000000000 +0200 ++++ tcpstat-1.5/src/dump.c 2008-05-12 12:13:53.000000000 +0200 +@@ -37,21 +37,21 @@ + char filterexpr[BUF_SIZ] = ""; + int get_tcp_flags = 0; + int what_to_show = 0; + int packet_number = 0; + +-void my_hook(packet_data *pd, void **args) { ++void my_hook(packet_data *pd) { + printf("PACKET NUMBER: %d\n", ++packet_number); + print_packet(pd, what_to_show); + printf("-------------------\n"); + } + + /* + * process_file() takes the output of tcpdump, saves packets, and displays + * statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + get_dump_data(fname, filterexpr, get_tcp_flags, + -1.0, my_hook, NULL); + } + + int parse_show_types(char *in) { +diff -NrU5 tcpstat-1.5.orig/src/tcpstat.c tcpstat-1.5/src/tcpstat.c +--- tcpstat-1.5.orig/src/tcpstat.c 2002-07-27 02:42:05.000000000 +0200 ++++ tcpstat-1.5/src/tcpstat.c 2008-05-12 12:16:00.000000000 +0200 +@@ -421,11 +421,11 @@ + } + + /* + * process_file() gets the data, and then displays the statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + void *argv[2]; + statistics stats; + Double x; + + signal(SIGUSR1, catch_signal); diff --git a/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild b/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild new file mode 100644 index 000000000000..265b4bda252f --- /dev/null +++ b/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild,v 1.1 2008/05/14 02:02:08 vanquirius Exp $ + +inherit eutils autotools flag-o-matic + +DESCRIPTION="Reports network interface statistics" +SRC_URI="http://www.frenchfries.net/paul/tcpstat/${P}.tar.gz" +HOMEPAGE="http://www.frenchfries.net/paul/tcpstat/" + +DEPEND="net-libs/libpcap" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" + +IUSE="ipv6" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-db.patch" + eautoreconf +} + +src_compile() { + append-flags -Wall -Wextra + econf $(use_enable ipv6) || die "econf failed" + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "emake install failed" + dobin src/{catpcap,packetdump} || die "dobin failed" + dodoc AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt + newdoc src/README README.src +} |