public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
@ 2020-02-09 19:24 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2020-02-09 19:24 UTC (permalink / raw
  To: gentoo-commits

commit:     91b38cc3ab9bb6c70c9e40ba6a5fbbe41b2da753
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  9 10:59:22 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 19:22:20 2020 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=91b38cc3

dev-qt/qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14

Closes: https://bugs.gentoo.org/703306
Closes: https://bugs.gentoo.org/705198
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
(cherry picked from commit fe1eb44a73d1a8e99aae1eeb2b7504b326df2cd1)

 ...qtcore-5.14.1-cmake-macro-backward-compat.patch | 50 ++++++++++++++++++++++
 dev-qt/qtcore/qtcore-5.14.9999.ebuild              |  4 +-
 dev-qt/qtcore/qtcore-5.15.9999.ebuild              |  4 +-
 3 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch
new file mode 100644
index 00000000..30b5abc3
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch
@@ -0,0 +1,50 @@
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 9 Feb 2020 11:45:00 +0100
+Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14
+
+In upstream commit:
+
+https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=63d9cd17
+
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument
+IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for
+QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland.
+During upgrade from <Qt-5.14 to >=Qt-5.14, as a consequence of slot upgrade rebuilds, some
+reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their
+cmake files regenerated, leading to cmake errors like:
+
+https://bugs.gentoo.org/703306
+https://bugs.gentoo.org/705198
+
+From mkspecs/features/create_cmake.prf:
+
+# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties
+# functions whether a Configuration specific generator expression needs to be added to the values
+# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need
+# configuration specific values. For singular builds (only release or only debug), we want the
+# values to be applied regardless of the configuration.
+# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to
+# build a Debug configuration of an application, even if Qt was built in a Release configuration.
+
+qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease
+optional and default to FALSE.
+
+--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in	2020-01-23 13:37:32.000000000 +0100
++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in	2020-02-09 15:15:21.156219814 +0100
+@@ -538,8 +538,14 @@
+ 
+     file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
+ 
+-    macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION
+-          IsDebugAndRelease)
++    macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
++        set(IsDebugAndRelease FALSE)
++        set (list_var ${ARGN})
++        list(LENGTH list_var num_extra_arg)
++        if (${num_extra_arg} GREATER 0)
++            list(GET list_var 0 IsDebugAndRelease)
++        endif()
++
+         set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+ 
+ !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)

diff --git a/dev-qt/qtcore/qtcore-5.14.9999.ebuild b/dev-qt/qtcore/qtcore-5.14.9999.ebuild
index e6a7a124..9b476abf 100644
--- a/dev-qt/qtcore/qtcore-5.14.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.14.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -42,6 +42,8 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 	!:xml
 )
 
+PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306
+
 src_prepare() {
 	# don't add -O3 to CXXFLAGS, bug 549140
 	sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die

diff --git a/dev-qt/qtcore/qtcore-5.15.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.9999.ebuild
index e6a7a124..9b476abf 100644
--- a/dev-qt/qtcore/qtcore-5.15.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -42,6 +42,8 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 	!:xml
 )
 
+PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306
+
 src_prepare() {
 	# don't add -O3 to CXXFLAGS, bug 549140
 	sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
@ 2021-09-30 11:35 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-09-30 11:35 UTC (permalink / raw
  To: gentoo-commits

commit:     e65b89b6e937ac0a2b3a37e07b08407511b6a692
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 17:39:33 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Sep 30 10:55:51 2021 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=e65b89b6

dev-qt/qtcore: Revert timezone handling to 5.14 state

This is an obvious workaround, until we and upstream have
decided what to do...

(sync with Gentoo ebuild repository)

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch | 271 +++++++++++++++++++++
 dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch |  47 ++++
 dev-qt/qtcore/qtcore-5.15.2.9999.ebuild            |   5 +-
 3 files changed, 322 insertions(+), 1 deletion(-)

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 00000000..1c8f1e89
--- /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 00000000..611c979a
--- /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.15.2.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.2.9999.ebuild
index f5dae178..23956275 100644
--- a/dev-qt/qtcore/qtcore-5.15.2.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.2.9999.ebuild
@@ -42,7 +42,10 @@ 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,2}.patch # bug 737914
+)
 
 pkg_pretend() {
 	use kernel_linux || return


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
@ 2022-01-19 16:50 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-01-19 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     99ee62b2dd16d747c666d86a12c005c5c356dbe9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 19 16:49:25 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 19 16:49:39 2022 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=99ee62b2

dev-qt/qtcore: Drop obsolete downstream reverts

Upstream MR was merged:
https://invent.kde.org/qt/qt/qtbase/-/merge_requests/111

QTBUG: https://bugreports.qt.io/browse/QTBUG-87326

Bug: https://bugs.gentoo.org/737914
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch | 271 ---------------------
 dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch |  47 ----
 dev-qt/qtcore/qtcore-5.15.2.9999.ebuild            |   3 +-
 3 files changed, 1 insertion(+), 320 deletions(-)

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
deleted file mode 100644
index 1c8f1e89..00000000
--- a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-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
deleted file mode 100644
index 611c979a..00000000
--- a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-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.15.2.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.2.9999.ebuild
index 7cf61d1f..bf94a0df 100644
--- a/dev-qt/qtcore/qtcore-5.15.2.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.2.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -44,7 +44,6 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-5.14.1-cmake-macro-backward-compat.patch # bug 703306
-	"${FILESDIR}"/${PN}-5.15.1-timezone-{1,2}.patch # bug 737914
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
@ 2022-04-01 18:23 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-04-01 18:23 UTC (permalink / raw
  To: gentoo-commits

commit:     ebcfd362f1047bbb7c09021bad242dc9fd8a030f
Author:     Han Gao <rabenda.cn <AT> gmail <DOT> com>
AuthorDate: Sun Mar 27 13:05:18 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Apr  1 17:57:49 2022 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=ebcfd362

dev-qt/qtcore: use link option -pthread instead of -lpthread

Bug: https://bugs.gentoo.org/803470
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Han Gao <rabenda.cn <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24711
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch | 41 +++++++++++++++++++++++++
 dev-qt/qtcore/qtcore-5.15.3.9999.ebuild         |  1 +
 2 files changed, 42 insertions(+)

diff --git a/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch b/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch
new file mode 100644
index 00000000..c83c59ac
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch
@@ -0,0 +1,41 @@
+# Use link option -pthread instead of -lpthread
+
+# https://github.com/riscv-collab/riscv-gcc/issues/12 use Option 4
+# https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling
+# In riscv, "-pthread" equivalent to add link option "--push-state --as-needed -latomic --pop-state"
+
+diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
+index 544cc227..add969be 100644
+--- a/mkspecs/common/linux.conf
++++ b/mkspecs/common/linux.conf
+@@ -33,7 +33,7 @@ QMAKE_LIBS_EGL          = -lEGL
+ QMAKE_LIBS_OPENGL       = -lGL
+ QMAKE_LIBS_OPENGL_ES2   = -lGLESv2
+ QMAKE_LIBS_OPENVG       = -lOpenVG
+-QMAKE_LIBS_THREAD       = -lpthread
++QMAKE_LIBS_THREAD       = -pthread
+ QMAKE_LIBS_VULKAN       =
+ 
+ QMAKE_INCDIR_WAYLAND    =
+diff --git a/src/corelib/configure.json b/src/corelib/configure.json
+index 9b5d19d4..da028fb2 100644
+--- a/src/corelib/configure.json
++++ b/src/corelib/configure.json
+@@ -355,7 +355,7 @@
+                     "std::future<int> f = std::async([]() { return 42; });",
+                     "(void)f.get();"
+                 ],
+-                "qmake": "unix:LIBS += -lpthread"
++                "qmake": "unix:LIBS += -pthread"
+             }
+         },
+         "cxx11_random": {
+@@ -466,7 +466,7 @@
+                     "shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666);",
+                     "shm_unlink(\"test\");"
+                 ],
+-                "qmake": "linux: LIBS += -lpthread -lrt"
++                "qmake": "linux: LIBS += -pthread -lrt"
+             }
+         },
+         "linkat": {

diff --git a/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild
index 3d3b8751..f8c7d657 100644
--- a/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild
@@ -44,6 +44,7 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-5.14.1-cmake-macro-backward-compat.patch # bug 703306
+	"${FILESDIR}"/${PN}-5.15.3-pthread.patch # bug 803470
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
@ 2022-06-15 17:20 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-06-15 17:20 UTC (permalink / raw
  To: gentoo-commits

commit:     f53329f738bfbd9ce93be632a5da4a0bd5767272
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 14 11:41:24 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jun 14 18:21:17 2022 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=f53329f7

dev-qt/qtcore: Cleanup and make use of gentoo-patchset

Ends the which-hunt.

Bug: https://bugs.gentoo.org/828100
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtcore/Manifest                             |  1 +
 ...qtcore-5.14.1-cmake-macro-backward-compat.patch | 50 ----------------------
 dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch    | 41 ------------------
 dev-qt/qtcore/qtcore-5.15.4.9999.ebuild            |  5 ---
 4 files changed, 1 insertion(+), 96 deletions(-)

diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest
new file mode 100644
index 00000000..1e41118d
--- /dev/null
+++ b/dev-qt/qtcore/Manifest
@@ -0,0 +1 @@
+DIST qtbase-5.15-gentoo-patchset-1.tar.xz 4204 BLAKE2B 1399eb6f4c776d370e1837351a72b604440658a3a2d1bd0c725b9ef149b09d236347f5f4b37f652c33310048a0a7df54e24453b404dc45507fd4f7c5fdf144cd SHA512 c857fc746bacb047321cdb762f3c7c48ce2a0d24045a9e708edd38532568dbbc74e9e971425a72a3c2a5ca0662b3e6333831f6c1b7746525b99d46000b63111f

diff --git a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch
deleted file mode 100644
index 30b5abc3..00000000
--- a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Sun, 9 Feb 2020 11:45:00 +0100
-Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14
-
-In upstream commit:
-
-https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=63d9cd17
-
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument
-IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for
-QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland.
-During upgrade from <Qt-5.14 to >=Qt-5.14, as a consequence of slot upgrade rebuilds, some
-reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their
-cmake files regenerated, leading to cmake errors like:
-
-https://bugs.gentoo.org/703306
-https://bugs.gentoo.org/705198
-
-From mkspecs/features/create_cmake.prf:
-
-# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties
-# functions whether a Configuration specific generator expression needs to be added to the values
-# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need
-# configuration specific values. For singular builds (only release or only debug), we want the
-# values to be applied regardless of the configuration.
-# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to
-# build a Debug configuration of an application, even if Qt was built in a Release configuration.
-
-qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease
-optional and default to FALSE.
-
---- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in	2020-01-23 13:37:32.000000000 +0100
-+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in	2020-02-09 15:15:21.156219814 +0100
-@@ -538,8 +538,14 @@
- 
-     file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
- 
--    macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION
--          IsDebugAndRelease)
-+    macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
-+        set(IsDebugAndRelease FALSE)
-+        set (list_var ${ARGN})
-+        list(LENGTH list_var num_extra_arg)
-+        if (${num_extra_arg} GREATER 0)
-+            list(GET list_var 0 IsDebugAndRelease)
-+        endif()
-+
-         set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
- 
- !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)

diff --git a/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch b/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch
deleted file mode 100644
index c83c59ac..00000000
--- a/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-# Use link option -pthread instead of -lpthread
-
-# https://github.com/riscv-collab/riscv-gcc/issues/12 use Option 4
-# https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling
-# In riscv, "-pthread" equivalent to add link option "--push-state --as-needed -latomic --pop-state"
-
-diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
-index 544cc227..add969be 100644
---- a/mkspecs/common/linux.conf
-+++ b/mkspecs/common/linux.conf
-@@ -33,7 +33,7 @@ QMAKE_LIBS_EGL          = -lEGL
- QMAKE_LIBS_OPENGL       = -lGL
- QMAKE_LIBS_OPENGL_ES2   = -lGLESv2
- QMAKE_LIBS_OPENVG       = -lOpenVG
--QMAKE_LIBS_THREAD       = -lpthread
-+QMAKE_LIBS_THREAD       = -pthread
- QMAKE_LIBS_VULKAN       =
- 
- QMAKE_INCDIR_WAYLAND    =
-diff --git a/src/corelib/configure.json b/src/corelib/configure.json
-index 9b5d19d4..da028fb2 100644
---- a/src/corelib/configure.json
-+++ b/src/corelib/configure.json
-@@ -355,7 +355,7 @@
-                     "std::future<int> f = std::async([]() { return 42; });",
-                     "(void)f.get();"
-                 ],
--                "qmake": "unix:LIBS += -lpthread"
-+                "qmake": "unix:LIBS += -pthread"
-             }
-         },
-         "cxx11_random": {
-@@ -466,7 +466,7 @@
-                     "shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666);",
-                     "shm_unlink(\"test\");"
-                 ],
--                "qmake": "linux: LIBS += -lpthread -lrt"
-+                "qmake": "linux: LIBS += -pthread -lrt"
-             }
-         },
-         "linkat": {

diff --git a/dev-qt/qtcore/qtcore-5.15.4.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.4.9999.ebuild
index e197e2ff..84966e24 100644
--- a/dev-qt/qtcore/qtcore-5.15.4.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.4.9999.ebuild
@@ -42,11 +42,6 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 	!:xml
 )
 
-PATCHES=(
-	"${FILESDIR}"/${PN}-5.14.1-cmake-macro-backward-compat.patch # bug 703306
-	"${FILESDIR}"/${PN}-5.15.3-pthread.patch # bug 803470
-)
-
 pkg_pretend() {
 	use kernel_linux || return
 	get_running_version


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-15 17:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-01 18:23 [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-06-15 17:20 Andreas Sturmlechner
2022-01-19 16:50 Andreas Sturmlechner
2021-09-30 11:35 Andreas Sturmlechner
2020-02-09 19:24 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox