package/glmark2: fix wayland build

wayland-protocols is needed since
58763e2c13

Fixes:
 - http://autobuild.buildroot.org/results/6106f07602c014897331daac3de01ac4a74e2016
 - http://autobuild.buildroot.org/results/b8d43fad291022cbc6e43988fe6bec14f594591a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabrice Fontaine 2020-11-09 00:09:32 +01:00 committed by Peter Korsgaard
parent 14ed65e3a6
commit 9c068b4be8
3 changed files with 54 additions and 2 deletions

View File

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

View File

@ -24,6 +24,7 @@ config BR2_PACKAGE_GLMARK2_FLAVOR_WAYLAND_GLESV2
depends on BR2_PACKAGE_HAS_LIBGLES
depends on BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_GLMARK2_FLAVOR_ANY
select BR2_PACKAGE_WAYLAND_PROTOCOLS
config BR2_PACKAGE_GLMARK2_FLAVOR_WAYLAND_GL
bool
@ -32,6 +33,7 @@ config BR2_PACKAGE_GLMARK2_FLAVOR_WAYLAND_GL
depends on BR2_PACKAGE_HAS_LIBGL
depends on BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_GLMARK2_FLAVOR_ANY
select BR2_PACKAGE_WAYLAND_PROTOCOLS
config BR2_PACKAGE_GLMARK2_FLAVOR_X11_GLESV2
bool

View File

@ -31,12 +31,12 @@ GLMARK2_FLAVORS += x11-gl
endif
ifeq ($(BR2_PACKAGE_GLMARK2_FLAVOR_WAYLAND_GLESV2),y)
GLMARK2_DEPENDENCIES += libgles wayland
GLMARK2_DEPENDENCIES += libgles wayland wayland-protocols
GLMARK2_FLAVORS += wayland-glesv2
endif
ifeq ($(BR2_PACKAGE_GLMARK2_FLAVOR_WAYLAND_GL),y)
GLMARK2_DEPENDENCIES += libgl wayland
GLMARK2_DEPENDENCIES += libgl wayland wayland-protocols
GLMARK2_FLAVORS += wayland-gl
endif