0001-configure-fix-detection-of-gdbus-codegen.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 464cfc64201b21386030b8f353fe9724a3413a85 Mon Sep 17 00:00:00 2001
  2. From: Paolo Bonzini <pbonzini@redhat.com>
  3. Date: Wed, 5 May 2021 10:15:34 -0400
  4. Subject: [PATCH] configure: fix detection of gdbus-codegen
  5. "pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
  6. and it does not pass test -x (which does not walk the path).
  7. Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
  8. assignment in tests/qtest/meson.build uses an empty string as the
  9. command, and fails very eloquently:
  10. ../tests/qtest/meson.build:92:2: ERROR: No program name specified.
  11. Use the "has" function instead of test -x, and fix the generation
  12. of config-host.mak since meson.build expects that GDBUS_CODEGEN
  13. is absent, rather than empty, if the tool is unavailable.
  14. Reported-by: Sebastian Mitterle <smitterl@redhat.com>
  15. Fixes: #178
  16. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  17. Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5ecfb76ccc056eb6127e44268e475827ae73b9e0]
  18. (not in 6.0.0, should be kept when upgrading)
  19. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  20. ---
  21. configure | 4 +++-
  22. 1 file changed, 3 insertions(+), 1 deletion(-)
  23. Index: qemu-6.0.0/configure
  24. ===================================================================
  25. --- qemu-6.0.0.orig/configure
  26. +++ qemu-6.0.0/configure
  27. @@ -3366,7 +3366,7 @@ if ! test "$gio" = "no"; then
  28. gio_cflags=$($pkg_config --cflags gio-2.0)
  29. gio_libs=$($pkg_config --libs gio-2.0)
  30. gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
  31. - if [ ! -x "$gdbus_codegen" ]; then
  32. + if ! has "$gdbus_codegen"; then
  33. gdbus_codegen=
  34. fi
  35. # Check that the libraries actually work -- Ubuntu 18.04 ships
  36. @@ -5704,6 +5704,8 @@ if test "$gio" = "yes" ; then
  37. echo "CONFIG_GIO=y" >> $config_host_mak
  38. echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
  39. echo "GIO_LIBS=$gio_libs" >> $config_host_mak
  40. +fi
  41. +if test "$gdbus_codegen" != "" ; then
  42. echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
  43. fi
  44. echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak