libffado-2.4.0-pyqt5-dbus-detection.patch 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. ------------------------------------------------------------------------
  2. r2725 | jwoithe | 2018-01-05 18:40:19 +0900 (Fri, 05 Jan 2018) | 11 lines
  3. SCons: fix detection of dbus on PyQt5 systems.
  4. The detection of the dbus python modules was qualified on the presence of
  5. pyuic4. On systems with only PyQt5 this would obviously fail. Patch from
  6. Orcan Ogetbil via the ffado-devel mailing list.
  7. r2724 inadvertently included a change to SConstruct to import sys. This is
  8. needed since sys.stdout is referenced in some situations (in particular, if
  9. jack is not installed in the build environment). This patch was also from
  10. Orcan Ogetbil, via the ffado-devel mailing list.
  11. Index: SConstruct
  12. ===================================================================
  13. --- a/SConstruct (revision 2724)
  14. +++ b/SConstruct (revision 2725)
  15. @@ -396,7 +396,7 @@
  16. # PyQT checks
  17. if env['BUILD_MIXER'] != 'false':
  18. - have_dbus = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' ))
  19. + have_dbus = ((conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' )) or (conf.CheckForApp( 'which pyuic5' ) and conf.CheckForPyModule( 'dbus.mainloop.pyqt5' )))
  20. have_pyqt4 = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'PyQt4' ))
  21. have_pyqt5 = (conf.CheckForApp( 'which pyuic5' ) and conf.CheckForPyModule( 'PyQt5' ))
  22. if ((have_pyqt4 or have_pyqt5) and have_dbus):
  23. ------------------------------------------------------------------------