qtbase: Fix build with 64bit time_t on glibc

* one more fix is needed for evdevkeyboard in 5.12

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa
2023-01-18 13:06:19 +01:00
parent 9e59481962
commit 052f05bb4f
8 changed files with 80 additions and 19 deletions

View File

@@ -25,7 +25,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-shared
# 5.12.meta-qt5-shared.12
# 5.12.meta-qt5-shared.13
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -45,14 +45,16 @@ SRC_URI += "\
file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0017-Fix-Wdeprecated-copy-warnings.patch \
file://0018-qfloat16-Include-limits-header.patch \
file://0019-zlib-Do-not-undefine-_FILE_OFFSET_BITS.patch \
file://0020-evdevkeyboard-fix-input_event-time-related-compile.patch \
"
# common for qtbase-native and nativesdk-qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-native
# 5.12.meta-qt5-native.12
# 5.12.meta-qt5-native.13
SRC_URI += " \
file://0019-Always-build-uic-and-qvkgen.patch \
file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \
file://0021-Always-build-uic-and-qvkgen.patch \
file://0022-Avoid-renameeat2-for-native-sdk-builds.patch \
"
# CMake's toolchain configuration of nativesdk-qtbase

View File

@@ -18,7 +18,7 @@ require qt5-git.inc
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-shared
# 5.12.meta-qt5-shared.12
# 5.12.meta-qt5-shared.13
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -38,19 +38,21 @@ SRC_URI += "\
file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0017-Fix-Wdeprecated-copy-warnings.patch \
file://0018-qfloat16-Include-limits-header.patch \
file://0019-zlib-Do-not-undefine-_FILE_OFFSET_BITS.patch \
file://0020-evdevkeyboard-fix-input_event-time-related-compile.patch \
"
# common for qtbase-native and nativesdk-qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-native
# 5.12.meta-qt5-native.12
# 5.12.meta-qt5-native.13
SRC_URI += " \
file://0019-Always-build-uic-and-qvkgen.patch \
file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \
file://0021-Always-build-uic-and-qvkgen.patch \
file://0022-Avoid-renameeat2-for-native-sdk-builds.patch \
"
# only for qtbase-native
SRC_URI += " \
file://0021-Bootstrap-without-linkat-feature.patch \
file://0023-Bootstrap-without-linkat-feature.patch \
"
CLEANBROKEN = "1"

View File

@@ -1,4 +1,4 @@
From 4e00087b393183493a0f7115fd41efc867bd3421 Mon Sep 17 00:00:00 2001
From 86c91e5f4340ced36fb33ab380760bbccfdb84e2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 1 Jan 2023 21:30:23 -0800
Subject: [PATCH] zlib: Do not undefine _FILE_OFFSET_BITS
@@ -32,6 +32,3 @@ index 20de7cb4ce..f6ab9357c7 100644
#ifndef QT_BOOTSTRAPPED
# include <qconfig.h>
#endif
--
2.39.0

View File

@@ -0,0 +1,60 @@
From 85e1eb951ab3b1fda04a49e52f50bc9c50af1a13 Mon Sep 17 00:00:00 2001
From: Peter Seiderer <ps.report@gmx.net>
Date: Mon, 4 May 2020 23:17:45 +0200
Subject: [PATCH] evdevkeyboard: fix input_event time related compile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes:
evdevkeyboard/qevdevkeyboardhandler.cpp: In member function void QEvdevKeyboardHandler::switchLed(int, bool):
evdevkeyboard/qevdevkeyboardhandler.cpp:153:28: error: struct input_event has no member named time; did you mean type?
::gettimeofday(&led_ie.time, 0);
^~~~
type
Task-number: QTBUG-84012
Change-Id: I1d127561e0406ae570da656d3e31f9434c7b8798
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit c5b8b662105cc5ced968da9f567fe1134c52d6b5)
Upstream-Status: Backport [5.15 d9b430560a6ea28fc6024cede34d765c7bd68e22]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
.../input/evdevkeyboard/qevdevkeyboardhandler.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
index ad134a825f..f2b47b82bc 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
@@ -58,6 +58,14 @@
#include <linux/input.h>
#endif
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#endif
+
+#ifndef input_event_usec
+#define input_event_usec time.tv_usec
+#endif
+
QT_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(qLcEvdevKey, "qt.qpa.input")
@@ -148,8 +156,11 @@ void QEvdevKeyboardHandler::switchLed(int led, bool state)
{
qCDebug(qLcEvdevKey) << "switchLed" << led << state;
+ struct timeval tv;
+ ::gettimeofday(&tv, 0);
struct ::input_event led_ie;
- ::gettimeofday(&led_ie.time, 0);
+ led_ie.input_event_sec = tv.tv_sec;
+ led_ie.input_event_usec = tv.tv_usec;
led_ie.type = EV_LED;
led_ie.code = led;
led_ie.value = state;

View File

@@ -1,4 +1,4 @@
From 0eb870c467ecb1f756f665e65798deb21dd360f0 Mon Sep 17 00:00:00 2001
From 4dde34f5b142ab7700469e566cbed78699438460 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 16 Nov 2013 00:32:30 +0100
Subject: [PATCH] Always build uic and qvkgen

View File

@@ -1,4 +1,4 @@
From e45d6335b5030195cffb54a49632e0123477cf42 Mon Sep 17 00:00:00 2001
From 026db0b6cbffba8c46df8b1eb739ef53df9b413d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 14 Apr 2019 13:27:58 +0200
Subject: [PATCH] Avoid renameeat2 for native(sdk) builds

View File

@@ -1,4 +1,4 @@
From 51756824d0aad6965aeec06581b0181e28a6b402 Mon Sep 17 00:00:00 2001
From d83c11c9c197195164af9a3ac202740c0c8673cb Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Fri, 24 Nov 2017 15:16:31 +0200
Subject: [PATCH] Bootstrap without linkat feature

View File

@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
# common for qtbase-native, qtbase-nativesdk and qtbase
# Patches from https://github.com/meta-qt5/qtbase/commits/b5.12-shared
# 5.12.meta-qt5-shared.12
# 5.12.meta-qt5-shared.13
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
@@ -34,10 +34,10 @@ SRC_URI += "\
file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0017-Fix-Wdeprecated-copy-warnings.patch \
file://0018-qfloat16-Include-limits-header.patch \
file://0019-zlib-Do-not-undefine-_FILE_OFFSET_BITS.patch \
file://0020-evdevkeyboard-fix-input_event-time-related-compile.patch \
"
SRC_URI += "file://0023-zlib-Do-not-undefine-_FILE_OFFSET_BITS.patch"
# for syncqt
RDEPENDS:${PN}-tools += "perl"