libvirt: use pkg-config to locate libcap

libvirt wants to use pcap-config to locate the exisence and location
of libpcap. oe-core stubs this script and replaces it with pkg-config,
which can lead to the host pcap-config triggering and either breaking
the build or introducing host contamination.

To fix this issue, we patch configure to use 'pkg-config libcap' to
locate the correct libraries.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Bruce Ashfield 2015-04-08 13:12:56 -04:00
parent 9a095cb70e
commit 29bca75fa6
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From 3e271f6db12ffe34843428ec2f0bca7a8fe3aa65 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Wed, 8 Apr 2015 13:03:03 -0400
Subject: [PATCH] libvirt: use pkg-config to locate libcap
libvirt wants to use pcap-config to locate the exisence and location
of libpcap. oe-core stubs this script and replaces it with pkg-config,
which can lead to the host pcap-config triggering and either breaking
the build or introducing host contamination.
To fix this issue, we patch configure to use 'pkg-config libcap' to
locate the correct libraries.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
configure.ac | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index f37047599b76..5f9b84363b96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1553,7 +1553,7 @@ fi
AM_CONDITIONAL([HAVE_NUMAD], [test "$with_numad" != "no"])
dnl pcap lib
-LIBPCAP_CONFIG="pcap-config"
+LIBPCAP_CONFIG="pkg-config libpcap"
LIBPCAP_CFLAGS=""
LIBPCAP_LIBS=""
LIBPCAP_FOUND="no"
@@ -1563,8 +1563,8 @@ AC_ARG_WITH([libpcap], [AS_HELP_STRING([--with-libpcap=@<:@PFX@:>@],
if test "$with_qemu" = "yes"; then
case $with_libpcap in
no) LIBPCAP_CONFIG= ;;
- ''|yes) LIBPCAP_CONFIG="pcap-config" ;;
- *) LIBPCAP_CONFIG="$with_libpcap/bin/pcap-config" ;;
+ ''|yes) LIBPCAP_CONFIG="pkg-config libpcap" ;;
+ *) LIBPCAP_CONFIG="$with_libpcap/bin/pkg-config libpcap" ;;
esac
AS_IF([test "x$LIBPCAP_CONFIG" != "x"], [
AC_MSG_CHECKING(libpcap $LIBPCAP_CONFIG >= $LIBPCAP_REQUIRED )
--
2.1.0

View File

@ -31,6 +31,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \
file://run-ptest \
file://tests-allow-separated-src-and-build-dirs.patch \
file://libvirt-Fix-cannot-symlink-cpu_map.xml-error.patch \
file://libvirt-use-pkg-config-to-locate-libcap.patch \
"
SRC_URI[libvirt.md5sum] = "2ae99535265ce4687d8718d744024c27"