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

5544c1
From 79467d7c3fe963b39b00c884a5624cb1e754db9d 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
5544c1
Subject: [PATCH] usb-redir: Adjust pkg-config check for usbredirparser .pc
5544c1
 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
5544c1
index 2c4469f..f019526 100755
Hans de Goede 5ba1a7
--- a/configure
Hans de Goede 5ba1a7
+++ b/configure
5544c1
@@ -2758,10 +2758,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
-- 
5544c1
1.7.12.1
Hans de Goede 5ba1a7