pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
qt6-qtbase: add fixes for OS and sysinfo
Module Name: pkgsrc-wip
Committed By: Niclas Rosenvik <nros%NetBSD.org@localhost>
Pushed By: nros
Date: Sat Mar 6 09:15:54 2021 +0000
Changeset: 562c13c70e4367d9ebbd4e2f9c4f1433d2949298
Modified Files:
qt6-qtbase/distinfo
qt6-qtbase/patches/patch-src_corelib_CMakeLists.txt
Added Files:
qt6-qtbase/patches/patch-src_corelib_global_qglobal.cpp
qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.cpp
qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.h
qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion__uname.cpp
qt6-qtbase/patches/patch-src_tools_bootstrap_CMakeLists.txt
Log Message:
qt6-qtbase: add fixes for OS and sysinfo
Add patches that sets QOperatingSystemVersion on Free and NetBSD.
Add patches that sets PruductInfo on Net and OpenBSD.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=562c13c70e4367d9ebbd4e2f9c4f1433d2949298
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
qt6-qtbase/distinfo | 7 ++-
.../patches/patch-src_corelib_CMakeLists.txt | 16 +++++-
.../patches/patch-src_corelib_global_qglobal.cpp | 26 +++++++++
...-src_corelib_global_qoperatingsystemversion.cpp | 15 +++++
...ch-src_corelib_global_qoperatingsystemversion.h | 42 ++++++++++++++
...relib_global_qoperatingsystemversion__uname.cpp | 67 ++++++++++++++++++++++
.../patch-src_tools_bootstrap_CMakeLists.txt | 18 ++++++
7 files changed, 189 insertions(+), 2 deletions(-)
diffs:
diff --git a/qt6-qtbase/distinfo b/qt6-qtbase/distinfo
index dc21b4bcc3..0cea063b5f 100644
--- a/qt6-qtbase/distinfo
+++ b/qt6-qtbase/distinfo
@@ -16,8 +16,12 @@ SHA1 (patch-mkspecs_features_toolchain.prf) = 0cf13cb6e859dd6276954239b91953e557
SHA1 (patch-qmake_Makefile.unix) = 05037b4db1b83dbfc9647b3258f896f4fac4a4dc
SHA1 (patch-qmake_generators_makefile.cpp) = 1bca636dc88f258876df54bd0c6c64114fa7411d
SHA1 (patch-qmake_generators_unix_unixmake2.cpp) = 6ea4efd2ce88d7cf3c73e1dc2cdf984fe3b6af04
-SHA1 (patch-src_corelib_CMakeLists.txt) = a468e59a87fea434b42b0fcb84472e9ab0d9bdc2
+SHA1 (patch-src_corelib_CMakeLists.txt) = fb128a3119a5a0c0672af047238263938eb1fbf7
SHA1 (patch-src_corelib_configure.json) = 7a83a356330e602cbc65256dd345a107004a67cb
+SHA1 (patch-src_corelib_global_qglobal.cpp) = 6368692c2d5d64633d956a89c6b4607667c121a7
+SHA1 (patch-src_corelib_global_qoperatingsystemversion.cpp) = 84695f7523352f0e7cf925da8d57715e73713bad
+SHA1 (patch-src_corelib_global_qoperatingsystemversion.h) = 33a2e58242e12c44da8ce2c3cdbdd85177673646
+SHA1 (patch-src_corelib_global_qoperatingsystemversion__uname.cpp) = ab30d7f7c3ec3c9ac5eac61cee4383b916d16724
SHA1 (patch-src_corelib_global_qrandom.cpp) = d910579df42d5b01583b88fa19f514b230596ca7
SHA1 (patch-src_corelib_io_io.pri) = b2c1057e20c3150162695947bab958a2644df7dc
SHA1 (patch-src_corelib_io_qstandardpaths_unix.cpp) = b12a41da19b25e34e12fdf80714a37e8c46278f9
@@ -36,6 +40,7 @@ SHA1 (patch-src_network_kernel_qnetworkinterface__unix.cpp) = 2c5569eb2ba19999eb
SHA1 (patch-src_plugins_platforms_cocoa_qiosurfacegraphicsbuffer.mm) = 01afb2aef1d14370308c897c1d077b05c5e3f0a9
SHA1 (patch-src_plugins_platforms_xcb_qxcbatom.cpp) = abbd0b04b881666e82f45adc18e49aafdb43d4be
SHA1 (patch-src_plugins_platforms_xcb_qxcbconnection__basic.h) = e369001cba31e865adf010ab714ad132b96c1bef
+SHA1 (patch-src_tools_bootstrap_CMakeLists.txt) = 5b13a8d9cdfb9228a8594ab226fd0ff5b44e2009
SHA1 (patch-src_tools_moc_main.cpp) = ebdddd657ba1c24657a9ca5624907e31a5d0c8bb
SHA1 (patch-src_widgets_graphicsview_qgraphicsitem__p.h) = fd55d5ef6fde506849aab07f7ba23e856373b3a1
SHA1 (patch-tests_auto_corelib_io_qprocess_qprocess.pro) = 1dbb08e5ec6715cbe239efdfb45389959b179ea3
diff --git a/qt6-qtbase/patches/patch-src_corelib_CMakeLists.txt b/qt6-qtbase/patches/patch-src_corelib_CMakeLists.txt
index 9d76c1def1..3a089f8a98 100644
--- a/qt6-qtbase/patches/patch-src_corelib_CMakeLists.txt
+++ b/qt6-qtbase/patches/patch-src_corelib_CMakeLists.txt
@@ -1,11 +1,25 @@
$NetBSD$
+* get QOperatinSystemVersion using uname on Free and NetBSD
+
* use gzip compression instead of zstd since libarchive might miss zstd even
if QT uses it, fixes the configure step on NetBSD
--- src/corelib/CMakeLists.txt.orig 2021-01-26 18:29:22.000000000 +0000
+++ src/corelib/CMakeLists.txt
-@@ -1179,7 +1179,7 @@ if(QT_FEATURE_mimetype AND QT_FEATURE_mi
+@@ -531,6 +531,11 @@ qt_internal_extend_target(Core CONDITION
+ --pending_instantiations=128
+ )
+
++qt_internal_extend_target(Core CONDITION FREEBSD OR NETBSD
++ SOURCES
++ global/qoperatingsystemversion_uname.cpp
++)
++
+ #### Keys ignored in scope 14:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_HOST_DATA_DIR):
+ # CMAKE_HOST_DATA_DIR = "$$[QT_HOST_DATA/src]/"
+ # CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = "True"
+@@ -1179,7 +1184,7 @@ if(QT_FEATURE_mimetype AND QT_FEATURE_mi
COMMENT "Generating ${qmimeprovider_db_output}"
)
else()
diff --git a/qt6-qtbase/patches/patch-src_corelib_global_qglobal.cpp b/qt6-qtbase/patches/patch-src_corelib_global_qglobal.cpp
new file mode 100644
index 0000000000..3b57235e5a
--- /dev/null
+++ b/qt6-qtbase/patches/patch-src_corelib_global_qglobal.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* set the right product type and product version for Net and OpenBSD
+
+--- src/corelib/global/qglobal.cpp.orig 2021-03-05 22:37:13.455522697 +0000
++++ src/corelib/global/qglobal.cpp
+@@ -2607,7 +2607,9 @@ QString QSysInfo::productType()
+ return QStringLiteral("macos");
+ #elif defined(Q_OS_DARWIN)
+ return QStringLiteral("darwin");
+-
++#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
++ return kernelType();
++
+ #elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
+ QUnixOSVersion unixOsVersion;
+ findUnixOsVersion(unixOsVersion);
+@@ -2668,6 +2670,8 @@ QString QSysInfo::productVersion()
+ }
+ // fall through
+
++#elif defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
++ return kernelVersion();
+ #elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
+ QUnixOSVersion unixOsVersion;
+ findUnixOsVersion(unixOsVersion);
diff --git a/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.cpp b/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.cpp
new file mode 100644
index 0000000000..d322efe746
--- /dev/null
+++ b/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* set operatingsystem verson using uname on Free and NetBSD
+
+--- src/corelib/global/qoperatingsystemversion.cpp.orig 2021-01-26 18:29:22.000000000 +0000
++++ src/corelib/global/qoperatingsystemversion.cpp
+@@ -150,7 +150,7 @@ QT_BEGIN_NAMESPACE
+
+ \sa currentType()
+ */
+-#if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN)
++#if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_NETBSD)
+ QOperatingSystemVersion QOperatingSystemVersion::current()
+ {
+ QOperatingSystemVersion version;
diff --git a/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.h b/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.h
new file mode 100644
index 0000000000..a09e3ee87e
--- /dev/null
+++ b/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion.h
@@ -0,0 +1,42 @@
+$NetBSD$
+
+* set OStype enums for Free and NetBSD
+
+* NetBSD is a defined on NetBSD systems so unset it, this is safe since
+ code shouldn't even count on it being defined according to sys/param.h
+
+--- src/corelib/global/qoperatingsystemversion.h.orig 2021-01-26 18:29:22.000000000 +0000
++++ src/corelib/global/qoperatingsystemversion.h
+@@ -42,6 +42,10 @@
+ #ifndef QOPERATINGSYSTEMVERSION_H
+ #define QOPERATINGSYSTEMVERSION_H
+
++#ifdef NetBSD
++#undef NetBSD
++#endif
++
+ QT_BEGIN_NAMESPACE
+
+ class QString;
+@@ -57,7 +61,9 @@ public:
+ IOS,
+ TvOS,
+ WatchOS,
+- Android
++ Android,
++ FreeBSD,
++ NetBSD
+ };
+
+ static const QOperatingSystemVersion Windows7;
+@@ -109,6 +115,10 @@ public:
+ return WatchOS;
+ #elif defined(Q_OS_ANDROID)
+ return Android;
++#elif defined(Q_OS_FREEBSD)
++ return FreeBSD;
++#elif defined(Q_OS_NETBSD)
++ return NetBSD;
+ #else
+ return Unknown;
+ #endif
diff --git a/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion__uname.cpp b/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion__uname.cpp
new file mode 100644
index 0000000000..1e062e0180
--- /dev/null
+++ b/qt6-qtbase/patches/patch-src_corelib_global_qoperatingsystemversion__uname.cpp
@@ -0,0 +1,67 @@
+$NetBSD$
+
+* use uname to get QOperatingSystemVersion on Free and NetBSD
+
+--- src/corelib/global/qoperatingsystemversion_uname.cpp.orig 2021-03-05 22:33:51.055078786 +0000
++++ src/corelib/global/qoperatingsystemversion_uname.cpp
+@@ -0,0 +1,60 @@
++/****************************************************************************
++**
++** Copyright (C) 2021 The Qt Company Ltd.
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the QtCore module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and The Qt Company. For licensing terms
++** and conditions see https://www.qt.io/terms-conditions. For further
++** information use the contact form at https://www.qt.io/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include <QtCore/qstring.h>
++#include <QtCore/qversionnumber.h>
++#include <sys/utsname.h>
++#include "qoperatingsystemversion_p.h"
++
++QT_BEGIN_NAMESPACE
++
++QOperatingSystemVersion QOperatingSystemVersion::current()
++{
++ QOperatingSystemVersion v(currentType(), -1);
++ struct utsname u;
++ if (uname(&u) == 0) {
++ QVersionNumber osv = QVersionNumber::fromString(QString::fromLatin1(u.release));
++ v.m_major = osv.majorVersion();
++ v.m_minor = osv.minorVersion();
++ v.m_micro = osv.microVersion();
++ }
++ return v;
++}
++
++QT_END_NAMESPACE
diff --git a/qt6-qtbase/patches/patch-src_tools_bootstrap_CMakeLists.txt b/qt6-qtbase/patches/patch-src_tools_bootstrap_CMakeLists.txt
new file mode 100644
index 0000000000..629748e4c7
--- /dev/null
+++ b/qt6-qtbase/patches/patch-src_tools_bootstrap_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* get QOperatingSystemVersion using uname on Free and NetBSD
+
+--- src/tools/bootstrap/CMakeLists.txt.orig 2021-01-26 18:29:22.000000000 +0000
++++ src/tools/bootstrap/CMakeLists.txt
+@@ -258,6 +258,11 @@ qt_internal_extend_target(Bootstrap COND
+ uuid
+ )
+
++qt_internal_extend_target(Bootstrap CONDITION FREEBSD OR NETBSD
++ SOURCES
++ ../../corelib/global/qoperatingsystemversion_uname.cpp
++)
++
+ #### Keys ignored in scope 22:.:../../3rdparty/pcre2:../../3rdparty/pcre2/pcre2.pri:QT_FEATURE_intelcet:
+ # QMAKE_CFLAGS = "$$QMAKE_CFLAGS_SHSTK"
+
Home |
Main Index |
Thread Index |
Old Index