diff options
author | Jeroen Roovers <jer@gentoo.org> | 2010-09-16 16:31:59 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2010-09-16 16:31:59 +0000 |
commit | 9bad1fd881aa602c81cefe92db725e95eeaa9477 (patch) | |
tree | 59495592677b3e0c96a37245a0a1255b2f651a39 /net-analyzer/sniffit | |
parent | virtual/glut -> media-libs/glut (diff) | |
download | gentoo-2-9bad1fd881aa602c81cefe92db725e95eeaa9477.tar.gz gentoo-2-9bad1fd881aa602c81cefe92db725e95eeaa9477.tar.bz2 gentoo-2-9bad1fd881aa602c81cefe92db725e95eeaa9477.zip |
Respect LDFLAGS (bug #336981). Apply more recent Debian patch. Clean up code. Clean up ebuild.
(Portage version: 2.2_rc82/cvs/Linux i686)
Diffstat (limited to 'net-analyzer/sniffit')
-rw-r--r-- | net-analyzer/sniffit/ChangeLog | 12 | ||||
-rw-r--r-- | net-analyzer/sniffit/files/sniffit-0.3.7-flags.patch | 30 | ||||
-rw-r--r-- | net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch | 6 | ||||
-rw-r--r-- | net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch | 120 | ||||
-rw-r--r-- | net-analyzer/sniffit/sniffit-0.3.7-r2.ebuild | 45 |
5 files changed, 208 insertions, 5 deletions
diff --git a/net-analyzer/sniffit/ChangeLog b/net-analyzer/sniffit/ChangeLog index 80c5836857fd..aae0f5138caf 100644 --- a/net-analyzer/sniffit/ChangeLog +++ b/net-analyzer/sniffit/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/sniffit -# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sniffit/ChangeLog,v 1.15 2009/01/15 06:37:32 jer Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sniffit/ChangeLog,v 1.16 2010/09/16 16:31:59 jer Exp $ + +*sniffit-0.3.7-r2 (16 Sep 2010) + + 16 Sep 2010; Jeroen Roovers <jer@gentoo.org> +sniffit-0.3.7-r2.ebuild, + +files/sniffit-0.3.7-flags.patch, files/sniffit-0.3.7-gentoo.patch, + +files/sniffit-0.3.7-misc.patch: + Respect LDFLAGS (bug #336981). Apply more recent Debian patch. Clean up + code. Clean up ebuild. 15 Jan 2009; Jeroen Roovers <jer@gentoo.org> +files/sniffit-0.3.7-gentoo.patch, sniffit-0.3.7-r1.ebuild: diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-flags.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-flags.patch new file mode 100644 index 000000000000..fe9c14c15f94 --- /dev/null +++ b/net-analyzer/sniffit/files/sniffit-0.3.7-flags.patch @@ -0,0 +1,30 @@ +Do not build or link against included libpcap. +Respect CFLAGS and LDFLAGS. + +--- a/Makefile.in 1998-07-16 18:17:10.000000000 +0200 ++++ b/Makefile.in 2010-09-13 00:10:51.000000000 +0200 +@@ -10,10 +10,10 @@ + LIBS = @LIBS@ + DEFS = @DEFS@ + OS_OPT = @OS_OPT@ +-OBJ_FLAG = -w -O2 -c +-OBJ_OPT = -I./libpcap -L./libpcap +-EXE_FLAG = -w -O2 -o sniffit +-EXE_OPT = -I./libpcap -L./libpcap -lpcap ++OBJ_FLAG = $(CFLAGS) -c ++OBJ_OPT = -I/usr/include/pcap -L/usr/lib ++EXE_FLAG = $(CFLAGS) $(LDFLAGS) -o sniffit ++EXE_OPT = -I/usr/include/pcap -lpcap + EXE_OBJ = sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o \ + sn_logfile.o sn_resolv.o + DEP_FILES = sn_config.h ./libpcap/pcap.h sn_data.h sn_defines.h sn_plugins.h \ +@@ -26,9 +26,7 @@ + @echo "Succesfull compilation..." + + sniffit: $(SNIFFIT) $(DEP_FILES) +- cd libpcap; make; cd .. + $(CC) $(EXE_FLAG) $(SNIFFIT) $(EXE_OBJ) $(EXE_OPT) $(LIBS) $(DEFS) $(OS_OPT) +- strip sniffit + + sn_cfgfile.o: sn_cfgfile.h sn_cfgfile.c sn_defines.h sn_structs.h sn_config.h + $(CC) $(OBJ_FLAG) sn_cfgfile.c $(OBJ_OPT) $(DEFS) diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch index 680eb07a6833..19a759578a43 100644 --- a/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch +++ b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch @@ -1,5 +1,5 @@ ---- sniffit.0.3.7.beta/Makefile.in.orig 2009-01-15 07:28:39.000000000 +0100 -+++ sniffit.0.3.7.beta/Makefile.in 2009-01-15 07:28:26.000000000 +0100 +--- a/sniffit.0.3.7.beta/Makefile.in 2009-01-15 07:28:39.000000000 +0100 ++++ b/sniffit.0.3.7.beta/Makefile.in 2009-01-15 07:28:26.000000000 +0100 @@ -10,9 +10,9 @@ LIBS = @LIBS@ DEFS = @DEFS@ @@ -8,7 +8,7 @@ +OBJ_FLAG = $(CFLAGS) -c OBJ_OPT = -I./libpcap -L./libpcap -EXE_FLAG = -w -O2 -o sniffit -+EXE_FLAG = $(CFLAGS) -o sniffit ++EXE_FLAG = $(CFLAGS) $(LDFLAGS) -o sniffit EXE_OPT = -I./libpcap -L./libpcap -lpcap EXE_OBJ = sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o \ sn_logfile.o sn_resolv.o diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch new file mode 100644 index 000000000000..aecf0da28050 --- /dev/null +++ b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch @@ -0,0 +1,120 @@ +--- a/sn_cfgfile.h 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_cfgfile.h 2010-09-16 18:14:53.000000000 +0200 +@@ -10,3 +10,4 @@ + void make_nr_dot (char *); + void interprete_line (char *); + void read_cfg_file (char *); ++char *strlower (char *); +--- a/sn_structs.h 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_structs.h 2010-09-16 18:14:53.000000000 +0200 +@@ -67,7 +67,7 @@ + struct snif_mask /* struct for mask */ + { + _32_bit source_ip, destination_ip; +- _32_bit short source_port, destination_port; ++ _32_bit source_port, destination_port; + }; + + /* (packet generation) */ +--- a/sn_analyse.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_analyse.c 2010-09-16 18:14:53.000000000 +0200 +@@ -1,6 +1,9 @@ + /* Analyse traffic for logging mode */ + /* - by: Brecht Claerhout */ + ++#include <stdlib.h> ++#include <string.h> ++ + const unsigned char *data; + memcpy(&tcphead,header,sizeof(struct TCP_header)); + +--- a/sn_cfgfile.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_cfgfile.c 2010-09-16 18:14:53.000000000 +0200 +@@ -3,6 +3,11 @@ + /* - improvements: Shudoh Kazuyuki */ + + #include <stdio.h> ++#include <stdlib.h> ++#include "sn_interface.h" ++#include <string.h> ++#include <ctype.h> ++#include <time.h> + #include <netdb.h> /* for getservbyname() */ + + #include "sn_config.h" +--- a/sn_conn_desc.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_conn_desc.c 2010-09-16 18:14:53.000000000 +0200 +@@ -1,6 +1,8 @@ + /* Connection description detection file */ + /* - by: Brecht Claerhout */ + ++#include <ctype.h> ++#include <string.h> + + /* Simple PORT BASED detection */ + +--- a/sn_generation.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_generation.c 2010-09-16 18:18:31.000000000 +0200 +@@ -6,12 +6,16 @@ + #ifdef INCLUDE_INTERFACE + #ifdef GENERATION + #include <unistd.h> ++#include <stdlib.h> ++#include <string.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include "sn_curses.h" + #include "sn_defines.h" + #include "sn_structs.h" + #include "sn_generation.h" ++#include "sn_interface.h" /* input_field() */ ++#include "sn_packets.h" /* in_cksum() */ + + extern volatile int screen_busy; + +--- a/sniffit.0.3.7.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sniffit.0.3.7.c 2010-09-16 18:14:53.000000000 +0200 +@@ -4,6 +4,9 @@ + #include "sn_config.h" /* Config header file */ + + #include <unistd.h> ++#include <stdlib.h> ++#include <string.h> ++#include <ctype.h> + #include <signal.h> + #include <stdio.h> + #include <fcntl.h> +--- a/sn_interface.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_interface.c 2010-09-16 18:15:59.000000000 +0200 +@@ -6,6 +6,9 @@ + #ifdef INCLUDE_INTERFACE + #include <signal.h> + #include <unistd.h> ++#include <stdlib.h> ++#include <string.h> ++#include <ctype.h> + #include <sys/ipc.h> + #include <sys/shm.h> + #include "sn_curses.h" +--- a/sn_logfile.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_logfile.c 2010-09-16 18:16:44.000000000 +0200 +@@ -4,6 +4,9 @@ + #include "sn_config.h" + + #include <stdio.h> ++#include <stdlib.h> /* exit() */ ++#include <string.h> /* strcpy() */ ++#include <time.h> /* time() ctime() */ + #include <sys/stat.h> + #include <sys/time.h> + #include "sn_defines.h" +--- a/sn_packets.c 1998-07-16 18:17:10.000000000 +0200 ++++ b/sn_packets.c 2010-09-16 18:14:53.000000000 +0200 +@@ -5,6 +5,7 @@ + #include "sn_defines.h" + #include "sn_structs.h" + #include <netinet/in.h> ++#include <string.h> /* memcpy() strcpy() */ + + extern int PROTO_HEAD; + extern char NO_CHKSUM; diff --git a/net-analyzer/sniffit/sniffit-0.3.7-r2.ebuild b/net-analyzer/sniffit/sniffit-0.3.7-r2.ebuild new file mode 100644 index 000000000000..7c00bc61bace --- /dev/null +++ b/net-analyzer/sniffit/sniffit-0.3.7-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sniffit/sniffit-0.3.7-r2.ebuild,v 1.1 2010/09/16 16:31:59 jer Exp $ + +EAPI="2" + +inherit eutils toolchain-funcs + +MY_P="${P/-/.}.beta" +S="${WORKDIR}/${MY_P}" +DESCRIPTION="Interactive Packet Sniffer" +SRC_URI="http://reptile.rug.ac.be/~coder/${PN}/files/${MY_P}.tar.gz + mirror://debian/pool/main/s/${PN}/${PN}_0.3.7.beta-15.diff.gz" +HOMEPAGE="http://reptile.rug.ac.be/~coder/sniffit/sniffit.html" + +DEPEND="net-libs/libpcap + >=sys-libs/ncurses-5.2" + +SLOT="0" +LICENSE="as-is" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="" + +src_prepare() { +for i in *.c *.h Makefile.in; do cp -av $i $i.orig; done + epatch \ + ${WORKDIR}/${PN}_0.3.7.beta-15.diff \ + ${PN}-0.3.7.beta/debian/patches/ + + epatch \ + ${FILESDIR}/${P}-flags.patch \ + ${FILESDIR}/${P}-misc.patch +} + +src_configure() { + tc-export CC + econf || die +} + +src_install () { + dobin sniffit + + doman sniffit.5 sniffit.8 + dodoc README* PLUGIN-HOWTO BETA* HISTORY LICENSE +} |