diff options
author | Cédric Krier <cedk@gentoo.org> | 2007-05-05 10:52:19 +0000 |
---|---|---|
committer | Cédric Krier <cedk@gentoo.org> | 2007-05-05 10:52:19 +0000 |
commit | 133d82e35ff289dd2693b4d4723db146b7282fa5 (patch) | |
tree | a32d44024dc0269b823ef1a822eb3cd75900ceb0 /net-libs/libpcap | |
parent | Change find -wholename to -path to work on fbsd. (diff) | |
download | gentoo-2-133d82e35ff289dd2693b4d4723db146b7282fa5.tar.gz gentoo-2-133d82e35ff289dd2693b4d4723db146b7282fa5.tar.bz2 gentoo-2-133d82e35ff289dd2693b4d4723db146b7282fa5.zip |
net-libs/libpcap: Add patch for cross-compile for bug #172210
(Portage version: 2.1.2.2)
Diffstat (limited to 'net-libs/libpcap')
-rw-r--r-- | net-libs/libpcap/ChangeLog | 6 | ||||
-rw-r--r-- | net-libs/libpcap/files/libpcap-cross-linux.patch | 27 | ||||
-rw-r--r-- | net-libs/libpcap/libpcap-0.9.5.ebuild | 22 |
3 files changed, 37 insertions, 18 deletions
diff --git a/net-libs/libpcap/ChangeLog b/net-libs/libpcap/ChangeLog index 198f999d0cc1..0d8dcbf1d642 100644 --- a/net-libs/libpcap/ChangeLog +++ b/net-libs/libpcap/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-libs/libpcap # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.69 2007/04/22 22:14:42 kanaka Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.70 2007/05/05 10:52:19 cedk Exp $ + + 05 May 2007; Cedric Krier <cedk@gentoo.org> + +files/libpcap-cross-linux.patch, libpcap-0.9.5.ebuild: + Add patch for cross-compile for bug #172210 22 Apr 2007; Joel Martin <kanaka@gentoo.org> libpcap-0.9.5.ebuild: Fix typo in cross-compile check. diff --git a/net-libs/libpcap/files/libpcap-cross-linux.patch b/net-libs/libpcap/files/libpcap-cross-linux.patch new file mode 100644 index 000000000000..8d21868018dd --- /dev/null +++ b/net-libs/libpcap/files/libpcap-cross-linux.patch @@ -0,0 +1,27 @@ +diff -ru libpcap-0.9.5~/configure.in libpcap-0.9.5/configure.in +--- libpcap-0.9.5~/configure.in 2007-05-05 12:43:21.000000000 +0200 ++++ libpcap-0.9.5/configure.in 2007-05-05 12:43:41.000000000 +0200 +@@ -178,7 +178,10 @@ + dnl XXX This could be done for cross-compiling, but for now it's not. + dnl + if test -z "$with_pcap" && test "$cross_compiling" = yes; then +- AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...) ++ case $host in ++ *-linux*) with_pcap="linux";; ++ *) AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...);; ++ esac + fi + AC_ARG_WITH(pcap, [ --with-pcap=TYPE use packet capture TYPE]) + AC_MSG_CHECKING(packet capture type) +@@ -347,8 +350,10 @@ + linux) + AC_MSG_CHECKING(Linux kernel version) + if test "$cross_compiling" = yes; then ++ dnl we could check linux/version.h here, but who runs ++ dnl versions of linux older than 2.0.x anymore to bother ? + AC_CACHE_VAL(ac_cv_linux_vers, +- ac_cv_linux_vers=unknown) ++ ac_cv_linux_vers=2) + else + AC_CACHE_VAL(ac_cv_linux_vers, + ac_cv_linux_vers=`uname -r 2>&1 | \ diff --git a/net-libs/libpcap/libpcap-0.9.5.ebuild b/net-libs/libpcap/libpcap-0.9.5.ebuild index fae62215a1d9..e95888b59030 100644 --- a/net-libs/libpcap/libpcap-0.9.5.ebuild +++ b/net-libs/libpcap/libpcap-0.9.5.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/libpcap-0.9.5.ebuild,v 1.12 2007/04/22 22:14:42 kanaka Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/libpcap-0.9.5.ebuild,v 1.13 2007/05/05 10:52:19 cedk Exp $ -inherit eutils multilib toolchain-funcs +inherit autotools eutils multilib toolchain-funcs DESCRIPTION="A system-independent library for user-level network packet capture" HOMEPAGE="http://www.tcpdump.org/" @@ -21,24 +21,12 @@ src_unpack() { unpack ${A}; cd "${S}" epatch "${FILESDIR}"/${PN}-0.9.3-whitespace.diff epatch "${FILESDIR}"/${PN}-0.8.1-fPIC.patch + epatch "${FILESDIR}"/${PN}-cross-linux.patch + eautoreconf } src_compile() { - MY_OPTS="" - if tc-is-cross-compiler; then - if [[ "${LIBPCAP_PCAP}" == "linux" ]]; then - MY_OPTS="--with-pcap=linux" - elif [[ "${LIBPCAP_PCAP}" == "bpf" ]]; then - MY_OPTS="--with-pcap=bpf" - else - eerror "When cross compile, you must set" - eerror "the env variable to one of these values:" - eerror " linux" - eerror " bpf" - die "LIBPCAP_PCAP is not set" - fi - fi - econf $(use_enable ipv6) ${MY_OPTS} || die "bad configure" + econf $(use_enable ipv6) || die "bad configure" emake || die "compile problem" # no provision for this in the Makefile, so... |