Description:
Patch tcpdump to cross-compile for Linux, and unmask.
Change-Id: I88656ee48c66eb01740e9146d9ca6d47aee519a0
BUG=None
TEST='emerge-x86-generic tcpdump'
Please review this at http://codereview.chromium.org/3806011/show
SVN Base: ssh://g...@gitrw.chromium.org:9222/chromiumos-overlay.git
Affected files:
A net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-assume-linux-2.patch
A net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-getaddrinfo.patch
M net-analyzer/tcpdump/tcpdump-4.1.1.ebuild
Index: net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-assume-linux-2.patch
diff --git
a/net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-assume-linux-2.patch
b/net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-assume-linux-2.patch
new file mode 100644
index
0000000000000000000000000000000000000000..0f683ae4d2985192c34d922619d51000252a47c4
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-assume-linux-2.patch
@@ -0,0 +1,14 @@
+--- configure.in.orig 2010-10-19 12:45:11.000000000 -0400
++++ configure.in 2010-10-19 12:45:36.000000000 -0400
+@@ -72,9 +72,8 @@
+ fi
+ AC_MSG_RESULT($ac_cv_linux_vers)
+ if test $ac_cv_linux_vers = unknown ; then
+- AC_MSG_ERROR(cannot determine linux version when cross-compiling)
+- fi
+- if test $ac_cv_linux_vers -lt 2 ; then
++ AC_MSG_NOTICE(cannot determine linux version when cross-compiling -
assuming 2 or higher)
++ elif test $ac_cv_linux_vers -lt 2 ; then
+ AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more
info)
+ fi
+ ;;
Index: net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-getaddrinfo.patch
diff --git
a/net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-getaddrinfo.patch
b/net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-getaddrinfo.patch
new file mode 100644
index
0000000000000000000000000000000000000000..e3cfea41e222ae3d6698c93f6b51001a137fc2ce
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.1.1-cross-getaddrinfo.patch
@@ -0,0 +1,11 @@
+--- configure.in.orig 2010-10-19 12:53:33.000000000 -0400
++++ configure.in 2010-10-19 12:53:43.000000000 -0400
+@@ -428,7 +428,7 @@
+ ],
+ td_cv_buggygetaddrinfo=no,
+ td_cv_buggygetaddrinfo=yes,
+- td_cv_buggygetaddrinfo=yes)])
++ td_cv_buggygetaddrinfo=cross)])
+ if test "$td_cv_buggygetaddrinfo" = no; then
+ AC_MSG_RESULT(good)
+ else
Index: net-analyzer/tcpdump/tcpdump-4.1.1.ebuild
diff --git a/net-analyzer/tcpdump/tcpdump-4.1.1.ebuild
b/net-analyzer/tcpdump/tcpdump-4.1.1.ebuild
index
1a8638b5530970d319529c064e6fc63e5004d060..d02bfc9fcaebe3bb58bcb45a240435802a68fae4
100644
--- a/net-analyzer/tcpdump/tcpdump-4.1.1.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.1.1.ebuild
@@ -3,7 +3,7 @@
# $Header:
/var/cvsroot/gentoo-x86/net-analyzer/tcpdump/tcpdump-4.1.1.ebuild,v 1.3
2010/04/12 10:32:14 pva Exp $
EAPI="2"
-inherit flag-o-matic toolchain-funcs eutils
+inherit autotools flag-o-matic toolchain-funcs eutils
DESCRIPTION="A Tool for network monitoring and data acquisition"
HOMEPAGE="http://www.tcpdump.org/"
@@ -12,7 +12,7 @@ SRC_URI="http://www.tcpdump.org/release/${P}.tar.gz
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86
~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc x86
~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
IUSE="+chroot smi ssl ipv6 -samba suid test"
RDEPEND="net-libs/libpcap
@@ -38,6 +38,14 @@ pkg_setup() {
enewuser tcpdump -1 -1 -1 tcpdump
}
+src_prepare() {
+ if tc-is-cross-compiler; then
+ epatch "${FILESDIR}/tcpdump-4.1.1-cross-assume-linux-2.patch"
+ epatch "${FILESDIR}/tcpdump-4.1.1-cross-getaddrinfo.patch"
+ eautoreconf
+ fi
+}
+
src_configure() {
# tcpdump needs some optymalization. see bug #108391
( ! is-flag -O? || is-flag -O0 ) && append-flags -O2
We're not picking that up - x86 is linux-gnu, not linux-gnueabi (that's specific to ARM, I think). So is the right thing to do to patch our copy of the linux-gnu site config file?