aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-07-24 11:56:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-07-24 11:56:14 +0000
commit4a35355e6777013e633814a10098f800b68ba845 (patch)
tree6f6843219b4480a799ca71b316c0b8469fd98fb0
parent05e50cc4f00509d8086598b489ebbb2992c9c069 (diff)
downloadaports-4a35355e6777013e633814a10098f800b68ba845.tar.gz
aports-4a35355e6777013e633814a10098f800b68ba845.tar.bz2
aports-4a35355e6777013e633814a10098f800b68ba845.tar.xz
community/qt5-qtbase: time64 build fix
-rw-r--r--community/qt5-qtbase/APKBUILD6
-rw-r--r--community/qt5-qtbase/time64.patch62
2 files changed, 66 insertions, 2 deletions
diff --git a/community/qt5-qtbase/APKBUILD b/community/qt5-qtbase/APKBUILD
index 0caa59cfca..d3f17c8480 100644
--- a/community/qt5-qtbase/APKBUILD
+++ b/community/qt5-qtbase/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qt5-qtbase
pkgver=5.15.0
-pkgrel=0
+pkgrel=1
pkgdesc="Qt5 - QtBase components"
url="https://qt.io/developers/"
arch="all"
@@ -55,6 +55,7 @@ esac
source="https://download.qt.io/$_rel/qt/${pkgver%.*}/$pkgver/submodules/qtbase-everywhere-src-$pkgver.tar.xz
qt-musl-iconv-no-bom.patch
+ time64.patch
"
_qt5_prefix=/usr/lib/qt5
@@ -209,4 +210,5 @@ x11() {
}
sha512sums="c584d69e49f4959d9b8541f820f5ff1e6d1599697ad16976b47cbaaa902fc83e1ca4ae57d56d13574e42e5f602d4420245ad7fcfc13e224e10d4bbad6a537d1a qtbase-everywhere-src-5.15.0.tar.xz
-7d68421a14f0259535c977d8a521c98918193c107b76ac664571b12f5b0d7588a0d0e1297af412a26753a393b21f3f44c3274fa8ab5bc87f03705a3a03acb444 qt-musl-iconv-no-bom.patch"
+7d68421a14f0259535c977d8a521c98918193c107b76ac664571b12f5b0d7588a0d0e1297af412a26753a393b21f3f44c3274fa8ab5bc87f03705a3a03acb444 qt-musl-iconv-no-bom.patch
+436f0bb7a89a88aa62c7b0398c4e91c325e78542e96f747c903f7e96dbf9d9b693d9688c722f2a74e287fb9ab31e861bd5ed8deb172ed28f56a1b8757663771c time64.patch"
diff --git a/community/qt5-qtbase/time64.patch b/community/qt5-qtbase/time64.patch
new file mode 100644
index 0000000000..76b4671c69
--- /dev/null
+++ b/community/qt5-qtbase/time64.patch
@@ -0,0 +1,62 @@
+From e06ac2e26c8490a7b8702e9462d1f38244ac3f0f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 25 Nov 2019 08:27:39 -0800
+Subject: [PATCH] input: Make use of timeval portable for 64bit time_t
+
+This patch avoids using time field of input_event structure which is not available
+on 32bit arches supporting 64bit time_t structs, Patch makes it compatible with new
+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 <raj.khem@gmail.com>
+---
+ .../input/evdevkeyboard/qevdevkeyboardhandler.cpp | 10 +++++++++-
+ .../input/evdevtouch/qevdevtouchhandler.cpp | 2 +-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+index 666613f09d..0e3e0ea0de 100644
+--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
++++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+@@ -58,6 +58,11 @@
+ #include <linux/input.h>
+ #endif
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ 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;
+
+ struct ::input_event led_ie;
+- ::gettimeofday(&led_ie.time, 0);
++ struct timeval tval;
++ ::gettimeofday(&tval, 0);
++ led_ie.input_event_sec = tval.tv_sec;
++ led_ie.input_event_usec = tval.tv_usec;
+ led_ie.type = EV_LED;
+ 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
+--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
++++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+@@ -568,7 +568,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
+
+ // update timestamps
+ m_lastTimeStamp = m_timeStamp;
+- m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0;
++ m_timeStamp = data->input_event_sec + data->input_event_usec / 1000000.0;
+
+ m_lastTouchPoints = m_touchPoints;
+ m_touchPoints.clear();
+--
+2.24.0
+