dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0370-usb-redir-Adjust-pkg-config-check-for-usbredirparser.patch

Hans de Goede 5ba1a7
From a873076925e599afe3852f87546e479f23c279ba Mon Sep 17 00:00:00 2001
Hans de Goede 5ba1a7
From: Hans de Goede <hdegoede@redhat.com>
Hans de Goede 5ba1a7
Date: Tue, 25 Sep 2012 13:22:21 +0200
Hans de Goede 5ba1a7
Subject: [PATCH 370/382] usb-redir: Adjust pkg-config check for
Hans de Goede 5ba1a7
 usbredirparser .pc file rename (v2)
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
The usbredir 0.5 release introduced the new API for 64 bit packet ids, but
Hans de Goede 5ba1a7
it kept the libusbredirparser.pc name as is, meaning that older versions of
Hans de Goede 5ba1a7
qemu will still have their pkg-config check for usbredirparser fulfilled,
Hans de Goede 5ba1a7
and build with the usb-redir device. Due to the API change there will be
Hans de Goede 5ba1a7
some compiler warnings, but the build will succeed, however the usb-redir
Hans de Goede 5ba1a7
device will be broken on 32 bit machines.
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
To solve this a new usbredir-0.5.2 release is coming, which renames the
Hans de Goede 5ba1a7
libusbredirparser.pc file to libusbredirparser-0.5.pc, so that it will no
Hans de Goede 5ba1a7
longer fulfill the pkg-config check of the qemu-1.2 and older releases,
Hans de Goede 5ba1a7
stopping the (silent) breakage. This patch adjusts qemu master's configure
Hans de Goede 5ba1a7
to properly detect the new usbredir release.
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
Changes in v2:
Hans de Goede 5ba1a7
-Not only use the new .pc name in the check but also when getting cflags
Hans de Goede 5ba1a7
 and libs!
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede 5ba1a7
---
Hans de Goede 5ba1a7
 configure | 6 +++---
Hans de Goede 5ba1a7
 1 file changed, 3 insertions(+), 3 deletions(-)
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
diff --git a/configure b/configure
Hans de Goede 5ba1a7
index d63530a..6c8b8c9 100755
Hans de Goede 5ba1a7
--- a/configure
Hans de Goede 5ba1a7
+++ b/configure
Hans de Goede 5ba1a7
@@ -2765,10 +2765,10 @@ fi
Hans de Goede 5ba1a7
 
Hans de Goede 5ba1a7
 # check for usbredirparser for usb network redirection support
Hans de Goede 5ba1a7
 if test "$usb_redir" != "no" ; then
Hans de Goede 5ba1a7
-    if $pkg_config --atleast-version=0.5 libusbredirparser >/dev/null 2>&1 ; then
Hans de Goede 5ba1a7
+    if $pkg_config --atleast-version=0.5 libusbredirparser-0.5 >/dev/null 2>&1 ; then
Hans de Goede 5ba1a7
         usb_redir="yes"
Hans de Goede 5ba1a7
-        usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null)
Hans de Goede 5ba1a7
-        usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null)
Hans de Goede 5ba1a7
+        usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5 2>/dev/null)
Hans de Goede 5ba1a7
+        usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5 2>/dev/null)
Hans de Goede 5ba1a7
         QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
Hans de Goede 5ba1a7
         libs_softmmu="$libs_softmmu $usb_redir_libs"
Hans de Goede 5ba1a7
     else
Hans de Goede 5ba1a7
-- 
Hans de Goede 5ba1a7
1.7.12
Hans de Goede 5ba1a7