0002-configure-set-qws.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Add support for several Qt flavors
  2. Qt has two flavors: X11 and embedded (QWS). QWS has some limitations
  3. compared to X11. This patch adds an option to select which version to
  4. use.
  5. Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
  6. ---
  7. Index: PyQt-x11-gpl-4.11.3/configure-ng.py
  8. ===================================================================
  9. --- PyQt-x11-gpl-4.11.3.orig/configure-ng.py
  10. +++ PyQt-x11-gpl-4.11.3/configure-ng.py
  11. @@ -960,6 +960,9 @@ int main(int argc, char **argv)
  12. if opts.vendlibdir is not None:
  13. self.vend_lib_dir = opts.vendlibdir
  14. + if opts.qtflavor is not None:
  15. + self.qt_flavor = opts.qtflavor
  16. +
  17. # Handle any conflicts.
  18. if self.qt_shared:
  19. if len(self.static_plugins) != 0:
  20. @@ -1177,6 +1180,11 @@ def create_optparser(target_config):
  21. dest="notools",
  22. help="disable the building of pyuic5, pyrcc5 and pylupdate5 "
  23. "[default: enabled]")
  24. + g.add_option("--qt-flavor", dest='qtflavor', type='string',
  25. + default="WS_X11", metavar='QTFLAVOR', action='store',
  26. + help="select Qt flavor beetween WS_X11 and WS_QWS "
  27. + "only available on Linux)"
  28. + "[default: WS_X11]")
  29. p.add_option_group(g)
  30. # Vendor ID.
  31. @@ -2088,7 +2096,7 @@ def get_sip_flags(target_config):
  32. elif target_config.py_platform == 'darwin':
  33. plattag = 'WS_MACX'
  34. else:
  35. - plattag = 'WS_X11'
  36. + plattag = target_config.qt_flavor
  37. sip_flags.append('-t')
  38. sip_flags.append(plattag)