dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

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

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