From 30823602b77837b5506be273c02b985d7281daa1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mar 11 2013 17:12:05 +0000 Subject: Use pkg-config to search for libiscsi --- diff --git a/0108-iscsi-look-for-pkg-config-file-too.patch b/0108-iscsi-look-for-pkg-config-file-too.patch new file mode 100644 index 0000000..8c60ee3 --- /dev/null +++ b/0108-iscsi-look-for-pkg-config-file-too.patch @@ -0,0 +1,36 @@ +From: Paolo Bonzini +Subject: [PATCH 3/6] iscsi: look for pkg-config file too +Date: Tue, 5 Mar 2013 18:05:22 +0100 + +Due to library conflicts, Fedora will have to put libiscsi in +/usr/lib/iscsi. Simplify configuration by using a pkg-config +file. The Fedora package will distribute one, and the patch +to add it has been sent to upstream libiscsi as well. + +Cc: qemu-stable@nongnu.org +Signed-off-by: Paolo Bonzini +--- + configure | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index 2f98c5a..a9a7c99 100755 +--- a/configure ++++ b/configure +@@ -2803,7 +2803,13 @@ if test "$libiscsi" != "no" ; then + #include + int main(void) { iscsi_unmap_sync(NULL,0,0,0,NULL,0); return 0; } + EOF +- if compile_prog "" "-liscsi" ; then ++ if $pkg_config --atleast-version=1.7.0 libiscsi --modversion >/dev/null 2>&1; then ++ libiscsi="yes" ++ libiscsi_cflags=$($pkg_config --cflags libiscsi 2>/dev/null) ++ libiscsi_libs=$($pkg_config --libs libiscsi 2>/dev/null) ++ CFLAGS="$CFLAGS $libiscsi_cflags" ++ LIBS="$LIBS $libiscsi_libs" ++ elif compile_prog "" "-liscsi" ; then + libiscsi="yes" + LIBS="$LIBS -liscsi" + else +-- +1.8.1.2 diff --git a/qemu.spec b/qemu.spec index 62b8616..66a4e9a 100644 --- a/qemu.spec +++ b/qemu.spec @@ -120,7 +120,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 1.4.0 -Release: 3%{?dist} +Release: 4%{?dist} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD @@ -187,6 +187,8 @@ Patch0105: 0105-qxl-Add-rom_size-compat-property-fix-migration-from-.patch Patch0106: 0106-docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch # Fix test ordering with latest glib Patch0107: 0107-rtc-test-Fix-test-failures-with-recent-glib.patch +# Adapt to libiscsi packaging in Fedora (included upstream) +Patch0108: 0108-iscsi-look-for-pkg-config-file-too.patch BuildRequires: SDL-devel @@ -651,6 +653,8 @@ CAC emulation development files. %patch0106 -p1 # Fix test ordering with latest glib %patch0107 -p1 +# Adapt to libiscsi packaging in Fedora (included upstream) +%patch0108 -p1 %build @@ -1249,7 +1253,10 @@ getent passwd qemu >/dev/null || \ %{_libdir}/pkgconfig/libcacard.pc %changelog -* Mon Mar 11 2013 Paolo Bonzini - 2:1.3.0-8 +* Mon Mar 11 2013 Paolo Bonzini - 2:1.4.0-4 +- Use pkg-config to search for libiscsi + +* Mon Mar 11 2013 Paolo Bonzini - 2:1.4.0-3 - Added libiscsi-devel BuildRequires * Fri Mar 01 2013 Cole Robinson - 2:1.4.0-2