summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support
diff options
context:
space:
mode:
authorZongchun Yu <Zongchun.Yu@freescale.com>2013-11-26 10:54:12 +0800
committerJoe MacDonald <joe@deserted.net>2013-11-28 10:35:00 -0500
commitd62fe9254a116ae5b908889b61fa83e2a9702e3b (patch)
tree3f943e5036952337a6a036a81b795269050884aa /meta-networking/recipes-support
parent9b3e284c58bce673801ca3649b53bc53797ce2e9 (diff)
downloadmeta-openembedded-d62fe9254a116ae5b908889b61fa83e2a9702e3b.tar.gz
tcpdump: move from meta-oe to meta-networking
Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-support')
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/0001-minimal-IEEE802.15.4-allowed.patch22
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/configure.patch29
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/ipv6-cross.patch41
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/tcpdump_configure_no_-O2.patch42
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump_4.3.0.bb43
5 files changed, 177 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/0001-minimal-IEEE802.15.4-allowed.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/0001-minimal-IEEE802.15.4-allowed.patch
new file mode 100644
index 000000000..9d3d60d4d
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/0001-minimal-IEEE802.15.4-allowed.patch
@@ -0,0 +1,22 @@
1From: Sergey Lapin <slapin@slind.org>
2Date: Wed, 28 Jan 2009 16:34:15 +0300
3Subject: [PATCH] minimal IEEE802.15.4 allowed
4
5---
6 tcpdump.c | 3 +++
7 1 files changed, 3 insertions(+), 0 deletions(-)
8
9diff --git a/tcpdump.c b/tcpdump.c
10index 06683af..fbc944c 100644
11--- a/tcpdump.c
12+++ b/tcpdump.c
13@@ -282,6 +282,9 @@ static struct printer printers[] = {
14 #ifdef DLT_MFR
15 { mfr_if_print, DLT_MFR },
16 #endif
17+#ifdef DLT_IEEE802_15_4
18+ { raw_if_print, DLT_IEEE802_15_4 },
19+#endif
20 #if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
21 { bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
22 #endif
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/configure.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/configure.patch
new file mode 100644
index 000000000..3697420fd
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/configure.patch
@@ -0,0 +1,29 @@
1---
2 aclocal.m4 | 1 -
3 configure.in | 1 +
4 2 files changed, 1 insertions(+), 1 deletions(-)
5
6diff --git a/aclocal.m4 b/aclocal.m4
7index 40b5866..0c662b0 100644
8--- a/aclocal.m4
9+++ b/aclocal.m4
10@@ -40,7 +40,6 @@ dnl
11 AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
12 [AC_PREREQ(2.50)
13 AC_BEFORE([$0], [AC_LBL_C_INIT])
14- AC_BEFORE([$0], [AC_PROG_CC])
15 AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
16 AC_BEFORE([$0], [AC_LBL_DEVEL])
17 AC_ARG_WITH(gcc, [ --without-gcc don't use gcc])
18diff --git a/configure.in b/configure.in
19index 11257c9..7f9591c 100644
20--- a/configure.in
21+++ b/configure.in
22@@ -19,6 +19,7 @@ AC_REVISION($Revision: 1.204 $)
23 AC_PREREQ(2.50)
24 AC_INIT(tcpdump.c)
25
26+AC_PROG_CC
27 AC_CANONICAL_HOST
28
29 AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/ipv6-cross.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/ipv6-cross.patch
new file mode 100644
index 000000000..7eba2c5a6
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/ipv6-cross.patch
@@ -0,0 +1,41 @@
1---
2 configure.in | 12 ++++++++----
3 1 files changed, 8 insertions(+), 4 deletions(-)
4
5diff --git a/configure.in b/configure.in
6index eb3e5e8..11257c9 100644
7--- a/configure.in
8+++ b/configure.in
9@@ -181,8 +181,9 @@ yes) AC_MSG_RESULT(yes)
10 ipv6=no
11 ;;
12 esac ],
13-
14- AC_TRY_RUN([ /* AF_INET6 available check */
15+[
16+ if test x"$cross_compiling" != "xyes"; then
17+ AC_TRY_RUN([ /* AF_INET6 avalable check */
18 #include <sys/types.h>
19 #include <sys/socket.h>
20 main()
21@@ -201,7 +202,10 @@ main()
22 ipv6=no],
23 [ AC_MSG_RESULT(no)
24 ipv6=no]
25-))
26+ )
27+else
28+ AC_MSG_FAILURE([Unable to check for ipv6 when crosscompiling, please specify.])
29+fi])
30
31 ipv6type=unknown
32 ipv6lib=none
33@@ -316,7 +320,7 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
34 fi
35
36
37-if test "$ipv6" = "yes"; then
38+if test x"$cross_compiling" != "xyes" -a "$ipv6" = "yes"; then
39 #
40 # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()"
41 # function in libc; there are "ngetaddrinfo()" and
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/tcpdump_configure_no_-O2.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/tcpdump_configure_no_-O2.patch
new file mode 100644
index 000000000..7929da5b1
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.3.0/tcpdump_configure_no_-O2.patch
@@ -0,0 +1,42 @@
1---
2 configure | 8 ++++----
3 1 files changed, 4 insertions(+), 4 deletions(-)
4
5diff --git a/configure b/configure
6index cb51d19..73d51af 100755
7--- a/configure
8+++ b/configure
9@@ -2691,13 +2691,13 @@ if test "$ac_test_CFLAGS" = set; then
10 CFLAGS=$ac_save_CFLAGS
11 elif test $ac_cv_prog_cc_g = yes; then
12 if test "$GCC" = yes; then
13- CFLAGS="-g -O2"
14+ CFLAGS="-g"
15 else
16 CFLAGS="-g"
17 fi
18 else
19 if test "$GCC" = yes; then
20- CFLAGS="-O2"
21+ CFLAGS=""
22 else
23 CFLAGS=
24 fi
25@@ -2830,7 +2830,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
26 if test "$GCC" = yes ; then
27 if test "$SHLICC2" = yes ; then
28 ac_cv_lbl_gcc_vers=2
29- V_CCOPT="-O2"
30+ V_CCOPT=""
31 else
32 { echo "$as_me:$LINENO: checking gcc version" >&5
33 echo $ECHO_N "checking gcc version... $ECHO_C" >&6; }
34@@ -2847,7 +2847,7 @@ fi
35 { echo "$as_me:$LINENO: result: $ac_cv_lbl_gcc_vers" >&5
36 echo "${ECHO_T}$ac_cv_lbl_gcc_vers" >&6; }
37 if test $ac_cv_lbl_gcc_vers -gt 1 ; then
38- V_CCOPT="-O2"
39+ V_CCOPT=""
40 fi
41 fi
42 else
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.3.0.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.3.0.bb
new file mode 100644
index 000000000..1da819412
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump_4.3.0.bb
@@ -0,0 +1,43 @@
1DESCRIPTION = "A sophisticated network protocol analyzer"
2HOMEPAGE = "http://www.tcpdump.org/"
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867"
5SECTION = "console/network"
6DEPENDS = "libpcap"
7
8SRC_URI = " \
9 http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \
10 file://tcpdump_configure_no_-O2.patch \
11 file://0001-minimal-IEEE802.15.4-allowed.patch \
12 file://ipv6-cross.patch \
13 file://configure.patch \
14"
15SRC_URI[md5sum] = "a3fe4d30ac85ff5467c889ff46b7e1e8"
16SRC_URI[sha256sum] = "efd08b610210d39977ec3175fa82dad9fbd33587930081be2a905a712dba4286"
17
18inherit autotools
19CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}"
20
21EXTRA_OECONF = "--without-crypto --disable-rpath \
22 ${@base_contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6', '--disable-ipv6', d)}"
23
24EXTRA_AUTORECONF += " -I m4"
25
26do_configure_prepend() {
27 mkdir -p ${S}/m4
28 if [ -f aclocal.m4 ]; then
29 mv aclocal.m4 ${S}/m4
30 fi
31 # AC_CHECK_LIB(dlpi.. was looking to host /lib
32 sed -i 's:-L/lib::g' ./configure.in
33}
34do_configure_append() {
35 sed -i 's:-L/usr/lib::' ./Makefile
36 sed -i 's:-Wl,-rpath,${STAGING_LIBDIR}::' ./Makefile
37 sed -i 's:-I/usr/include::' ./Makefile
38}
39
40do_install_append() {
41 # tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0
42 rm -f ${D}${sbindir}/tcpdump.${PV}
43}