From b4922c6f0932a3f33a2b68eaccc89351d3b9170d Mon Sep 17 00:00:00 2001 From: acinonyx Date: Mon, 10 Aug 2009 23:32:58 +0000 Subject: [PATCH] [packages] tcpdump: Update to v4.0.0 (closes #5656) git-svn-id: svn://svn.openwrt.org/openwrt/packages@17210 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/tcpdump/Makefile | 8 ++++---- .../patches/001-remove_pcap_debug.patch | 11 +++++------ .../002-remove_static_libpcap_check.patch | 19 +++++-------------- .../patches/003-fix_ipv6_compile.patch | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 net/tcpdump/patches/003-fix_ipv6_compile.patch diff --git a/net/tcpdump/Makefile b/net/tcpdump/Makefile index 41c88c86a..b5285fa15 100644 --- a/net/tcpdump/Makefile +++ b/net/tcpdump/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcpdump -PKG_VERSION:=3.9.8 -PKG_RELEASE:=3 +PKG_VERSION:=4.0.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \ http://ftp.gwdg.de/pub/misc/tcpdump/ \ http://www.at.tcpdump.org/ \ http://www.br.tcpdump.org/ -PKG_MD5SUM:=c491a78c52fe73f1f7271aa5d8c6ab2e +PKG_MD5SUM:=b22ca72890df2301d922c9f2d17867f9 include $(INCLUDE_DIR)/package.mk diff --git a/net/tcpdump/patches/001-remove_pcap_debug.patch b/net/tcpdump/patches/001-remove_pcap_debug.patch index c7e0a44a3..33011c5d3 100644 --- a/net/tcpdump/patches/001-remove_pcap_debug.patch +++ b/net/tcpdump/patches/001-remove_pcap_debug.patch @@ -1,7 +1,6 @@ -diff -urN tcpdump-3.9.8.orig/tcpdump.c tcpdump-3.9.8/tcpdump.c ---- tcpdump-3.9.8.orig/tcpdump.c -+++ tcpdump-3.9.8/tcpdump.c -@@ -765,20 +765,6 @@ +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -826,20 +826,6 @@ main(int argc, char **argv) error("invalid data link type %s", gndo->ndo_dltname); break; @@ -19,6 +18,6 @@ diff -urN tcpdump-3.9.8.orig/tcpdump.c tcpdump-3.9.8/tcpdump.c - } - break; -#endif - case 'Z': + case 'z': if (optarg) { - username = strdup(optarg); + zflag = strdup(optarg); diff --git a/net/tcpdump/patches/002-remove_static_libpcap_check.patch b/net/tcpdump/patches/002-remove_static_libpcap_check.patch index c7c2b04af..bd0946787 100644 --- a/net/tcpdump/patches/002-remove_static_libpcap_check.patch +++ b/net/tcpdump/patches/002-remove_static_libpcap_check.patch @@ -1,15 +1,6 @@ -tcpdump explicitly checks for a static version of libpcap in -../libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)? relative to its build dir -if found, tcpdump is linked statically against this lib - -The patch removes the check for the static lib and headers in this relative -location for tcpdump's configure script. - -Index: tcpdump-3.9.8/configure -=================================================================== ---- tcpdump-3.9.8.orig/configure 2007-09-25 19:16:50.000000000 -0700 -+++ tcpdump-3.9.8/configure 2009-05-21 17:17:07.000000000 -0700 -@@ -9278,26 +9278,6 @@ +--- a/configure ++++ b/configure +@@ -9280,26 +9280,6 @@ echo "${ECHO_T}Using $pfopen" >&6; } LIBS="$LIBS $pfopen" fi fi @@ -36,11 +27,11 @@ Index: tcpdump-3.9.8/configure { echo "$as_me:$LINENO: checking for main in -lpcap" >&5 echo $ECHO_N "checking for main in -lpcap... $ECHO_C" >&6; } if test "${ac_cv_lib_pcap_main+set}" = set; then -@@ -9362,40 +9342,6 @@ +@@ -9364,40 +9344,6 @@ fi echo "$as_me: error: see the INSTALL doc for more info" >&2;} { (exit 1); exit 1; }; } fi -- { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 +- { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 -echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; } - if test \( ! -r /usr/local/include/pcap.h \) -a \ - \( ! -r /usr/include/pcap.h \); then diff --git a/net/tcpdump/patches/003-fix_ipv6_compile.patch b/net/tcpdump/patches/003-fix_ipv6_compile.patch new file mode 100644 index 000000000..331c9b56b --- /dev/null +++ b/net/tcpdump/patches/003-fix_ipv6_compile.patch @@ -0,0 +1,14 @@ +--- a/print-enc.c ++++ b/print-enc.c +@@ -77,9 +77,11 @@ enc_if_print(const struct pcap_pkthdr *h + case AF_INET: + ip_print(gndo, p, length); + break; ++#ifdef INET6 + case AF_INET6: + ip6_print(p, length); + break; ++#endif /*INET6*/ + } + + out: