depends(wayland): expose native wayland-scanner to cross meson

Target wayland (-Dscanner=false) resolves the host scanner via dependency(..., native: true), which uses meson's BUILD-machine pkg-config — not pointed at build_prefix. Add PKG_CONFIG_PATH_FOR_BUILD=build_prefix + a [binaries] wayland-scanner in the cross-file. Fixes 'Dependency wayland-scanner not found' on aarch64/riscv64.
This commit is contained in:
jwinterm
2026-06-21 07:54:52 -04:00
parent 97a4304add
commit 1529edc432
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ define $(package)_preprocess_cmds
endef
define $(package)_config_cmds
PKG_CONFIG_LIBDIR="$(host_prefix)/lib/pkgconfig:$(build_prefix)/lib/pkgconfig" PKG_CONFIG_PATH="$(build_prefix)/lib/pkgconfig" meson setup --cross-file toolchain.txt build -Ddtd_validation=false -Ddocumentation=false -Dprefer_static=true -Ddefault_library=static -Dtests=false -Dscanner=false
PKG_CONFIG_LIBDIR="$(host_prefix)/lib/pkgconfig:$(build_prefix)/lib/pkgconfig" PKG_CONFIG_PATH="$(build_prefix)/lib/pkgconfig" PKG_CONFIG_PATH_FOR_BUILD="$(build_prefix)/lib/pkgconfig" meson setup --cross-file toolchain.txt build -Ddtd_validation=false -Ddocumentation=false -Dprefer_static=true -Ddefault_library=static -Dtests=false -Dscanner=false
endef
define $(package)_build_cmds
@@ -4,6 +4,7 @@ cpp = '@cxx@'
ar = '@ar@'
strip = '@strip@'
pkgconfig = 'pkg-config'
wayland-scanner = '@build_prefix@/bin/wayland-scanner'
[host_machine]
system = 'linux'