diff options
author | Daniel Ahlberg <aliz@gentoo.org> | 2004-02-06 14:22:56 +0000 |
---|---|---|
committer | Daniel Ahlberg <aliz@gentoo.org> | 2004-02-06 14:22:56 +0000 |
commit | 6971e084a004d7d4221e5320a4ecf60336e9b1e8 (patch) | |
tree | df85e13307dfd7b396d11d5de84b00445cca4d63 /net-analyzer/ngrep | |
parent | ver bump (diff) | |
download | gentoo-2-6971e084a004d7d4221e5320a4ecf60336e9b1e8.tar.gz gentoo-2-6971e084a004d7d4221e5320a4ecf60336e9b1e8.tar.bz2 gentoo-2-6971e084a004d7d4221e5320a4ecf60336e9b1e8.zip |
Fix compilation aginst the new libpcap include files.
Diffstat (limited to 'net-analyzer/ngrep')
-rw-r--r-- | net-analyzer/ngrep/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/ngrep/files/ngrep-1.41-fix-HAVE_DUMB_UDPHDR-test.patch | 22 | ||||
-rw-r--r-- | net-analyzer/ngrep/files/ngrep-1.41-libpcap-include.patch | 113 | ||||
-rw-r--r-- | net-analyzer/ngrep/ngrep-1.41.ebuild | 14 |
4 files changed, 140 insertions, 18 deletions
diff --git a/net-analyzer/ngrep/ChangeLog b/net-analyzer/ngrep/ChangeLog index 36c65f5a886a..017c0a248775 100644 --- a/net-analyzer/ngrep/ChangeLog +++ b/net-analyzer/ngrep/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-analyzer/ngrep -# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ngrep/ChangeLog,v 1.10 2004/02/01 19:53:56 azarah Exp $ +# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ngrep/ChangeLog,v 1.11 2004/02/06 14:22:56 aliz Exp $ + + 06 Feb 2004; Daniel Ahlberg <aliz@gentoo.org> ngrep-1.41.ebuild, + files/ngrep-1.41-fix-HAVE_DUMB_UDPHDR-test.patch, + files/ngrep-1.41-libpcap-include.patch: + Fix compilation aginst the new libpcap include files. *ngrep-1.41 (01 Feb 2004) diff --git a/net-analyzer/ngrep/files/ngrep-1.41-fix-HAVE_DUMB_UDPHDR-test.patch b/net-analyzer/ngrep/files/ngrep-1.41-fix-HAVE_DUMB_UDPHDR-test.patch index 709bb1d25194..06f42e77fe73 100644 --- a/net-analyzer/ngrep/files/ngrep-1.41-fix-HAVE_DUMB_UDPHDR-test.patch +++ b/net-analyzer/ngrep/files/ngrep-1.41-fix-HAVE_DUMB_UDPHDR-test.patch @@ -1,18 +1,20 @@ ---- ngrep-1.41/configure.orig 2003-11-03 00:15:04.716684800 +0200 -+++ ngrep-1.41/configure 2003-11-03 00:15:32.848408128 +0200 -@@ -1764,7 +1764,6 @@ - #line 1765 "configure" - #include "confdefs.h" +--- configure.in 2003-08-10 01:17:22.000000000 +0000 ++++ configure.in 2004-02-06 14:15:57.889662976 +0000 +@@ -179,7 +188,7 @@ + AC_DEFINE(LINUX) --int main() { + AC_MSG_CHECKING(for a dumb udphdr declaration) +- AC_TRY_COMPILE(, ++ AC_TRY_COMPILE( #ifndef __FAVOR_BSD #define __FAVOR_BSD #endif -@@ -1775,6 +1774,7 @@ +@@ -189,7 +198,7 @@ + #endif #include <netinet/udp.h> - -+int main() { +- ++, struct udphdr foo; unsigned short bar = foo.uh_sport; - + , diff --git a/net-analyzer/ngrep/files/ngrep-1.41-libpcap-include.patch b/net-analyzer/ngrep/files/ngrep-1.41-libpcap-include.patch new file mode 100644 index 000000000000..bdb2639f51b1 --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.41-libpcap-include.patch @@ -0,0 +1,113 @@ +--- configure.in 2003-08-10 01:17:22.000000000 +0000 ++++ configure.in 2004-02-06 14:15:57.889662976 +0000 +@@ -40,21 +40,30 @@ + pcap_dir="" + + for dir in $PCAP_DIR ; do +- if test -d $dir -a -r "$dir/pcap.h" -a \ +- -r "$dir/net/bpf.h" ; then +- if test -n "$pcap_dir" -a "$pcap_dir" != "$dir"; then +- echo +- echo; echo more than one set found in: +- echo $pcap_dir +- echo $dir +- echo; echo please wipe out all unused pcap installations +- exit +- else +- pcap_dir="$dir" +- fi ++ if test -d $dir ; then ++ if test -r "$dir/pcap.h" ; then ++ if test -r "$dir/net/$bpf_h" -o -r "$dir/pcap-$bpf_h" ; then ++ if test -n "$pcap_dir" -a "$pcap_dir" != "$dir"; then ++ echo ++ echo; echo more than one set found in: ++ echo $pcap_dir ++ echo $dir ++ echo; echo please wipe out all unused pcap installations ++ exit ++ else ++ pcap_dir="$dir" ++ fi ++ fi ++ fi + fi + done + ++if test -r "$pcap_dir/pcap-bpf.h" ; then ++ bpf_h="pcap-bpf.h" ++else ++ bpf_h="net/bpf.h" ++fi ++ + if test -z "$pcap_dir" ; then + echo no; echo couldn\'t find a complete set of pcap headers + exit +@@ -67,14 +76,14 @@ + AC_SUBST(PCAP_INCLUDE) + AC_SUBST(PCAP_LINK) + +- AC_MSG_CHECKING(for usable bpf.h) +- if test -n "`grep DLT_RAW $pcap_dir/net/bpf.h`" ; then ++ AC_MSG_CHECKING(for usable $bpf_h) ++ if test -n "`grep DLT_RAW $pcap_dir/$bpf_h`" ; then + echo yep + else + + echo nope + echo '***************************************************************' +-echo an important define is missing from the bpf.h I found. this ++echo an important define is missing from the $bpf_h I found. this + echo probably means that your installation of pcap is outdated and + echo needs upgrading. I\'ll go ahead and add the define for you but + echo understand that matching certain types of packets may not +@@ -128,10 +137,10 @@ + dnl Check for DLT_* types that might not have existed in older + dnl libpcap's + dnl +-AC_MSG_CHECKING(for DLT_LINUX_SLL in bpf.h) ++AC_MSG_CHECKING(for DLT_LINUX_SLL in $bpf_h) + AC_EGREP_HEADER(yes, + [ +-#include <net/bpf.h> ++#include <$bpf_h> + #ifdef DLT_LINUX_SLL + yes + #endif +@@ -140,10 +149,10 @@ + echo yes, + echo no) + +-AC_MSG_CHECKING(for DLT_LOOP in bpf.h) ++AC_MSG_CHECKING(for DLT_LOOP in $bpf_h) + AC_EGREP_HEADER(yes, + [ +-#include <net/bpf.h> ++#include <$bpf_h> + #ifdef DLT_LOOP + yes + #endif +@@ -152,10 +161,10 @@ + echo yes, + echo no) + +-AC_MSG_CHECKING(for DLT_IEEE802_11 in bpf.h) ++AC_MSG_CHECKING(for DLT_IEEE802_11 in $bpf_h) + AC_EGREP_HEADER(yes, + [ +-#include <net/bpf.h> ++#include <$bpf_h> + #ifdef DLT_IEEE802_11 + yes + #endif +--- ngrep.c 2003-08-10 04:14:52.000000000 +0000 ++++ ngrep.c 2004-02-06 14:18:52.958048536 +0000 +@@ -55,7 +55,6 @@ + #include <netinet/ip_icmp.h> + + #include <pcap.h> +-#include <net/bpf.h> + + #include <stdlib.h> + #include <string.h> + diff --git a/net-analyzer/ngrep/ngrep-1.41.ebuild b/net-analyzer/ngrep/ngrep-1.41.ebuild index d896680b9799..58272deb999d 100644 --- a/net-analyzer/ngrep/ngrep-1.41.ebuild +++ b/net-analyzer/ngrep/ngrep-1.41.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ngrep/ngrep-1.41.ebuild,v 1.5 2004/02/01 19:53:56 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ngrep/ngrep-1.41.ebuild,v 1.6 2004/02/06 14:22:56 aliz Exp $ S="${WORKDIR}/${P}" DESCRIPTION="A grep for network layers" @@ -9,22 +9,24 @@ RESTRICT="nomirror" HOMEPAGE="http://ngrep.sourceforge.net" DEPEND="virtual/glibc - >=net-libs/libpcap-0.5.2" + >=net-libs/libpcap-0.5.2 + sys-devel/autoconf" RDEPEND="virtual/glibc" SLOT="0" LICENSE="as-is" -KEYWORDS="x86 ppc sparc alpha" +KEYWORDS="x86 ppc sparc alpha ~amd64" src_unpack() { - unpack ${A} - - cd ${S} + unpack ${A} ; cd ${S} + epatch ${FILESDIR}/${P}-libpcap-include.patch epatch ${FILESDIR}/${P}-fix-HAVE_DUMB_UDPHDR-test.patch } src_compile() { + autoconf + econf || die make || die } |