diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2023-04-08 20:57:06 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2023-04-08 14:25:30 -0700 |
commit | 625b29f507343025dd957804f56f77c78fd9f721 (patch) | |
tree | 52d30a9ca865a8cbe2798420444861c6b39befc6 /Ports | |
parent | 401946947c4037125820e6ad1e383bb86ea9f5bd (diff) | |
download | serenity-625b29f507343025dd957804f56f77c78fd9f721.zip |
Ports: Repair qt6-qtbase by disabling QDnsLookup
Diffstat (limited to 'Ports')
4 files changed, 61 insertions, 3 deletions
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 b207684e18..10da2fa82f 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 @@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..3808b5a269788a32d4aa74aa629b519d +load(qt_config) diff --git a/mkspecs/serenity-g++/qplatformdefs.h b/mkspecs/serenity-g++/qplatformdefs.h new file mode 100644 -index 0000000000000000000000000000000000000000..1f0dd9819abb1f8dac52250d24aa8d0763f05445 +index 0000000000000000000000000000000000000000..ff6bd088c99a77689733af03858950fab1cf6284 --- /dev/null +++ b/mkspecs/serenity-g++/qplatformdefs.h @@ -0,0 +1,87 @@ @@ -148,7 +148,7 @@ index 0000000000000000000000000000000000000000..1f0dd9819abb1f8dac52250d24aa8d07 +#endif + +#include <langinfo.h> -+#include <sys/ioctl_numbers.h> ++#include <sys/ioctl.h> + +#endif // QPLATFORMDEFS_H diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h 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 a86f757420..aea36bbc43 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 1f0dd9819abb1f8dac52250d24aa8d0763f05445..65b641e283a42cdc2bd6c63c1750b46e0b33ab02 100644 +index ff6bd088c99a77689733af03858950fab1cf6284..c39b40670b45aa853b6678835ef2d46564ba9506 100644 --- a/mkspecs/serenity-g++/qplatformdefs.h +++ b/mkspecs/serenity-g++/qplatformdefs.h @@ -43,6 +43,9 @@ diff --git a/Ports/qt6-qtbase/patches/0007-Disable-QDnsLookup-entirely.patch b/Ports/qt6-qtbase/patches/0007-Disable-QDnsLookup-entirely.patch new file mode 100644 index 0000000000..1d30ae12c2 --- /dev/null +++ b/Ports/qt6-qtbase/patches/0007-Disable-QDnsLookup-entirely.patch @@ -0,0 +1,50 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Wiederhake <BenWiederhake.GitHub@gmx.de> +Date: Sat, 8 Apr 2023 20:53:52 +0200 +Subject: [PATCH] Disable QDnsLookup entirely + +It seems that we used to include the host's system headers, which we no +longer do. Now this feature breaks the package, which is why we have to +disable it in order to build Qt6. +--- + src/network/kernel/qdnslookup_unix.cpp | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp +index 75f7c6c440e880b93530d2c38fed34a0c143f885..42aaba2699b3feb8e1624db633a792c3168a087f 100644 +--- a/src/network/kernel/qdnslookup_unix.cpp ++++ b/src/network/kernel/qdnslookup_unix.cpp +@@ -13,6 +13,11 @@ + + #include <sys/types.h> + #include <netinet/in.h> ++ ++#if 0 ++// FIXME: arpa/nameser.h is not part of Serenity. So either we just disable the feature wholesale, ++// or use the host headers (e.g. libc6-dev), but these often don't work either. ++ + #include <arpa/nameser.h> + #if !defined(Q_OS_OPENBSD) + # include <arpa/nameser_compat.h> +@@ -385,3 +390,21 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN + #endif /* QT_CONFIG(library) */ + + QT_END_NAMESPACE ++ ++#endif ++ ++QT_BEGIN_NAMESPACE ++ ++using namespace Qt::StringLiterals; ++ ++void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestName, const QHostAddress &nameserver, QDnsLookupReply *reply) ++{ ++ Q_UNUSED(requestType); ++ Q_UNUSED(requestName); ++ Q_UNUSED(nameserver); ++ reply->error = QDnsLookup::ResolverError; ++ reply->errorString = tr("Resolver library can't be loaded: No runtime library loading support"); ++ return; ++} ++ ++QT_END_NAMESPACE diff --git a/Ports/qt6-qtbase/patches/ReadMe.md b/Ports/qt6-qtbase/patches/ReadMe.md index 3822b509d2..bf4ea34944 100644 --- a/Ports/qt6-qtbase/patches/ReadMe.md +++ b/Ports/qt6-qtbase/patches/ReadMe.md @@ -38,3 +38,11 @@ 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. +## `0007-Disable-QDnsLookup-entirely.patch` + +Disable QDnsLookup entirely + +It seems that we used to include the host's system headers, which we no +longer do. Now this feature breaks the package, which is why we have to +disable it in order to build Qt6. + |