package/wine: select libxkbcommon and libxml2 for the Wayland driver

wine.mk passes --with-wayland whenever BR2_PACKAGE_WAYLAND is enabled,
but nothing guarantees the rest of what wine's Wayland test needs is in
the configuration. That test is:

  WINE_NOTICE_WITH(wayland, [test -z "$WAYLAND_CLIENT_LIBS" \
    -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" \
    -o -z "$XKBREGISTRY_LIBS" -o "$ac_cv_header_linux_input_h" = "no"], ...)

and because --with-wayland is passed explicitly, WINE_NOTICE_WITH turns
into AC_MSG_ERROR rather than a notice.

So wine needs libxkbcommon, and it needs the libxkbregistry part of it,
which is only built when libxml2 is available. Select both when Wayland
support is enabled, and add libxkbcommon to the build dependencies.

Note that libxml2 is not a direct dependency of wine, it only has to be
in the configuration so that libxkbcommon builds libxkbregistry; the
build ordering is handled by libxkbcommon's own dependency on libxml2.

Signed-off-by: Alsey Coleman Miller <alseycmiller@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit a5e7f7af9f)
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
This commit is contained in:
Alsey Coleman Miller
2026-08-09 16:14:03 -04:00
committed by Titouan Christophe
parent a86d248b07
commit 13b42633d3
2 changed files with 6 additions and 1 deletions

View File

@@ -17,6 +17,11 @@ config BR2_PACKAGE_WINE
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
select BR2_PACKAGE_ALSA_LIB_SEQ if BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_LIB_RAWMIDI if BR2_PACKAGE_ALSA_LIB
# The Wayland driver needs libxkbcommon, including its
# libxkbregistry part, which is only built when libxml2 is
# available.
select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_LIBXML2 if BR2_PACKAGE_WAYLAND
help
Wine is a compatibility layer capable of running Windows
applications on Linux. Instead of simulating internal

View File

@@ -195,7 +195,7 @@ endif
ifeq ($(BR2_PACKAGE_WAYLAND),y)
WINE_CONF_OPTS += --with-wayland
WINE_DEPENDENCIES += wayland
WINE_DEPENDENCIES += wayland libxkbcommon
else
WINE_CONF_OPTS += --without-wayland
endif