[oe-commits] Tushar Gohad : tcpdump: obey distro for the ipv6 support

git version control git at git.openembedded.org
Thu Aug 27 05:48:01 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 0b3b3824dce51d6d9585001b1e4f899bde36e95b
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=0b3b3824dce51d6d9585001b1e4f899bde36e95b

Author: Tushar Gohad <tgohad at mvista.com>
Date:   Wed Jul 29 22:06:39 2009 -0700

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 <tgohad at mvista.com>
Signed-off-by: Chris Larson <clarson at mvista.com>

---

 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(-)

diff --git a/recipes/tcpdump/files/ipv6-cross.patch b/recipes/tcpdump/files/ipv6-cross.patch
new file mode 100644
index 0000000..54e20ae
--- /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 <sys/types.h>
+ #include <sys/socket.h>
+ 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 163d74f..127400e 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 f36cc0a..b29f770 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





More information about the Openembedded-commits mailing list