libxkbcommon: disable wayland support
PATCH v2 1/2 libxkbcommon: disable wayland support
Disable wayland support (only needed for the interactive-wayland test program). This fixes a compile failure in case wayland support is autodetected:
GEN xdg-shell-unstable-v5-protocol.c
/bin/sh: /usr/bin/wayland-scanner: No such file or directory Makefile:2426: recipe for target 'xdg-shell-unstable-v5-protocol.c' failed make[3]: *** [xdg-shell-unstable-v5-protocol.c] Error 127
make[3]: *** Waiting for unfinished jobs....
GEN xdg-shell-unstable-v5-client-protocol.h
/bin/sh: /usr/bin/wayland-scanner: No such file or directory Makefile:2428: recipe for target 'xdg-shell-unstable-v5-client-protocol.h' failed make[3]: *** [xdg-shell-unstable-v5-client-protocol.h] Error 127
---
Changes v2:
- split out the disable-wayland fix
--- package/libxkbcommon/libxkbcommon.mk | 1 + 1 file changed, 1 insertion(+)
package/libxkbcommon/libxkbcommon.mk +1 -0
@@ -11,6 +11,7 @@ LIBXKBCOMMON_LICENSE = MIT/X11 LIBXKBCOMMON_LICENSE_FILES = LICENSE LIBXKBCOMMON_INSTALL_STAGING = YES LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex +LIBXKBCOMMON_CONF_OPTS = --disable-wayland # uses C99 features LIBXKBCOMMON_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
Signature · 1 line
2.11.0
PATCH v2 2/2 libxkbcommon: add support for interactive-wayland test program
In case of enabled wayland support add an option for the interactive-wayland test program. Otherwise disable wayland support.
Patch 0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch
is inspired from mesa3d/0005-configure.ac-invert-order-for-wayland-scanner-check.patch.
---
Changes v1 -> v2:
- split out the disable-wayland fix
- add autoreconf induced host-xutil_util-macros dependency
--- ...c-prefere-AC_PATH_PROG-for-wayland-scanne.patch | 33 ++++++++++++++++++++++ package/libxkbcommon/Config.in | 12 ++++++++ package/libxkbcommon/libxkbcommon.mk | 24 +++++++++++++++- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b44b0d5323985661b508948eac725048affd3221 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 8 Mar 2017 09:36:39 +0100 +Subject: [PATCH] configure.ac: prefere AC_PATH_PROG for wayland-scanner + +Prefere AC_PATH_PROG result for wayland-scanner over the +pkg-config version (when cross-compiling the .pc file might +point to the wrong wayland-scanner binary (target rather than +host) resulting in a non-executable and wrong scanner). + +Signed-off-by: Peter Seiderer <[email protected]> +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 725915b..e4ff9d2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -194,7 +194,9 @@ AS_IF([test "x$enable_wayland" = xyes], [ + [AC_MSG_ERROR([Wayland utilities require libwayland-client >= 1.2 which was not found. \ + You can disable Wayland support with --disable-wayland.])]) + AC_PATH_PROG([wayland_scanner], [wayland-scanner]) +- wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` ++ if test "x$wayland_scanner" = x; then ++ wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` ++ fi + ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` + AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir) + ], [enable_wayland=no]) +-- +2.11.0 +
package/libxkbcommon/Config.in +12 -0
@@ -1,9 +1,21 @@ 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 specification. http://xkbcommon.org/ + +if BR2_PACKAGE_LIBXKBCOMMON && BR2_PACKAGE_WAYLAND + +config BR2_PACKAGE_LIBXKBCOMMON_INTERACTIVE_WAYLAND + bool "interactive-wayland" + select BR2_PACKAGE_WAYLAND_PROTOCOLS + help + interactive-wayland is a wayland test application + for libxkbcommon. + +endif
package/libxkbcommon/libxkbcommon.mk +23 -1
@@ -11,7 +11,12 @@ LIBXKBCOMMON_LICENSE = MIT/X11 LIBXKBCOMMON_LICENSE_FILES = LICENSE LIBXKBCOMMON_INSTALL_STAGING = YES LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex -LIBXKBCOMMON_CONF_OPTS = --disable-wayland + +# patch 0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch +# touches configure.ac +LIBXKBCOMMON_AUTORECONF = YES +LIBXKBCOMMON_DEPENDENCIES += host-xutil_util-macros + # uses C99 features LIBXKBCOMMON_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
@@ -22,4 +27,21 @@ else LIBXKBCOMMON_CONF_OPTS += --disable-x11 endif +ifeq ($(BR2_PACKAGE_LIBXKBCOMMON_INTERACTIVE_WAYLAND),y) +LIBXKBCOMMON_CONF_OPTS += --enable-wayland +LIBXKBCOMMON_DEPENDENCIES += wayland wayland-protocols +LIBXKBCOMMON_CONF_ENV += ac_cv_path_wayland_scanner=$(HOST_DIR)/usr/bin/wayland-scanner +define LIBXKBCOMMON_BUILD_INTERACTIVE_WAYLAND + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) test/interactive-wayland +endef +LIBXKBCOMMON_POST_BUILD_HOOKS = LIBXKBCOMMON_BUILD_INTERACTIVE_WAYLAND +define LIBXKBCOMMON_INSTALL_INTERACTIVE_WAYLAND + $(INSTALL) -D -m 0755 $(@D)/test/interactive-wayland \ + $(TARGET_DIR)/usr/bin/interactive-wayland +endef +LIBXKBCOMMON_POST_INSTALL_TARGET_HOOKS = LIBXKBCOMMON_INSTALL_INTERACTIVE_WAYLAND +else +LIBXKBCOMMON_CONF_OPTS += --disable-wayland +endif + $(eval $(autotools-package))
Signature · 1 line
2.11.0
PATCH v2 2/2 libxkbcommon: add support for interactive-wayland test program
Hi Peter,
Sorry to come back to this after so much time.
On 10-03-17 20:54, Peter Seiderer wrote:
[snip]
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch line 4
Quoted 10 lines
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch new file +4
-0@@ -0,0 +1,33 @@ +From b44b0d5323985661b508948eac725048affd3221 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 8 Mar 2017 09:36:39 +0100 +Subject: [PATCH] configure.ac: prefere AC_PATH_PROG for wayland-scanner
prefer
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch line 6
Quoted 2 lines
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch new file +2
-0+ +Prefere AC_PATH_PROG result for wayland-scanner over the
Prefer
Quoted 11 lines
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch new file +11
-0+pkg-config version (when cross-compiling the .pc file might +point to the wrong wayland-scanner binary (target rather than +host) resulting in a non-executable and wrong scanner). + +Signed-off-by: Peter Seiderer <[email protected]> +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 725915b..e4ff9d2 100644
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch line 27
Quoted 10 lines
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch new file +10
-0+--- a/configure.ac ++++ b/configure.ac +@@ -194,7 +194,9 @@ AS_IF([test "x$enable_wayland" = xyes], [ + [AC_MSG_ERROR([Wayland utilities require libwayland-client >= 1.2 which was not found. \ + You can disable Wayland support with --disable-wayland.])]) + AC_PATH_PROG([wayland_scanner], [wayland-scanner]) +- wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` ++ if test "x$wayland_scanner" = x; then ++ wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` ++ fi
I don't really agree with this fix. The output of pkg-config really should be
authorative. Can't we patch the .pc file in a WAYLAND_PROTOCOLS_POST_INSTALL_HOOK?
Quoted 11 lines
package/libxkbcommon/0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch new file +6
-0+ ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` + AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir) + ], [enable_wayland=no]) +-- +2.11.0 +package/libxkbcommon/Config.in +0
-0
package/libxkbcommon/Config.in line 4
Quoted 4 lines
package/libxkbcommon/Config.in +1
-0@@ -1,9 +1,21 @@ config BR2_PACKAGE_LIBXKBCOMMON bool "libxkbcommon" select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
IIUC this is only needed when BR2_PACKAGE_LIBXKBCOMMON_INTERACTIVE_WAYLAND is
selected, no? For sure it is redundant with the select below.
package/libxkbcommon/Config.in line 12
Quoted 8 lines
package/libxkbcommon/Config.in +2
-0help xkbcommon is a keymap compiler and support library which processes a reduced subset of keymaps as defined by the XKB specification. http://xkbcommon.org/ + +if BR2_PACKAGE_LIBXKBCOMMON && BR2_PACKAGE_WAYLAND
The BR2_PACKAGE_WAYLAND part should be a depends of _INTERACTIVE_WAYLAND, below.
Quoted 28 lines
package/libxkbcommon/Config.in +9
-0+ +config BR2_PACKAGE_LIBXKBCOMMON_INTERACTIVE_WAYLAND + bool "interactive-wayland" + select BR2_PACKAGE_WAYLAND_PROTOCOLS + help + interactive-wayland is a wayland test application + for libxkbcommon. + +endifpackage/libxkbcommon/libxkbcommon.mk +6
-1@@ -11,7 +11,12 @@ LIBXKBCOMMON_LICENSE = MIT/X11 LIBXKBCOMMON_LICENSE_FILES = LICENSE LIBXKBCOMMON_INSTALL_STAGING = YES LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex -LIBXKBCOMMON_CONF_OPTS = --disable-wayland + +# patch 0001-configure.ac-prefere-AC_PATH_PROG-for-wayland-scanne.patch +# touches configure.ac +LIBXKBCOMMON_AUTORECONF = YES +LIBXKBCOMMON_DEPENDENCIES += host-xutil_util-macros + # uses C99 features LIBXKBCOMMON_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
package/libxkbcommon/libxkbcommon.mk else · line 35
Quoted 9 lines
package/libxkbcommon/libxkbcommon.mk +6
-0@@ -22,4 +27,21 @@ else LIBXKBCOMMON_CONF_OPTS += --disable-x11 endif +ifeq ($(BR2_PACKAGE_LIBXKBCOMMON_INTERACTIVE_WAYLAND),y) +LIBXKBCOMMON_CONF_OPTS += --enable-wayland +LIBXKBCOMMON_DEPENDENCIES += wayland wayland-protocols +LIBXKBCOMMON_CONF_ENV += ac_cv_path_wayland_scanner=$(HOST_DIR)/usr/bin/wayland-scanner +define LIBXKBCOMMON_BUILD_INTERACTIVE_WAYLAND + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) test/interactive-wayland
You could instead set LIBXKBCOMMON_MAKE_OPTS to 'all test/interactive-wayland'
I think.
package/libxkbcommon/libxkbcommon.mk else · line 47
Quoted 11 lines
package/libxkbcommon/libxkbcommon.mk +10
-0+endef +LIBXKBCOMMON_POST_BUILD_HOOKS = LIBXKBCOMMON_BUILD_INTERACTIVE_WAYLAND +define LIBXKBCOMMON_INSTALL_INTERACTIVE_WAYLAND + $(INSTALL) -D -m 0755 $(@D)/test/interactive-wayland \ + $(TARGET_DIR)/usr/bin/interactive-wayland +endef +LIBXKBCOMMON_POST_INSTALL_TARGET_HOOKS = LIBXKBCOMMON_INSTALL_INTERACTIVE_WAYLAN> +else +LIBXKBCOMMON_CONF_OPTS += --disable-wayland +endif + $(eval $(autotools-package))
That said, I wonder if it is really worthwhile to go through all this effort to
install a test program that upstream doesn't even mean to install...
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Thomas Petazzoni
AppliedPATCH v2 1/2 libxkbcommon: disable wayland support
In reply to Peter SeidererHello,
Quoted 14 lines · Peter Seiderer
Disable wayland support (only needed for the interactive-wayland test program). This fixes a compile failure in case wayland support is autodetected:
GEN
xdg-shell-unstable-v5-protocol.c
/bin/sh:/usr/bin/wayland-scanner: No such file or directory Makefile:2426: recipe for target 'xdg-shell-unstable-v5-protocol.c' failed make[3]: *** [xdg-shell-unstable-v5-protocol.c] Error 127
make[3]: *** Waiting for unfinished jobs....
GENxdg-shell-unstable-v5-client-protocol.h
/bin/sh:/usr/bin/wayland-scanner: No such file or directory Makefile:2428: recipe for target 'xdg-shell-unstable-v5-client-protocol.h' failed make[3]: *** [xdg-shell-unstable-v5-client-protocol.h] Error 127
Quoted 7 lines
Signed-off-by Peter Seiderer <[email protected]>---
Changes v2:
- split out the disable-wayland fix--- package/libxkbcommon/libxkbcommon.mk | 1 + 1 file changed, 1 insertion(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/2 libxkbcommon: disable wayland support
In reply to Peter SeidererQuoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Seiderer <[email protected]> writes:
Disable wayland support (only needed for the interactive-wayland test program). This fixes a compile failure in case wayland support is autodetected:
GEN
xdg-shell-unstable-v5-protocol.c
/bin/sh:/usr/bin/wayland-scanner: No such file or directory Makefile:2426: recipe for target 'xdg-shell-unstable-v5-protocol.c' failed make[3]: *** [xdg-shell-unstable-v5-protocol.c] Error 127
make[3]: *** Waiting for unfinished jobs....
GENxdg-shell-unstable-v5-client-protocol.h
/bin/sh:/usr/bin/wayland-scanner: No such file or directory Makefile:2428: recipe for target 'xdg-shell-unstable-v5-client-protocol.h' failed make[3]: *** [xdg-shell-unstable-v5-client-protocol.h] Error 127
Quoted 4 lines
Signed-off-by Peter Seiderer <[email protected]>---
Changes v2:
- split out the disable-wayland fix
Committed to 2017.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard