From 0b3b3824dce51d6d9585001b1e4f899bde36e95b Mon Sep 17 00:00:00 2001 From: Tushar Gohad Date: Wed, 29 Jul 2009 22:06:39 -0700 Subject: tcpdump: obey distro for the ipv6 support When cross compiling, get rid of the AC_TRY_RUN style checks for ipv6, obey DISTRO_FEATURES. Signed-off-by: Tushar Gohad Signed-off-by: Chris Larson --- recipes/tcpdump/files/ipv6-cross.patch | 37 ++++++++++++++++++++++++++++++++++ recipes/tcpdump/tcpdump_3.9.7.bb | 6 +++++- recipes/tcpdump/tcpdump_4.0.0.bb | 6 ++++-- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 recipes/tcpdump/files/ipv6-cross.patch diff --git a/recipes/tcpdump/files/ipv6-cross.patch b/recipes/tcpdump/files/ipv6-cross.patch new file mode 100644 index 0000000000..54e20ae9eb --- /dev/null +++ b/recipes/tcpdump/files/ipv6-cross.patch @@ -0,0 +1,37 @@ +Index: tcpdump-4.0.0/configure.in +=================================================================== +--- tcpdump-4.0.0.orig/configure.in ++++ tcpdump-4.0.0/configure.in +@@ -160,8 +160,9 @@ yes) AC_MSG_RESULT(yes) + ipv6=no + ;; + esac ], +- +- AC_TRY_RUN([ /* AF_INET6 available check */ ++[ ++ if test x"$cross_compiling" != "xyes"; then ++ AC_TRY_RUN([ /* AF_INET6 avalable check */ + #include + #include + main() +@@ -180,7 +181,10 @@ main() + ipv6=no], + [ AC_MSG_RESULT(no) + ipv6=no] +-)) ++ ) ++else ++ AC_MSG_FAILURE([Unable to check for ipv6 when crosscompiling, please specify.]) ++fi]) + + ipv6type=unknown + ipv6lib=none +@@ -295,7 +299,7 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != + fi + + +-if test "$ipv6" = "yes"; then ++if test x"$cross_compiling" != "xyes" -a "$ipv6" = "yes"; then + # + # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()" + # function in libc; there are "ngetaddrinfo()" and diff --git a/recipes/tcpdump/tcpdump_3.9.7.bb b/recipes/tcpdump/tcpdump_3.9.7.bb index 163d74f2ca..127400e399 100644 --- a/recipes/tcpdump/tcpdump_3.9.7.bb +++ b/recipes/tcpdump/tcpdump_3.9.7.bb @@ -5,14 +5,18 @@ SECTION = "console/network" PRIORITY = "optional" DEPENDS = "libpcap" +PR = "r1" + SRC_URI = " \ http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \ file://tcpdump_configure_no_-O2.patch;patch=1 \ + file://ipv6-cross.patch;patch=1 \ " inherit autotools -EXTRA_OECONF = "--without-crypto" +EXTRA_OECONF = "--without-crypto \ + ${@base_contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6', '--disable-ipv6', d)}" do_configure() { gnu-configize diff --git a/recipes/tcpdump/tcpdump_4.0.0.bb b/recipes/tcpdump/tcpdump_4.0.0.bb index f36cc0aafa..b29f770e07 100644 --- a/recipes/tcpdump/tcpdump_4.0.0.bb +++ b/recipes/tcpdump/tcpdump_4.0.0.bb @@ -4,19 +4,21 @@ LICENSE = "BSD" SECTION = "console/network" PRIORITY = "optional" DEPENDS = "libpcap" -PR = "r2" +PR = "r3" SRC_URI = " \ http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \ file://tcpdump_configure_no_-O2.patch;patch=1 \ file://no-ipv6-tcpdump4.patch;patch=1 \ file://0001-minimal-IEEE802.15.4-allowed.patch;patch=1 \ + file://ipv6-cross.patch;patch=1 \ " inherit autotools # ac_cv_linux_vers=${ac_cv_linux_vers=2} -EXTRA_OECONF = "--without-crypto" +EXTRA_OECONF = "--without-crypto \ + ${@base_contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6', '--disable-ipv6', d)}" do_configure() { gnu-configize -- cgit v1.2.3