summaryrefslogtreecommitdiff
path: root/dev-qt/qtcore
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-qt/qtcore
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-qt/qtcore')
-rw-r--r--dev-qt/qtcore/Manifest7
-rw-r--r--dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch106
-rw-r--r--dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch271
-rw-r--r--dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch47
-rw-r--r--dev-qt/qtcore/qtcore-5.14.2.ebuild103
-rw-r--r--dev-qt/qtcore/qtcore-5.15.1-r1.ebuild (renamed from dev-qt/qtcore/qtcore-5.15.1.ebuild)8
6 files changed, 327 insertions, 215 deletions
diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest
index c5e8e66d6abd..8a1ac6ee3de5 100644
--- a/dev-qt/qtcore/Manifest
+++ b/dev-qt/qtcore/Manifest
@@ -1,7 +1,6 @@
AUX qtcore-5.14.1-cmake-macro-backward-compat.patch 2555 BLAKE2B 5fe2b70232722416cb85ecce8a0742b57503c520482aa0386042f43d4cf20926a874b9a92f90c656cfe0bf93883c286b6b08c0ad2568f3a6746c776dcf208995 SHA512 c7ba0bfa6d462504ba9421abfb7f502265fd8c6bd7469326612925cd7b7667daba3350f714aa5a516aa83e5352ec6d18fc02af9ebf5494af10a4b6f8f7c47d5b
-AUX qtcore-5.14.2-QLibrary-deadlock.patch 3966 BLAKE2B 79d589005de16dbbe87affa6ce2f9a499fe19f9f6687f85c9ce0d60f95706c22c6261dfab1e414cb6c6ca3f3f8d4ee1f33ad2a01f5ebee8356534d5330629822 SHA512 22d4994cb35869e8eadf158ba8a3f1ec3ca62291c93bfe8f94d6e8a89739bfc4cfc59dfb399be955ba6b00897288224c392d54fcbe24f8246d0f649c2ab22a6a
-DIST qtbase-everywhere-src-5.14.2.tar.xz 49865752 BLAKE2B ed8eb18dfc79e9983248655eb62e8305ef8b79f96c7880c88533250fef8f0d187cf576082d41df08314711b4c007b94686486abd77bf9bc201336caa02ced300 SHA512 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9
+AUX qtcore-5.15.1-timezone-1.patch 9484 BLAKE2B aa36362fcc6ea1ab144e97dfa1e023e4fbad64f8702e817ee2431ac271aefd637609d14a265c2d6e58bedbdb3f635b4b979c9bf1463a29370ae05bb2610e131b SHA512 1edfe267827225279b0ecad60a5a350b825ed9bd84574d0e5470e71bac75668c0655aa0db2f001e26e331f85e0cf0a68412ba5a9541581bf39a0e954313672b2
+AUX qtcore-5.15.1-timezone-2.patch 1933 BLAKE2B 479f82c90d2132291bc298491d61d7144e08a6db8b36d7d1a89f368c894e41902ae964aaa2819010c485dc5aedd937f2dd00b4efa99d3393d11368e0ea258481 SHA512 c978ffadf15629ab562a53cc24d31e33f4df861962b927ea37061747cb74a7b677d7ae3a617b526c4f48085fe73ebb89fbf5a44748433426dd74e5691a238097
DIST qtbase-everywhere-src-5.15.1.tar.xz 50153132 BLAKE2B 5a8cbbf8d44c7affc8ee43db04bd024bb529e0707b1feee2c7ae439cdf1331b1cf3e89b84c6a6f5bab3ec34025fbd634a8f4d259bd64ece172f288500e5b59e6 SHA512 40b687c046b25a6717834ffe2616ee4f373d75214ec1c7e3a26502cd0cde9f0a872eaee99f06c54c7a3625ae85df5cdd3a3b54a160e8e37c7cfeb5800d026fe4
-EBUILD qtcore-5.14.2.ebuild 2242 BLAKE2B b557fb1c41d17ed2924209256334d2844ad19ae06723cc325debe3c148594684b47847e2fa5c3349fb03569d8dc9feddb253fb72f78576adc7cfa11ecf550c4a SHA512 a9e60505ed6de7c96fe52b99f8716883c4e64b6b9ff5a8b66e9ebf2a5f5b99bf5cd66e6750eb5662576d3ec2a4a257a84dccd27bb89b352006a125e7d40d8ac7
-EBUILD qtcore-5.15.1.ebuild 2212 BLAKE2B 4fc9ec710f5d896f867b88ae7ba170740e856c3564acb396030d9ba297660a9bfaef770620d4dd9b2715c7a2252ad8796672a4bf99abfef7a56cd5e017dada9a SHA512 41d63181195ceb2e211c5179473cd0fedf1287b5713b7741afdf8be5a127b14e5e57057e064b693ff9c35047c4118e5d1b77282a68cb67cb11dc6fe0852d1d7d
+EBUILD qtcore-5.15.1-r1.ebuild 2329 BLAKE2B 334f653646aa77c793cfb5de180980e1d2e8d7fde149256de83c944fff0498fb6f323b623bbe1af0028a5a4dfa872c4907c779396b8afce34ba810addd840d60 SHA512 15a004f1ffafe87d13b1bc309b193239891a785e640ee5042262a35b780efdd7ba6ab9201cd346c05f8b46323771174188160f33025a17e61bd22ab1e7f6a643
MISC metadata.xml 832 BLAKE2B 20f3ca80bc8aea1203ca8c3f34314fb599151eed5639cb9ba6cee97b70a04152ce8c06a4bf1f41058515a3a9d32242bcdf84b6fc75b68b7183951f7c9747396d SHA512 ea1c7dfef8c3afeda436a1de09ee2002441b7d13b3aa40bda02324668f3664fceafcf276f87c897e83f49e246e9fb3ffcefa95098ccb2f5a8b503779686e1b3e
diff --git a/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch b/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch
deleted file mode 100644
index 6a9c9921b7d0..000000000000
--- a/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001
-From: Thiago Macieira <thiago.macieira@intel.com>
-Date: Thu, 2 Apr 2020 12:08:41 -0300
-Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642
-
-Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around
-the entire load_sys(). We had reasoed that deadlocks would only occur if
-the object creation in instance() recursed into its own instance(),
-which was already a bug. But we had forgotten that dlopen()/
-LoadLibrary() executes initialization code from the module being loaded,
-which could cause a recursion back into the same QPluginLoader or
-QLibrary object. This recursion is benign because the module *is* loaded
-and dlopen()/LoadLibrary() returns the same handle.
-
-[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that
-would happen if the plugin or library being loaded has load-time
-initialization code (C++ global variables) that recursed back into the
-same QLibrary or QPluginLoader object.
-
-PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex
-lock, so pluginState should be made an atomic variable. Once that is
-done, we'll only need locking the mutex to update errorString (no
-locking before loading).
-
-Fixes: QTBUG-83207
-Task-number: QTBUG-39642
-Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb
-Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-Reviewed-by: David Faure <david.faure@kdab.com>
----
- src/corelib/plugin/qlibrary.cpp | 2 --
- src/corelib/plugin/qlibrary_unix.cpp | 4 ++++
- src/corelib/plugin/qlibrary_win.cpp | 3 +++
- 3 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
-index ddb053c26fa..be9d92b2048 100644
---- a/src/corelib/plugin/qlibrary.cpp
-+++ b/src/corelib/plugin/qlibrary.cpp
-@@ -576,9 +576,7 @@ bool QLibraryPrivate::load()
-
- Q_TRACE(QLibraryPrivate_load_entry, fileName);
-
-- mutex.lock();
- bool ret = load_sys();
-- mutex.unlock();
- if (qt_debug_component()) {
- if (ret) {
- qDebug() << "loaded library" << fileName;
-diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
-index 017aa97b66a..a5c72f81d96 100644
---- a/src/corelib/plugin/qlibrary_unix.cpp
-+++ b/src/corelib/plugin/qlibrary_unix.cpp
-@@ -123,6 +123,7 @@ QStringList QLibraryPrivate::prefixes_sys()
-
- bool QLibraryPrivate::load_sys()
- {
-+ QMutexLocker locker(&mutex);
- QString attempt;
- QFileSystemEntry fsEntry(fileName);
-
-@@ -213,6 +214,7 @@ bool QLibraryPrivate::load_sys()
- }
- #endif
-
-+ locker.unlock();
- bool retry = true;
- Handle hnd = nullptr;
- for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) {
-@@ -273,6 +275,8 @@ bool QLibraryPrivate::load_sys()
- }
- }
- #endif
-+
-+ locker.relock();
- if (!hnd) {
- errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror());
- }
-diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp
-index 000bf762763..ef58724be8e 100644
---- a/src/corelib/plugin/qlibrary_win.cpp
-+++ b/src/corelib/plugin/qlibrary_win.cpp
-@@ -78,6 +78,7 @@ bool QLibraryPrivate::load_sys()
- // fileName
- //
- // NB If it's a plugin we do not ever try the ".dll" extension
-+ QMutexLocker locker(&mutex);
- QStringList attempts;
-
- if (pluginState != IsAPlugin)
-@@ -95,6 +96,7 @@ bool QLibraryPrivate::load_sys()
- attempts.prepend(QDir::rootPath() + fileName);
- #endif
-
-+ locker.unlock();
- Handle hnd = nullptr;
- for (const QString &attempt : qAsConst(attempts)) {
- #ifndef Q_OS_WINRT
-@@ -115,6 +117,7 @@ bool QLibraryPrivate::load_sys()
- #ifndef Q_OS_WINRT
- SetErrorMode(oldmode);
- #endif
-+ locker.relock();
- if (!hnd) {
- errorString = QLibrary::tr("Cannot load library %1: %2").arg(
- QDir::toNativeSeparators(fileName), qt_error_string());
diff --git a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch b/dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch
new file mode 100644
index 000000000000..1c8f1e89e7d5
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch
@@ -0,0 +1,271 @@
+From c337f6fae51b987ce7dbed1fd9bea41e6073efbb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Sat, 10 Oct 2020 19:26:13 +0200
+Subject: [PATCH 1/2] Revert "Cache system zone ID when fetched from the
+ file-system"
+
+This reverts commit c70ce3d042025c858faffe661f85d2482a2a0d8c.
+---
+ src/corelib/time/qtimezoneprivate_tz.cpp | 205 +++++++----------------
+ 1 file changed, 64 insertions(+), 141 deletions(-)
+
+diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
+index c5c70b7364..01f9a6cce0 100644
+--- a/src/corelib/time/qtimezoneprivate_tz.cpp
++++ b/src/corelib/time/qtimezoneprivate_tz.cpp
+@@ -1,6 +1,5 @@
+ /****************************************************************************
+ **
+-** Copyright (C) 2020 The Qt Company Ltd.
+ ** Copyright (C) 2019 Crimson AS <info@crimson.no>
+ ** Copyright (C) 2013 John Layt <jlayt@kde.org>
+ ** Contact: https://www.qt.io/licensing/
+@@ -43,19 +42,18 @@
+ #include "qtimezoneprivate_p.h"
+ #include "private/qlocale_tools_p.h"
+
+-#include <QtCore/QDataStream>
+-#include <QtCore/QDateTime>
+ #include <QtCore/QFile>
+-#include <QtCore/QHash>
+ #include <QtCore/QMutex>
++#include <QtCore/QHash>
++#include <QtCore/QDataStream>
++#include <QtCore/QDateTime>
+
+ #include <qdebug.h>
+-#include <qplatformdefs.h>
+
+ #include <algorithm>
+ #include <errno.h>
+ #include <limits.h>
+-#ifndef Q_OS_INTEGRITY
++#if !defined(Q_OS_INTEGRITY)
+ #include <sys/param.h> // to use MAXSYMLINKS constant
+ #endif
+ #include <unistd.h> // to use _SC_SYMLOOP_MAX constant
+@@ -1102,146 +1100,28 @@ QTimeZonePrivate::Data QTzTimeZonePrivate::previousTransition(qint64 beforeMSecs
+ return last > tranCache().cbegin() ? dataForTzTransition(*--last) : invalidData();
+ }
+
+-bool QTzTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
+-{
+- return tzZones->contains(ianaId);
+-}
+-
+-QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds() const
+-{
+- QList<QByteArray> result = tzZones->keys();
+- std::sort(result.begin(), result.end());
+- return result;
+-}
+-
+-QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
++static long getSymloopMax()
+ {
+- // TODO AnyCountry
+- QList<QByteArray> result;
+- for (auto it = tzZones->cbegin(), end = tzZones->cend(); it != end; ++it) {
+- if (it.value().country == country)
+- result << it.key();
+- }
+- std::sort(result.begin(), result.end());
+- return result;
+-}
+-
+-// Getting the system zone's ID:
+-
+-namespace {
+-class ZoneNameReader : public QObject
+-{
+-public:
+- QByteArray name()
+- {
+- /* Assumptions:
+- a) Systems don't change which of localtime and TZ they use without a
+- reboot.
+- b) When they change, they use atomic renames, hence a new device and
+- inode for the new file.
+- c) If we change which *name* is used for a zone, while referencing
+- the same final zoneinfo file, we don't care about the change of
+- name (e.g. if Europe/Oslo and Europe/Berlin are both symlinks to
+- the same CET file, continuing to use the old name, after
+- /etc/localtime changes which of the two it points to, is
+- harmless).
+-
+- The alternative would be to use a file-system watcher, but they are a
+- scarce resource.
+- */
+- const StatIdent local = identify("/etc/localtime");
+- const StatIdent tz = identify("/etc/TZ");
+- if (!m_name.isEmpty() && m_last.isValid() && (m_last == local || m_last == tz))
+- return m_name;
+-
+- m_name = etcLocalTime();
+- if (!m_name.isEmpty()) {
+- m_last = local;
+- return m_name;
+- }
+-
+- m_name = etcTZ();
+- m_last = m_name.isEmpty() ? StatIdent() : tz;
+- return m_name;
+- }
+-
+-
+-private:
+- QByteArray m_name;
+- struct StatIdent
+- {
+- static constexpr unsigned long bad = ~0ul;
+- unsigned long m_dev, m_ino;
+- StatIdent() : m_dev(bad), m_ino(bad) {}
+- StatIdent(const QT_STATBUF &data) : m_dev(data.st_dev), m_ino(data.st_ino) {}
+- bool isValid() { return m_dev != bad || m_ino != bad; }
+- bool operator==(const StatIdent &other)
+- { return other.m_dev == m_dev && other.m_ino == m_ino; }
+- };
+- StatIdent m_last;
+-
+- static StatIdent identify(const char *path)
+- {
+- QT_STATBUF data;
+- return QT_STAT(path, &data) == -1 ? StatIdent() : StatIdent(data);
+- }
+-
+- static QByteArray etcLocalTime()
+- {
+- // On most distros /etc/localtime is a symlink to a real file so extract
+- // name from the path
+- const QLatin1String zoneinfo("/zoneinfo/");
+- QString path = QStringLiteral("/etc/localtime");
+- long iteration = getSymloopMax();
+- // Symlink may point to another symlink etc. before being under zoneinfo/
+- // We stop on the first path under /zoneinfo/, even if it is itself a
+- // symlink, like America/Montreal pointing to America/Toronto
+- do {
+- path = QFile::symLinkTarget(path);
+- int index = path.indexOf(zoneinfo);
+- if (index >= 0) // Found zoneinfo file; extract zone name from path:
+- return path.midRef(index + zoneinfo.size()).toUtf8();
+- } while (!path.isEmpty() && --iteration > 0);
+-
+- return QByteArray();
+- }
+-
+- static QByteArray etcTZ()
+- {
+- // Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
+- const QString path = QStringLiteral("/etc/TZ");
+- QFile zone(path);
+- if (zone.open(QIODevice::ReadOnly))
+- return zone.readAll().trimmed();
+-
+- return QByteArray();
+- }
+-
+- // Any chain of symlinks longer than this is assumed to be a loop:
+- static long getSymloopMax()
+- {
+-#ifdef SYMLOOP_MAX
+- // If defined, at runtime it can only be greater than this, so this is a safe bet:
+- return SYMLOOP_MAX;
++#if defined(SYMLOOP_MAX)
++ return SYMLOOP_MAX; // if defined, at runtime it can only be greater than this, so this is a safe bet
+ #else
+- errno = 0;
+- long result = sysconf(_SC_SYMLOOP_MAX);
+- if (result >= 0)
+- return result;
+- // result is -1, meaning either error or no limit
+- Q_ASSERT(!errno); // ... but it can't be an error, POSIX mandates _SC_SYMLOOP_MAX
+-
+- // therefore we can make up our own limit
+-# ifdef MAXSYMLINKS
+- return MAXSYMLINKS;
++ errno = 0;
++ long result = sysconf(_SC_SYMLOOP_MAX);
++ if (result >= 0)
++ return result;
++ // result is -1, meaning either error or no limit
++ Q_ASSERT(!errno); // ... but it can't be an error, POSIX mandates _SC_SYMLOOP_MAX
++
++ // therefore we can make up our own limit
++# if defined(MAXSYMLINKS)
++ return MAXSYMLINKS;
+ # else
+- return 8;
++ return 8;
+ # endif
+ #endif
+- }
+-};
+ }
+
++// TODO Could cache the value and monitor the required files for any changes
+ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
+ {
+ // Check TZ env var first, if not populated try find it
+@@ -1256,9 +1136,28 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
+ else if (ianaId.startsWith(':'))
+ ianaId = ianaId.mid(1);
+
++ // On most distros /etc/localtime is a symlink to a real file so extract name from the path
++ if (ianaId.isEmpty()) {
++ const QLatin1String zoneinfo("/zoneinfo/");
++ QString path = QFile::symLinkTarget(QStringLiteral("/etc/localtime"));
++ int index = -1;
++ long iteration = getSymloopMax();
++ // Symlink may point to another symlink etc. before being under zoneinfo/
++ // We stop on the first path under /zoneinfo/, even if it is itself a
++ // symlink, like America/Montreal pointing to America/Toronto
++ while (iteration-- > 0 && !path.isEmpty() && (index = path.indexOf(zoneinfo)) < 0)
++ path = QFile::symLinkTarget(path);
++ if (index >= 0) {
++ // /etc/localtime is a symlink to the current TZ file, so extract from path
++ ianaId = path.midRef(index + zoneinfo.size()).toUtf8();
++ }
++ }
++
++ // Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
+ if (ianaId.isEmpty()) {
+- thread_local static ZoneNameReader reader;
+- ianaId = reader.name();
++ QFile zone(QStringLiteral("/etc/TZ"));
++ if (zone.open(QIODevice::ReadOnly))
++ ianaId = zone.readAll().trimmed();
+ }
+
+ // Give up for now and return UTC
+@@ -1268,4 +1167,28 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
+ return ianaId;
+ }
+
++bool QTzTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
++{
++ return tzZones->contains(ianaId);
++}
++
++QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds() const
++{
++ QList<QByteArray> result = tzZones->keys();
++ std::sort(result.begin(), result.end());
++ return result;
++}
++
++QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
++{
++ // TODO AnyCountry
++ QList<QByteArray> result;
++ for (auto it = tzZones->cbegin(), end = tzZones->cend(); it != end; ++it) {
++ if (it.value().country == country)
++ result << it.key();
++ }
++ std::sort(result.begin(), result.end());
++ return result;
++}
++
+ QT_END_NAMESPACE
+--
+2.28.0
+
diff --git a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch b/dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch
new file mode 100644
index 000000000000..611c979a469c
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch
@@ -0,0 +1,47 @@
+From ffc9093a199a542791920b30d1835c3248920aa0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
+Date: Sat, 10 Oct 2020 19:26:35 +0200
+Subject: [PATCH 2/2] Revert "Purge two old time-zone lookup fallbacks"
+
+This reverts commit b0383cbd388336f698ceeac11a4f50cdff931dd9.
+---
+ src/corelib/time/qtimezoneprivate_tz.cpp | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
+index 01f9a6cce0..eea6f5e962 100644
+--- a/src/corelib/time/qtimezoneprivate_tz.cpp
++++ b/src/corelib/time/qtimezoneprivate_tz.cpp
+@@ -1153,6 +1153,29 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
+ }
+ }
+
++ // On Debian Etch up to Jessie, /etc/localtime is a copy of the relevant
++ // zoneinfo file, whose name is recorded in /etc/timezone:
++ if (ianaId.isEmpty()) {
++ QFile tzif(QStringLiteral("/etc/timezone"));
++ if (tzif.open(QIODevice::ReadOnly))
++ ianaId = tzif.readAll().trimmed();
++ }
++
++ // On some Red Hat distros /etc/localtime is real file with name held in /etc/sysconfig/clock
++ // in a line like ZONE="Europe/Oslo" or TIMEZONE="Europe/Oslo"
++ if (ianaId.isEmpty()) {
++ QFile tzif(QStringLiteral("/etc/sysconfig/clock"));
++ if (tzif.open(QIODevice::ReadOnly)) {
++ while (ianaId.isEmpty() && !tzif.atEnd()) {
++ const QByteArray line(tzif.readLine().trimmed());
++ if (line.startsWith("ZONE="))
++ ianaId = line.mid(6, line.length() - 7);
++ else if (line.startsWith("TIMEZONE="))
++ ianaId = line.mid(10, line.length() - 11);
++ }
++ }
++ }
++
+ // Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
+ if (ianaId.isEmpty()) {
+ QFile zone(QStringLiteral("/etc/TZ"));
+--
+2.28.0
+
diff --git a/dev-qt/qtcore/qtcore-5.14.2.ebuild b/dev-qt/qtcore/qtcore-5.14.2.ebuild
deleted file mode 100644
index 48df292f53b7..000000000000
--- a/dev-qt/qtcore/qtcore-5.14.2.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-QT5_MODULE="qtbase"
-inherit linux-info qt5-build
-
-DESCRIPTION="Cross-platform application development framework"
-SLOT=5/$(ver_cut 1-3)
-
-if [[ ${QT5_BUILD_TYPE} == release ]]; then
- KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~sparc x86"
-fi
-
-IUSE="icu old-kernel systemd"
-
-DEPEND="
- dev-libs/double-conversion:=
- dev-libs/glib:2
- dev-libs/libpcre2[pcre16,unicode]
- sys-libs/zlib:=
- icu? ( dev-libs/icu:= )
- !icu? ( virtual/libiconv )
- systemd? ( sys-apps/systemd:= )
-"
-RDEPEND="${DEPEND}
- !<dev-qt/qtcore-4.8.7-r4:4
-"
-
-QT5_TARGET_SUBDIRS=(
- src/tools/bootstrap
- src/tools/moc
- src/tools/rcc
- src/corelib
- src/tools/qlalr
- doc
-)
-
-QT5_GENTOO_PRIVATE_CONFIG=(
- !:network
- !:sql
- !:testlib
- !:xml
-)
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
- "${FILESDIR}/${P}-QLibrary-deadlock.patch" # QTBUG-83207
-)
-
-pkg_pretend() {
- use kernel_linux || return
- get_running_version
- if kernel_is -lt 3 17 && ! use old-kernel; then
- ewarn "The running kernel is older than 3.17. USE=old-kernel is needed for"
- ewarn "dev-qt/qtcore to function on this kernel properly. See Bug #669994."
- fi
-}
-
-src_prepare() {
- # don't add -O3 to CXXFLAGS, bug 549140
- sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die
-
- # fix missing qt_version_tag symbol w/ LTO, bug 674382
- sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
-
- qt5-build_src_prepare
-}
-
-src_configure() {
- local myconf=(
- -no-feature-statx # bug 672856
- $(qt_use icu)
- $(qt_use !icu iconv)
- $(qt_use systemd journald)
- )
- use old-kernel && myconf+=(
- -no-feature-renameat2 # needs Linux 3.16, bug 669994
- -no-feature-getentropy # needs Linux 3.17, bug 669994
- )
- qt5-build_src_configure
-}
-
-src_install() {
- qt5-build_src_install
-
- local flags=(
- DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG
- OPENGL OPENSSL SSL WIDGETS
- )
-
- for flag in ${flags[@]}; do
- cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die
-
- #if defined(QT_NO_${flag}) && defined(QT_${flag})
- # undef QT_NO_${flag}
- #elif !defined(QT_NO_${flag}) && !defined(QT_${flag})
- # define QT_NO_${flag}
- #endif
- _EOF_
- done
-}
diff --git a/dev-qt/qtcore/qtcore-5.15.1.ebuild b/dev-qt/qtcore/qtcore-5.15.1-r1.ebuild
index 449fddfc065d..d893c6ff73df 100644
--- a/dev-qt/qtcore/qtcore-5.15.1.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.1-r1.ebuild
@@ -10,7 +10,7 @@ DESCRIPTION="Cross-platform application development framework"
SLOT=5/$(ver_cut 1-3)
if [[ ${QT5_BUILD_TYPE} == release ]]; then
- KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+ KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~sparc x86"
fi
IUSE="icu old-kernel systemd"
@@ -44,7 +44,11 @@ QT5_GENTOO_PRIVATE_CONFIG=(
!:xml
)
-PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306
+PATCHES=(
+ "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
+ "${FILESDIR}/${PN}-5.15.1-timezone-1.patch" # bug 737914
+ "${FILESDIR}/${PN}-5.15.1-timezone-2.patch"
+)
pkg_pretend() {
use kernel_linux || return