diff mbox series

package/libxkbcommon: enable wayland support

Message ID SN4P221MB068281FE13C893DCE2F2ACCAA06A9@SN4P221MB0682.NAMP221.PROD.OUTLOOK.COM
State Superseded
Headers show
Series package/libxkbcommon: enable wayland support | expand

Commit Message

James Knight April 27, 2023, 1:50 a.m. UTC
Tweak the applied configuration options to flag support for Wayland if
the wayland package is detected. This will allow the generation of the
`interactive-wayland` utility (when `BR2_PACKAGE_LIBXKBCOMMON_TOOLS` is
also configured).

Signed-off-by: James Knight <james.d.knight@live.com>
---
 package/libxkbcommon/Config.in       | 1 +
 package/libxkbcommon/libxkbcommon.mk | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

Comments

Peter Seiderer April 27, 2023, 8:46 p.m. UTC | #1
Hello James,

On Wed, 26 Apr 2023 21:50:14 -0400, James Knight <james.d.knight@live.com> wrote:

> Tweak the applied configuration options to flag support for Wayland if
> the wayland package is detected. This will allow the generation of the
> `interactive-wayland` utility (when `BR2_PACKAGE_LIBXKBCOMMON_TOOLS` is
> also configured).
>
> Signed-off-by: James Knight <james.d.knight@live.com>
> ---
>  package/libxkbcommon/Config.in       | 1 +
>  package/libxkbcommon/libxkbcommon.mk | 8 +++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/package/libxkbcommon/Config.in b/package/libxkbcommon/Config.in
> index e9f61227a02b55a0123318f27b296ce2c8b4ad36..c344eb78b6d0cbc72ff382ccf0682811f9a2ecfb 100644
> --- a/package/libxkbcommon/Config.in
> +++ b/package/libxkbcommon/Config.in
> @@ -1,6 +1,7 @@
>  config BR2_PACKAGE_LIBXKBCOMMON
>  	bool "libxkbcommon"
>  	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
> +	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
>  	help
>  	  xkbcommon is a keymap compiler and support library which
>  	  processes a reduced subset of keymaps as defined by the XKB

As stated above (and as used in meson.build) the 'enable-wayland' is only used for
the tools, so I would have expected something like the following:

diff --git a/package/libxkbcommon/Config.in b/package/libxkbcommon/Config.in
index e9f61227a0..c7fe188a0e 100644
--- a/package/libxkbcommon/Config.in
+++ b/package/libxkbcommon/Config.in
@@ -12,6 +12,7 @@ if BR2_PACKAGE_LIBXKBCOMMON

 config BR2_PACKAGE_LIBXKBCOMMON_TOOLS
        bool "tools"
+       select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
        help
          Tools: xkbcli, xkbcli-compile-keymap, xkbcli-how-to-type,
          xkbcli-interactive-evdev, xkbcli-interactive-x11,

> diff --git a/package/libxkbcommon/libxkbcommon.mk b/package/libxkbcommon/libxkbcommon.mk
> index 236bf4c5d94d163809056691339ed7660e545195..2bbe349771360d34c0ff73bf871ed5621120b312 100644
> --- a/package/libxkbcommon/libxkbcommon.mk
> +++ b/package/libxkbcommon/libxkbcommon.mk
> @@ -14,7 +14,6 @@ LIBXKBCOMMON_INSTALL_STAGING = YES
>  LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex
>  LIBXKBCOMMON_CONF_OPTS = \
>  	-Denable-docs=false \
> -	-Denable-wayland=false \
>  	-Denable-xkbregistry=false
>
>  ifeq ($(BR2_PACKAGE_XORG7),y)
> @@ -24,6 +23,13 @@ else
>  LIBXKBCOMMON_CONF_OPTS += -Denable-x11=false
>  endif
>
> +ifeq ($(BR2_PACKAGE_WAYLAND),y)
> +LIBXKBCOMMON_CONF_OPTS += -Denable-wayland=true
> +LIBXKBCOMMON_DEPENDENCIES += wayland wayland-protocols
> +else
> +LIBXKBCOMMON_CONF_OPTS += -Denable-wayland=false
> +endif
> +
>  ifeq ($(BR2_PACKAGE_LIBXKBCOMMON_TOOLS),y)
>  LIBXKBCOMMON_CONF_OPTS += -Denable-tools=true
>  else

And here:

diff --git a/package/libxkbcommon/libxkbcommon.mk b/package/libxkbcommon/libxkbcommon.mk
index 236bf4c5d9..d89ba47425 100644
--- a/package/libxkbcommon/libxkbcommon.mk
+++ b/package/libxkbcommon/libxkbcommon.mk
@@ -14,7 +14,6 @@ LIBXKBCOMMON_INSTALL_STAGING = YES
 LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex
 LIBXKBCOMMON_CONF_OPTS = \
        -Denable-docs=false \
-       -Denable-wayland=false \
        -Denable-xkbregistry=false

 ifeq ($(BR2_PACKAGE_XORG7),y)
@@ -26,8 +25,15 @@ endif

 ifeq ($(BR2_PACKAGE_LIBXKBCOMMON_TOOLS),y)
 LIBXKBCOMMON_CONF_OPTS += -Denable-tools=true
+ifeq ($(BR2_PACKAGE_WAYLAND),y)
+LIBXKBCOMMON_CONF_OPTS += -Denable-wayland=true
+LIBXKBCOMMON_DEPENDENCIES += wayland wayland-protocols
+else
+LIBXKBCOMMON_CONF_OPTS += -Denable-wayland=false
+endif
 else
 LIBXKBCOMMON_CONF_OPTS += -Denable-tools=false
+LIBXKBCOMMON_CONF_OPTS += -Denable-wayland=false
 endif

 $(eval $(meson-package))

Or (matter of taste) using:

  ifeq ($(BR2_PACKAGE_LIBXKBCOMMON_TOOLS)$(BR2_PACKAGE_WAYLAND),yy)
  [...]
  endif

Regards,
Peter
diff mbox series

Patch

diff --git a/package/libxkbcommon/Config.in b/package/libxkbcommon/Config.in
index e9f61227a02b55a0123318f27b296ce2c8b4ad36..c344eb78b6d0cbc72ff382ccf0682811f9a2ecfb 100644
--- a/package/libxkbcommon/Config.in
+++ b/package/libxkbcommon/Config.in
@@ -1,6 +1,7 @@ 
 config BR2_PACKAGE_LIBXKBCOMMON
 	bool "libxkbcommon"
 	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
 	help
 	  xkbcommon is a keymap compiler and support library which
 	  processes a reduced subset of keymaps as defined by the XKB
diff --git a/package/libxkbcommon/libxkbcommon.mk b/package/libxkbcommon/libxkbcommon.mk
index 236bf4c5d94d163809056691339ed7660e545195..2bbe349771360d34c0ff73bf871ed5621120b312 100644
--- a/package/libxkbcommon/libxkbcommon.mk
+++ b/package/libxkbcommon/libxkbcommon.mk
@@ -14,7 +14,6 @@  LIBXKBCOMMON_INSTALL_STAGING = YES
 LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex
 LIBXKBCOMMON_CONF_OPTS = \
 	-Denable-docs=false \
-	-Denable-wayland=false \
 	-Denable-xkbregistry=false
 
 ifeq ($(BR2_PACKAGE_XORG7),y)
@@ -24,6 +23,13 @@  else
 LIBXKBCOMMON_CONF_OPTS += -Denable-x11=false
 endif
 
+ifeq ($(BR2_PACKAGE_WAYLAND),y)
+LIBXKBCOMMON_CONF_OPTS += -Denable-wayland=true
+LIBXKBCOMMON_DEPENDENCIES += wayland wayland-protocols
+else
+LIBXKBCOMMON_CONF_OPTS += -Denable-wayland=false
+endif
+
 ifeq ($(BR2_PACKAGE_LIBXKBCOMMON_TOOLS),y)
 LIBXKBCOMMON_CONF_OPTS += -Denable-tools=true
 else