Certain build configurations enable a code path that includes keyboard_code_conversion_xkb.cc, but it eventually fails in non-X11 environments because of a missing patch that is present upstream.
This commit adds the missing patch from https://codereview.chromium.org/2239833003 There are two versions of the patch in the code review URL above. The first version fixes the problem both under the gyp and GN build systems. That patch was rejected because gyp is considered deprecated upstream. The second version fixes the problem only on GN and it was merged upstream. We are picking the first version because our recipes still use gyp to build. Signed-off-by: Jacobo Aragunde Pérez <jaragu...@igalia.com> --- .../chromium/chromium-wayland_53.0.2785.143.bb | 1 + .../fix-non-x11-build-when-use_xkbcommon-1.patch | 51 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 recipes-browser/chromium/chromium/chromium-wayland/fix-non-x11-build-when-use_xkbcommon-1.patch diff --git a/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb b/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb index a75918b..ef913a7 100644 --- a/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb +++ b/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb @@ -13,6 +13,7 @@ SRC_URI += "\ file://chromium-wayland/0011-Replace-readdir_r-with-readdir.patch \ file://chromium-wayland/remove-Werror.patch \ file://chromium-wayland/guard-x11_desktop_handler-inclusion.patch \ + file://chromium-wayland/fix-non-x11-build-when-use_xkbcommon-1.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \ " diff --git a/recipes-browser/chromium/chromium/chromium-wayland/fix-non-x11-build-when-use_xkbcommon-1.patch b/recipes-browser/chromium/chromium/chromium-wayland/fix-non-x11-build-when-use_xkbcommon-1.patch new file mode 100644 index 0000000..976ece9 --- /dev/null +++ b/recipes-browser/chromium/chromium/chromium-wayland/fix-non-x11-build-when-use_xkbcommon-1.patch @@ -0,0 +1,51 @@ +From: jbriance <jbria...@cisco.com> +Subject: keycodes: Fix non-X11 build when use_xkbcommon=1 + +Since M51, ui/events/keycodes/xkb_keysym.h follows X11 path, even if +use_xkbcommon=1 is set because USE_XKBCOMMON is not defined, leading +to the following compilation error in this case: + + In file included from ../../ui/events/keycodes/keyboard_code_conversion_xkb.h:12:0, + from ../../ui/events/keycodes/keyboard_code_conversion_xkb.cc:5: + ../../ui/events/keycodes/xkb_keysym.h:19:19: fatal error: X11/X.h: No such file or directory + +BUG=none + +Review-Url: https://codereview.chromium.org/2239833003 +-- + +Index: ui/events/keycodes/BUILD.gn +diff --git a/ui/events/keycodes/BUILD.gn b/ui/events/keycodes/BUILD.gn +index 4f2d47c2497d321332c79d0dd4e9007b50c319c7..716c7ed17cc8049ea65b95a5062e7c6e0adc6e48 100644 +--- a/ui/events/keycodes/BUILD.gn ++++ b/ui/events/keycodes/BUILD.gn +@@ -17,6 +17,10 @@ source_set("xkb") { + "//base", + "//ui/events:dom_keycode_converter", + ] ++ ++ if (use_xkbcommon) { ++ defines = [ "USE_XKBCOMMON" ] ++ } + } + + if (use_x11 || ozone_platform_x11) { +Index: ui/events/keycodes/events_keycodes.gyp +diff --git a/ui/events/keycodes/events_keycodes.gyp b/ui/events/keycodes/events_keycodes.gyp +index b0796b4e2ead8bffe88fb01ed136814be505d967..248e961bad2ad3996ca99624b6c489c7835f6241 100644 +--- a/ui/events/keycodes/events_keycodes.gyp ++++ b/ui/events/keycodes/events_keycodes.gyp +@@ -21,6 +21,13 @@ + 'scoped_xkb.h', + 'xkb_keysym.h', + ], ++ 'conditions': [ ++ ['use_xkbcommon==1', { ++ 'defines': [ ++ 'USE_XKBCOMMON', ++ ], ++ }], ++ ], + }, + ], + 'conditions': [ -- 2.7.4 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel