From 1a4ee018f42cd98baa97acb918065490ccbd6209 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 12 Nov 2019 20:24:39 -0800 Subject: qtwebengine: Fix musl build Currently, musl build fails to generate .pc ( packageconfig ) files because qmake has logic to detect glibc, which obviously will be failing for musl, and as a result it does not generate all needed files which then fails during do_install like below | sed: can't read /mnt/b/yoe/build/tmp/work/core2-32-yoe-linux-musl/qtwebengine/5.13.2+gitAUTOINC+556576b55f_843d70ac87-r0/image/usr/lib/pkgconfig/Qt5WebEngineCore.pc: No such file or directory Signed-off-by: Khem Raj --- ...0004-mkspecs-Allow-builds-with-libc-glibc.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch (limited to 'recipes-qt/qt5/qtwebengine') diff --git a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch b/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch new file mode 100644 index 00000000..73ef469f --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch @@ -0,0 +1,29 @@ +From a5c8d833ffb8b54626b7b670b2782a6cf9a45075 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 12 Nov 2019 19:53:59 -0800 +Subject: [PATCH] mkspecs: Allow builds with libc != glibc + +Signed-off-by: Khem Raj +--- + mkspecs/features/configure.prf | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf +index cc84182b..c278ffae 100644 +--- a/mkspecs/features/configure.prf ++++ b/mkspecs/features/configure.prf +@@ -75,11 +75,6 @@ defineTest(runConfigure) { + return(false) + } + +- !qtConfig(webengine-system-glibc) { +- skipBuild("A suitable version >= 2.27 of libc could not be found.") +- return(false) +- } +- + QT_FOR_CONFIG += gui-private + + !qtConfig(webengine-system-khr) { +-- +2.24.0 + -- cgit v1.2.3-54-g00ecf From 25039161c1646ce1b6cc30303d4588e43b9b714a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 30 Nov 2019 10:17:23 -0800 Subject: qtwebengine: Fix build with 64bit time_t on 32bit architectures Signed-off-by: Khem Raj --- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 70 ++++++++++++++++++++++ recipes-qt/qt5/qtwebengine_git.bb | 1 + 2 files changed, 71 insertions(+) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch (limited to 'recipes-qt/qt5/qtwebengine') diff --git a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 00000000..ac16068c --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,70 @@ +From 6ae9112ffea9a5b7d41a06c3d33e55e4f32d8b5a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Nov 2019 10:07:43 -0800 +Subject: [PATCH] Fix build on 32bit arches with 64bit time_t + +time element is deprecated on new input_event structure in kernel's +input.h [1] + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f + +Signed-off-by: Khem Raj +--- + chromium/ui/events/ozone/evdev/event_converter_evdev.cc | 4 ++-- + chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc | 6 +++--- + chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h | 5 +++++ + 3 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/chromium/ui/events/ozone/evdev/event_converter_evdev.cc b/chromium/ui/events/ozone/evdev/event_converter_evdev.cc +index 684514ff011..e2f2ae0b633 100644 +--- a/chromium/ui/events/ozone/evdev/event_converter_evdev.cc ++++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.cc +@@ -168,8 +168,8 @@ void EventConverterEvdev::SetPalmSuppressionCallback( + base::TimeTicks EventConverterEvdev::TimeTicksFromInputEvent( + const input_event& event) { + base::TimeTicks timestamp = +- ui::EventTimeStampFromSeconds(event.time.tv_sec) + +- base::TimeDelta::FromMicroseconds(event.time.tv_usec); ++ ui::EventTimeStampFromSeconds(event.input_event_sec) + ++ base::TimeDelta::FromMicroseconds(event.input_event_usec); + ValidateEventTimeClock(×tamp); + return timestamp; + } +diff --git a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc +index 363c3183e05..4fccfd62f84 100644 +--- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc ++++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc +@@ -59,11 +59,11 @@ void TouchEventLogEvdev::DumpLog(const char* filename) { + for (int i = 0; i < kDebugBufferSize; ++i) { + struct TouchEvent* te = + &logged_events_[(debug_buffer_tail_ + i) % kDebugBufferSize]; +- if (te->ev.time.tv_sec == 0 && te->ev.time.tv_usec == 0) ++ if (te->ev.input_event_sec == 0 && te->ev.input_event_usec == 0) + continue; + std::string event_string = base::StringPrintf( +- "E: %ld.%06ld %04x %04x %d %d\n", te->ev.time.tv_sec, +- te->ev.time.tv_usec, te->ev.type, te->ev.code, te->ev.value, te->slot); ++ "E: %ld.%06ld %04x %04x %d %d\n", te->ev.input_event_sec, ++ te->ev.input_event_usec, te->ev.type, te->ev.code, te->ev.value, te->slot); + report_content += event_string; + } + file.Write(0, report_content.c_str(), report_content.length()); +diff --git a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h +index ccd3a499a38..5a2da89d09a 100644 +--- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h ++++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h +@@ -14,6 +14,11 @@ + + #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + namespace ui { + + class EventDeviceInfo; +-- +2.24.0 + diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index 00106a73..c6474db9 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -159,6 +159,7 @@ SRC_URI += " \ file://chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch;patchdir=src/3rdparty \ file://chromium/0006-chromium-aarch64-skia-build-fix.patch;patchdir=src/3rdparty \ file://chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch;patchdir=src/3rdparty \ + file://chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch;patchdir=src/3rdparty \ " SRC_URI_append_libc-musl = "\ -- cgit v1.2.3-54-g00ecf From 6776ec35cf9b31a2fac8057f540d65ea09373a7f Mon Sep 17 00:00:00 2001 From: Mikko Gronoff Date: Sun, 12 Jan 2020 20:44:47 +0200 Subject: qtbase, qtwebengine: address issues introduced in latest upstream merge * Replace faulty qtbase patch "0018-input-Make-use-of-timeval-portable- for-64bit-time_t.patch" with fixed version * Remove obsolete webengine patch "0004-mkspecs-Allow-builds-with-libc- glibc.patch" Change-Id: I02ecbb09a04313b0f68bce8083b5c0a6e0b0c035 Reviewed-by: Samuli Piippo --- ...-use-of-timeval-portable-for-64bit-time_t.patch | 34 +++++++++++++--------- ...0004-mkspecs-Allow-builds-with-libc-glibc.patch | 29 ------------------ 2 files changed, 21 insertions(+), 42 deletions(-) delete mode 100644 recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch (limited to 'recipes-qt/qt5/qtwebengine') diff --git a/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch b/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch index 76b4671c..0d3b48ff 100644 --- a/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch +++ b/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch @@ -1,4 +1,4 @@ -From e06ac2e26c8490a7b8702e9462d1f38244ac3f0f Mon Sep 17 00:00:00 2001 +From c200c1704501e5a74f72dedc3b3b76567d679e0d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 25 Nov 2019 08:27:39 -0800 Subject: [PATCH] input: Make use of timeval portable for 64bit time_t @@ -9,15 +9,14 @@ and keeps old input.h implementation functional as well. See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign -Upstream-Status: Submitted [https://codereview.qt-project.org/c/qt/qtbase/+/282610] -Signed-off-by: Khem Raj +Change-Id: Ie4d66a5e7d83065f1a904a542c711431e1d20845 --- .../input/evdevkeyboard/qevdevkeyboardhandler.cpp | 10 +++++++++- - .../input/evdevtouch/qevdevtouchhandler.cpp | 2 +- - 2 files changed, 10 insertions(+), 2 deletions(-) + .../input/evdevtouch/qevdevtouchhandler.cpp | 7 ++++++- + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp -index 666613f09d..0e3e0ea0de 100644 +index 3555763b89..e7dc57c027 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp @@ -58,6 +58,11 @@ @@ -32,8 +31,8 @@ index 666613f09d..0e3e0ea0de 100644 QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(qLcEvdevKey, "qt.qpa.input") -@@ -149,7 +154,10 @@ void QEvdevKeyboardHandler::switchLed(int led, bool state) - qCDebug(qLcEvdevKey) << "switchLed" << led << state; +@@ -150,7 +155,10 @@ void QEvdevKeyboardHandler::switchLed(int led, bool state) + qCDebug(qLcEvdevKey, "switchLed %d %d", led, int(state)); struct ::input_event led_ie; - ::gettimeofday(&led_ie.time, 0); @@ -45,10 +44,22 @@ index 666613f09d..0e3e0ea0de 100644 led_ie.code = led; led_ie.value = state; diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp -index f86f80785e..3914698f2a 100644 +index 78728ef4ce..1d65f9b9f7 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp -@@ -568,7 +568,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) +@@ -58,6 +58,11 @@ + #include + #endif + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #include + + #if QT_CONFIG(mtdev) +@@ -573,7 +578,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) // update timestamps m_lastTimeStamp = m_timeStamp; @@ -57,6 +68,3 @@ index f86f80785e..3914698f2a 100644 m_lastTouchPoints = m_touchPoints; m_touchPoints.clear(); --- -2.24.0 - diff --git a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch b/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch deleted file mode 100644 index 73ef469f..00000000 --- a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a5c8d833ffb8b54626b7b670b2782a6cf9a45075 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 12 Nov 2019 19:53:59 -0800 -Subject: [PATCH] mkspecs: Allow builds with libc != glibc - -Signed-off-by: Khem Raj ---- - mkspecs/features/configure.prf | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf -index cc84182b..c278ffae 100644 ---- a/mkspecs/features/configure.prf -+++ b/mkspecs/features/configure.prf -@@ -75,11 +75,6 @@ defineTest(runConfigure) { - return(false) - } - -- !qtConfig(webengine-system-glibc) { -- skipBuild("A suitable version >= 2.27 of libc could not be found.") -- return(false) -- } -- - QT_FOR_CONFIG += gui-private - - !qtConfig(webengine-system-khr) { --- -2.24.0 - -- cgit v1.2.3-54-g00ecf