summaryrefslogtreecommitdiff
path: root/Ports/qt6-qtbase
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-12-03 09:20:59 -0700
committerLinus Groh <mail@linusgroh.de>2022-12-03 23:16:16 +0000
commitb7cc7b4e024e8ea1ae2266557afd14872728dde8 (patch)
tree69218d5a6c7e86d8fb5ea17048fc78df3a0c8e26 /Ports/qt6-qtbase
parentad9c24ffc2422c1f7f2bf390550707cf2478f626 (diff)
downloadserenity-b7cc7b4e024e8ea1ae2266557afd14872728dde8.zip
Ports: Update Qt6 port to 6.4.0
While we're here, make the host path detection more portable.
Diffstat (limited to 'Ports/qt6-qtbase')
-rwxr-xr-xPorts/qt6-qtbase/package.sh33
-rw-r--r--Ports/qt6-qtbase/patches/0001-Add-a-SerenityOS-platform-definition.patch20
-rw-r--r--Ports/qt6-qtbase/patches/0002-Disable-shared-memory-and-semaphores.patch12
-rw-r--r--Ports/qt6-qtbase/patches/0003-Serenity-doesn-t-support-utimensat-and-UTIME_NOW.patch4
-rw-r--r--Ports/qt6-qtbase/patches/0004-Hack-Force-searching-for-plugins-in-usr-local.patch4
-rw-r--r--Ports/qt6-qtbase/patches/0005-Disable-version-tagging.patch18
-rw-r--r--Ports/qt6-qtbase/patches/0006-Serenity-Disable-local-domain-name-lookup-via-resolv.patch24
-rw-r--r--Ports/qt6-qtbase/patches/ReadMe.md7
8 files changed, 79 insertions, 43 deletions
diff --git a/Ports/qt6-qtbase/package.sh b/Ports/qt6-qtbase/package.sh
index 18511760e4..0711e57f6f 100755
--- a/Ports/qt6-qtbase/package.sh
+++ b/Ports/qt6-qtbase/package.sh
@@ -1,31 +1,36 @@
#!/usr/bin/env -S bash ../.port_include.sh
-port=qt6-qtbase
-version=6.2.3
-workdir=qtbase-everywhere-src-${version}
-useconfigure=true
-files="https://download.qt.io/official_releases/qt/$(cut -d. -f1,2 <<< ${version})/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz qt6-qtbase-${version}.tar.xz 34d6d0072e197241463c417ad72610c3d44e2efd6062868e9a95283103d75df4"
-auth_type="sha256"
+port='qt6-qtbase'
+version='6.4.0'
+workdir='qtbase-everywhere-src-${version}'
+useconfigure='true'
+files="https://download.qt.io/official_releases/qt/$(cut -d. -f1,2 <<< ${version})/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz qt6-qtbase-${version}.tar.xz cb6475a0bd8567c49f7ffbb072a05516ee6671171bed55db75b22b94ead9b37d"
+auth_type='sha256'
configopts=(
"-GNinja"
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
"-DCMAKE_CROSSCOMPILING=ON"
"-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON"
- "-DQT_HOST_PATH=/usr"
"-DQT_FEATURE_cxx20=ON"
"-DQT_FEATURE_ssl=ON"
"-DQT_FEATURE_zstd=ON"
"-DINPUT_opengl=no"
)
-depends=("md4c" "zstd" "openssl")
-
-QT_HOST_PATH=/usr
-QT_HOST_CMAKE_PATH=${QT_HOST_PATH}/lib64/cmake
-QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
-QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
+depends=(
+ "double-conversion"
+ "md4c"
+ "openssl"
+ "zstd"
+)
QT_DISABLED_FEATURES="sql opengl dbus systemsemaphore sharedmemory dnslookup"
configure() {
+
+ QT_HOST_PATH="$(qmake6 -query QT_HOST_PREFIX)"
+ QT_HOST_CMAKE_PATH="$(qmake6 -query QT_HOST_LIBS)/cmake"
+ QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
+ QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
+
for host_tool in ${QT_HOST_TOOLS}; do
if [[ ! -d $(printf $QT_HOST_TOOLS_PATH $host_tool) ]]; then
echo "You need to have Qt $version installed on the host (path "$(printf $QT_HOST_TOOLS_PATH $host_tool)" is missing)"
@@ -36,7 +41,7 @@ configure() {
MERGED_HOST_TOOLS=$(for host_tool in ${QT_HOST_TOOLS}; do echo "-DQt6${host_tool}_DIR=${QT_HOST_CMAKE_PATH}/Qt6${host_tool}/"; done)
MERGED_DISABLED_FEATURES=$(for feature in ${QT_DISABLED_FEATURES}; do echo "-DQT_FEATURE_${feature}=OFF"; done)
- run cmake ${configopts[@]} ${MERGED_HOST_TOOLS} ${MERGED_DISABLED_FEATURES}
+ run cmake ${configopts[@]} "-DQT_HOST_PATH=${QT_HOST_PATH}" ${MERGED_HOST_TOOLS} ${MERGED_DISABLED_FEATURES}
}
build() {
diff --git a/Ports/qt6-qtbase/patches/0001-Add-a-SerenityOS-platform-definition.patch b/Ports/qt6-qtbase/patches/0001-Add-a-SerenityOS-platform-definition.patch
index 06cb43aeb1..b207684e18 100644
--- a/Ports/qt6-qtbase/patches/0001-Add-a-SerenityOS-platform-definition.patch
+++ b/Ports/qt6-qtbase/patches/0001-Add-a-SerenityOS-platform-definition.patch
@@ -15,10 +15,10 @@ Subject: [PATCH] Add a SerenityOS platform definition
create mode 100644 mkspecs/serenity-g++/qplatformdefs.h
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
-index 6bd255b..ed466b7 100644
+index bb7049e76a65cd8fea0ad4aca2f29bdbefbdc86d..df4c9d07f2984ea8ab02d54004335a2d4377f78b 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
-@@ -325,6 +325,8 @@ elseif(APPLE)
+@@ -326,6 +326,8 @@ elseif(APPLE)
set(QT_DEFAULT_MKSPEC macx-clang)
elseif(WASM)
set(QT_DEFAULT_MKSPEC wasm-emscripten)
@@ -29,7 +29,7 @@ index 6bd255b..ed466b7 100644
set(QT_ENABLE_CXX_EXTENSIONS ON)
diff --git a/mkspecs/serenity-g++/qmake.conf b/mkspecs/serenity-g++/qmake.conf
new file mode 100644
-index 0000000..3808b5a
+index 0000000000000000000000000000000000000000..3808b5a269788a32d4aa74aa629b519df80d1000
--- /dev/null
+++ b/mkspecs/serenity-g++/qmake.conf
@@ -0,0 +1,25 @@
@@ -60,7 +60,7 @@ index 0000000..3808b5a
+load(qt_config)
diff --git a/mkspecs/serenity-g++/qplatformdefs.h b/mkspecs/serenity-g++/qplatformdefs.h
new file mode 100644
-index 0000000..1f0dd98
+index 0000000000000000000000000000000000000000..1f0dd9819abb1f8dac52250d24aa8d0763f05445
--- /dev/null
+++ b/mkspecs/serenity-g++/qplatformdefs.h
@@ -0,0 +1,87 @@
@@ -152,10 +152,10 @@ index 0000000..1f0dd98
+
+#endif // QPLATFORMDEFS_H
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h
-index c8f9804..5c534c4 100644
+index cbbe613e40cd20110b9aa31177d95e0a18bdf9fa..82b3f84800f8c5bf3a7a4567ea55f6a8a4681b13 100644
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
-@@ -72,6 +72,7 @@
+@@ -36,6 +36,7 @@
ANDROID - Android platform
HAIKU - Haiku
WEBOS - LG WebOS
@@ -163,7 +163,7 @@ index c8f9804..5c534c4 100644
The following operating systems have variants:
LINUX - both Q_OS_LINUX and Q_OS_ANDROID are defined when building for Android
-@@ -165,6 +166,8 @@
+@@ -129,6 +130,8 @@
# define Q_OS_VXWORKS
#elif defined(__HAIKU__)
# define Q_OS_HAIKU
@@ -173,7 +173,7 @@ index c8f9804..5c534c4 100644
#else
# error "Qt has not been ported to this OS - see http://www.qt-project.org/"
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
-index 1e212b2..b12c819 100644
+index 36dae764d75bf2c3a641ce0776f307755b4ead44..0ab63742665dd7da1259fdfbbb2cc8dab5450578 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -29,6 +29,8 @@ if (QT_FEATURE_gui)
@@ -186,10 +186,10 @@ index 1e212b2..b12c819 100644
set(_default_platform "xcb")
endif()
diff --git a/util/cmake/helper.py b/util/cmake/helper.py
-index e55a941..87260f3 100644
+index f40ea4d61f0d1d658b6715c55cb70c1eadb59a25..d8940f09595c887771f12c0e584936907174c540 100644
--- a/util/cmake/helper.py
+++ b/util/cmake/helper.py
-@@ -767,6 +767,7 @@ platform_mapping = {
+@@ -696,6 +696,7 @@ platform_mapping = {
"macx": "MACOS",
"macos": "MACOS",
"macx-icc": "(MACOS AND ICC)",
diff --git a/Ports/qt6-qtbase/patches/0002-Disable-shared-memory-and-semaphores.patch b/Ports/qt6-qtbase/patches/0002-Disable-shared-memory-and-semaphores.patch
index b29040591e..a86f757420 100644
--- a/Ports/qt6-qtbase/patches/0002-Disable-shared-memory-and-semaphores.patch
+++ b/Ports/qt6-qtbase/patches/0002-Disable-shared-memory-and-semaphores.patch
@@ -11,7 +11,7 @@ It's probably not done in the cleanest way but it works
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/mkspecs/serenity-g++/qplatformdefs.h b/mkspecs/serenity-g++/qplatformdefs.h
-index 1f0dd98..65b641e 100644
+index 1f0dd9819abb1f8dac52250d24aa8d0763f05445..65b641e283a42cdc2bd6c63c1750b46e0b33ab02 100644
--- a/mkspecs/serenity-g++/qplatformdefs.h
+++ b/mkspecs/serenity-g++/qplatformdefs.h
@@ -43,6 +43,9 @@
@@ -25,10 +25,10 @@ index 1f0dd98..65b641e 100644
// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
diff --git a/src/corelib/kernel/qsharedmemory_p.h b/src/corelib/kernel/qsharedmemory_p.h
-index e06e7e8..7292782 100644
+index 57dcb2cb93eaacf905c585c3fd24a4c9ed07418b..fefcdc9d159163f34642c1b856cf992e93d234bb 100644
--- a/src/corelib/kernel/qsharedmemory_p.h
+++ b/src/corelib/kernel/qsharedmemory_p.h
-@@ -51,6 +51,7 @@
+@@ -15,6 +15,7 @@
// We mean it.
//
@@ -36,7 +36,7 @@ index e06e7e8..7292782 100644
#include "qsharedmemory.h"
#include <QtCore/qstring.h>
-@@ -78,7 +79,7 @@ QT_END_NAMESPACE
+@@ -42,7 +43,7 @@ QT_END_NAMESPACE
# include "private/qobject_p.h"
#endif
@@ -46,10 +46,10 @@ index e06e7e8..7292782 100644
#endif
diff --git a/src/corelib/kernel/qsystemsemaphore_p.h b/src/corelib/kernel/qsystemsemaphore_p.h
-index 56619d7..56cf868 100644
+index 09fbcd2ed65a7f8e7bb9756c02209f0eb96ede44..7267c52b11a5c91e062ad20f357a627ae8888b81 100644
--- a/src/corelib/kernel/qsystemsemaphore_p.h
+++ b/src/corelib/kernel/qsystemsemaphore_p.h
-@@ -51,6 +51,7 @@
+@@ -15,6 +15,7 @@
// We mean it.
//
diff --git a/Ports/qt6-qtbase/patches/0003-Serenity-doesn-t-support-utimensat-and-UTIME_NOW.patch b/Ports/qt6-qtbase/patches/0003-Serenity-doesn-t-support-utimensat-and-UTIME_NOW.patch
index c585450509..8cd6c65e90 100644
--- a/Ports/qt6-qtbase/patches/0003-Serenity-doesn-t-support-utimensat-and-UTIME_NOW.patch
+++ b/Ports/qt6-qtbase/patches/0003-Serenity-doesn-t-support-utimensat-and-UTIME_NOW.patch
@@ -8,10 +8,10 @@ Subject: [PATCH] Serenity doesn't support utimensat and UTIME_NOW
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qmake/library/ioutils.cpp b/qmake/library/ioutils.cpp
-index 719d3b5..5490e82 100644
+index 5a5c45526498f1c8b7ff84353c7d07bb5c1157da..98341c916d0da36a9f154569a23bb2fc0f6b8526 100644
--- a/qmake/library/ioutils.cpp
+++ b/qmake/library/ioutils.cpp
-@@ -262,7 +262,7 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF
+@@ -237,7 +237,7 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF
*errorString = fL1S("Cannot stat() reference file %1: %2.").arg(referenceFileName, fL1S(strerror(errno)));
return false;
}
diff --git a/Ports/qt6-qtbase/patches/0004-Hack-Force-searching-for-plugins-in-usr-local.patch b/Ports/qt6-qtbase/patches/0004-Hack-Force-searching-for-plugins-in-usr-local.patch
index 8771b1edb4..b98b0d64c7 100644
--- a/Ports/qt6-qtbase/patches/0004-Hack-Force-searching-for-plugins-in-usr-local.patch
+++ b/Ports/qt6-qtbase/patches/0004-Hack-Force-searching-for-plugins-in-usr-local.patch
@@ -11,10 +11,10 @@ whatever for now.
1 file changed, 6 insertions(+)
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
-index 009aa28..9c0cb52 100644
+index 4d69ca9a17d2e24911e92792062a0ab264b83758..527a8ee672d7416b7b915d33d6711e9a1aed2e46 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
-@@ -2760,6 +2760,12 @@ QStringList QCoreApplication::libraryPathsLocked()
+@@ -2746,6 +2746,12 @@ QStringList QCoreApplication::libraryPathsLocked()
}
#endif // Q_OS_DARWIN
diff --git a/Ports/qt6-qtbase/patches/0005-Disable-version-tagging.patch b/Ports/qt6-qtbase/patches/0005-Disable-version-tagging.patch
index 9f655fbb11..c6ecbcf0f0 100644
--- a/Ports/qt6-qtbase/patches/0005-Disable-version-tagging.patch
+++ b/Ports/qt6-qtbase/patches/0005-Disable-version-tagging.patch
@@ -11,10 +11,10 @@ and other related ELF objects
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
-index ed466b7..30668af 100644
+index df4c9d07f2984ea8ab02d54004335a2d4377f78b..d46017ddcc0c439bdae478f3dcb1e342fbf4083d 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
-@@ -327,6 +327,8 @@ elseif(WASM)
+@@ -328,6 +328,8 @@ elseif(WASM)
set(QT_DEFAULT_MKSPEC wasm-emscripten)
elseif(SERENITYOS)
set(QT_DEFAULT_MKSPEC serenity-g++)
@@ -24,15 +24,15 @@ index ed466b7..30668af 100644
# Certain POSIX defines are not set if we don't compile with -std=gnuXX
set(QT_ENABLE_CXX_EXTENSIONS ON)
diff --git a/src/corelib/global/qversiontagging.cpp b/src/corelib/global/qversiontagging.cpp
-index b5e524b..a7547a3 100644
+index a8191869cc87be91097e83dda3c6d2dcb566674f..fb129c8b3194ee0a34787545fcb022feaa870214 100644
--- a/src/corelib/global/qversiontagging.cpp
+++ b/src/corelib/global/qversiontagging.cpp
-@@ -42,7 +42,7 @@
- #define SYM QT_MANGLE_NAMESPACE(qt_version_tag)
- //#define SSYM QT_STRINGIFY(SYM)
+@@ -21,7 +21,7 @@ extern "C" {
+ //
+ // [1] https://sourceware.org/binutils/docs/as/Symver.html
--#if defined(Q_CC_GNU) && defined(Q_OF_ELF) && !defined(Q_OS_ANDROID)
-+#if defined(Q_CC_GNU) && defined(Q_OF_ELF) && !defined(Q_OS_ANDROID) && !defined(QT_NO_VERSION_TAGGING)
+-#if defined(Q_CC_GNU) && defined(Q_OF_ELF)
++#if defined(Q_CC_GNU) && defined(Q_OF_ELF) && !defined(QT_NO_VERSION_TAGGING)
# define make_versioned_symbol2(sym, m, n, separator) \
- Q_CORE_EXPORT extern const char sym ## _ ## m ## _ ## n = 0; \
+ Q_CORE_EXPORT extern __attribute__((alias("_" SSYM))) const char sym ## _ ## m ## _ ## n; \
asm(".symver " QT_STRINGIFY(sym) "_" QT_STRINGIFY(m) "_" QT_STRINGIFY(n) ", " \
diff --git a/Ports/qt6-qtbase/patches/0006-Serenity-Disable-local-domain-name-lookup-via-resolv.patch b/Ports/qt6-qtbase/patches/0006-Serenity-Disable-local-domain-name-lookup-via-resolv.patch
new file mode 100644
index 0000000000..f485c2c00f
--- /dev/null
+++ b/Ports/qt6-qtbase/patches/0006-Serenity-Disable-local-domain-name-lookup-via-resolv.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Andrew Kaster <akaster@serenityos.org>
+Date: Sat, 3 Dec 2022 09:08:11 -0700
+Subject: [PATCH] Serenity: Disable local domain name lookup via resolv
+
+Serenity doesn't support /etc/resolv.conf or the structures in
+<resolv.h> to do Unix-like domain name resolution.
+---
+ src/network/kernel/qhostinfo_unix.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
+index 12d8c04d104b56d3c8d77d338c6427604479003c..f03af1c2b24468fe3a8f5aee952c239128949b03 100644
+--- a/src/network/kernel/qhostinfo_unix.cpp
++++ b/src/network/kernel/qhostinfo_unix.cpp
+@@ -162,7 +162,7 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
+
+ QString QHostInfo::localDomainName()
+ {
+-#if !defined(Q_OS_VXWORKS) && !defined(Q_OS_ANDROID)
++#if !defined(Q_OS_VXWORKS) && !defined(Q_OS_ANDROID) && !defined(Q_OS_SERENITY)
+ resolveLibrary(NeedResNInit);
+ if (local_res_ninit) {
+ // using thread-safe version
diff --git a/Ports/qt6-qtbase/patches/ReadMe.md b/Ports/qt6-qtbase/patches/ReadMe.md
index 1588e770d0..3822b509d2 100644
--- a/Ports/qt6-qtbase/patches/ReadMe.md
+++ b/Ports/qt6-qtbase/patches/ReadMe.md
@@ -31,3 +31,10 @@ Disable version tagging
This is necessary because as of now, Serenity doesn't support DT_VERSYM
and other related ELF objects
+## `0006-Serenity-Disable-local-domain-name-lookup-via-resolv.patch`
+
+Serenity: Disable local domain name lookup via resolv
+
+Serenity doesn't support /etc/resolv.conf or the structures in
+<resolv.h> to do Unix-like domain name resolution.
+