aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2017-02-02 21:18:00 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2017-02-02 21:18:00 +0100
commit9ed82108c31f60cee05001fcb9a17d363ffb5d7d (patch)
tree9bdded7529db933a2c268ad878a2202a93ab94eb
parentf37c5929a97de33f3bdcc735864c7a9e4c809e4e (diff)
qtwayland: fix build without xkbcommon-evdev
* xkbcommon-evdev isn't enabled in default qtbase PACKAGECONFIG * use patch from https://bugreports.qt.io/browse/QTBUG-57767 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/qtwayland/0001-fix-build-without-xkbcommon-evdev.patch44
-rw-r--r--recipes-qt/qt5/qtwayland_git.bb3
2 files changed, 47 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwayland/0001-fix-build-without-xkbcommon-evdev.patch b/recipes-qt/qt5/qtwayland/0001-fix-build-without-xkbcommon-evdev.patch
new file mode 100644
index 00000000..e1e978e8
--- /dev/null
+++ b/recipes-qt/qt5/qtwayland/0001-fix-build-without-xkbcommon-evdev.patch
@@ -0,0 +1,44 @@
+From c93dbe53e8a1b2203c750a66c7efe6fc9a326903 Mon Sep 17 00:00:00 2001
+From: Raphael Freudiger <raphael.freudiger@siemens.com>
+Date: Thu, 22 Dec 2016 13:54:31 +0100
+Subject: [PATCH] fix build without xkbcommon-evdev
+
+Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com>
+---
+ src/compositor/compositor_api/qwaylandkeyboard.cpp | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp
+index 55381b4..5c054c6 100644
+--- a/src/compositor/compositor_api/qwaylandkeyboard.cpp
++++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp
+@@ -338,12 +338,6 @@ void QWaylandKeyboardPrivate::createXKBState(xkb_keymap *keymap)
+ xkb_state = xkb_state_new(keymap);
+ }
+
+-uint QWaylandKeyboardPrivate::toWaylandXkbV1Key(const uint nativeScanCode)
+-{
+- const uint offset = 8;
+- Q_ASSERT(nativeScanCode >= offset);
+- return nativeScanCode - offset;
+-}
+
+ void QWaylandKeyboardPrivate::createXKBKeymap()
+ {
+@@ -373,6 +367,13 @@ void QWaylandKeyboardPrivate::createXKBKeymap()
+ }
+ #endif
+
++uint QWaylandKeyboardPrivate::toWaylandXkbV1Key(const uint nativeScanCode)
++{
++ const uint offset = 8;
++ Q_ASSERT(nativeScanCode >= offset);
++ return nativeScanCode - offset;
++}
++
+ void QWaylandKeyboardPrivate::sendRepeatInfo()
+ {
+ Q_FOREACH (Resource *resource, resourceMap()) {
+--
+2.1.4
+
diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb
index 21abd545..d42d80a0 100644
--- a/recipes-qt/qt5/qtwayland_git.bb
+++ b/recipes-qt/qt5/qtwayland_git.bb
@@ -43,4 +43,7 @@ EXTRA_QMAKEVARS_CONFIGURE += "${PACKAGECONFIG_CONFARGS}"
SRCREV = "0e2a950895805457a45abe860bc91a7cc4ba405e"
+# From https://bugreports.qt.io/browse/QTBUG-57767
+SRC_URI += "file://0001-fix-build-without-xkbcommon-evdev.patch"
+
BBCLASSEXTEND =+ "native nativesdk"