0001-wscript-use-find_program-to-find-wayland-scanner.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 303d5c4fef1760ede5786bc62c7012dd7ae93722 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 8 Nov 2020 23:46:49 +0100
  4. Subject: [PATCH] wscript: use find_program to find wayland-scanner
  5. Use find_program instead of check_cfg to find wayland-scanner. This will
  6. fix the following build failure when cross-compiling:
  7. [ 3/73] Compiling doc/glmark2.1.in
  8. /bin/sh: 1: /usr/bin/wayland-scanner: not found
  9. Fixes:
  10. - http://autobuild.buildroot.org/results//361dc40e558e2646cb93f405c7b1f621d400fea3
  11. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  12. ---
  13. src/wscript_build | 2 +-
  14. wscript | 3 +--
  15. 2 files changed, 2 insertions(+), 3 deletions(-)
  16. diff --git a/src/wscript_build b/src/wscript_build
  17. index bbe7a77..ed3e8d6 100644
  18. --- a/src/wscript_build
  19. +++ b/src/wscript_build
  20. @@ -51,7 +51,7 @@ else:
  21. if 'WAYLAND_SCANNER_wayland_scanner' in bld.env.keys():
  22. def wayland_scanner_cmd(arg, src):
  23. - return '%s %s < %s > ${TGT}' % (bld.env['WAYLAND_SCANNER_wayland_scanner'], arg, src)
  24. + return '%s %s < %s > ${TGT}' % (bld.env['WAYLAND_SCANNER_wayland_scanner'][0], arg, src)
  25. def wayland_proto_src_path(proto, ver):
  26. wp_dir = bld.env['WAYLAND_PROTOCOLS_pkgdatadir']
  27. diff --git a/wscript b/wscript
  28. index e09fa78..fe2494f 100644
  29. --- a/wscript
  30. +++ b/wscript
  31. @@ -227,8 +227,7 @@ def configure_linux(ctx):
  32. # wayland-protocols >= 1.12 required for xdg-shell stable
  33. ctx.check_cfg(package = 'wayland-protocols', atleast_version = '1.12',
  34. variables = ['pkgdatadir'], uselib_store = 'WAYLAND_PROTOCOLS')
  35. - ctx.check_cfg(package = 'wayland-scanner', variables = ['wayland_scanner'],
  36. - uselib_store = 'WAYLAND_SCANNER')
  37. + ctx.find_program('wayland-scanner', var = 'WAYLAND_SCANNER_wayland_scanner')
  38. # Prepend CXX flags so that they can be overriden by the
  39. # CXXFLAGS environment variable
  40. --
  41. 2.28.0