qt6-qbase: add fixes and patches to build on illumos
authorNiclas Rosenvik <youremailsarecrap@gmail.com>
Tue, 25 Oct 2022 12:48:14 +0000 (12:48 +0000)
committerNiclas Rosenvik <youremailsarecrap@gmail.com>
Tue, 25 Oct 2022 12:48:22 +0000 (12:48 +0000)
qt6-qtbase/Makefile.common
qt6-qtbase/distinfo
qt6-qtbase/patches/patch-src_corelib_global_qlogging.cpp [new file with mode: 0644]
qt6-qtbase/patches/patch-src_corelib_global_qversiontagging.h [new file with mode: 0644]

index 10c4429a25c2c77529fb0dfd4a93d9df14dd72c0..302560faa2bc312bd0065c2a4c46aef127b92969 100644 (file)
@@ -43,6 +43,9 @@ CXXFLAGS+=            -Wno-register
 # wcstof(3) etc. is used in C++ code.
 CFLAGS.NetBSD+=                -D_NETBSD_SOURCE
 
+# ld: undefined symbol qt_version_tag
+CFLAGS.SunOS+=         -DQT_NO_VERSION_TAGGING
+
 # include/openssl/e_os2.h:283:25: error: '_Noreturn' does not name a type
 CXXFLAGS.SunOS+=       -D_Noreturn=""
 
index d26d1b8624498fb761aad78ba52b1f5ab33c9662..eea445872e4f7e20bbd37c66679f888b6bd59a8b 100644 (file)
@@ -12,6 +12,8 @@ SHA1 (patch-mkspecs_features_toolchain.prf) = 0cf13cb6e859dd6276954239b91953e557
 SHA1 (patch-qmake_generators_makefile.cpp) = 1bca636dc88f258876df54bd0c6c64114fa7411d
 SHA1 (patch-qmake_generators_unix_unixmake2.cpp) = 6ea4efd2ce88d7cf3c73e1dc2cdf984fe3b6af04
 SHA1 (patch-src_corelib_global_qglobal.cpp) = 6368692c2d5d64633d956a89c6b4607667c121a7
+SHA1 (patch-src_corelib_global_qlogging.cpp) = 34b4e80ed80a001de8df6278ee797244a2f9b595
+SHA1 (patch-src_corelib_global_qversiontagging.h) = 7a91e19fe1eb9a5b97edb6be3a7bcbf6405b3eb8
 SHA1 (patch-src_corelib_io_qstandardpaths_unix.cpp) = b12a41da19b25e34e12fdf80714a37e8c46278f9
 SHA1 (patch-src_corelib_io_qstorageinfo_unix.cpp) = 9919194e9f6b47f1f311b8f8223a6a7519152073
 SHA1 (patch-src_corelib_plugin_qelfparser__p.cpp) = 2a8c7b052472afaeb3b0e797625615072e1b4abf
diff --git a/qt6-qtbase/patches/patch-src_corelib_global_qlogging.cpp b/qt6-qtbase/patches/patch-src_corelib_global_qlogging.cpp
new file mode 100644 (file)
index 0000000..281a4e8
--- /dev/null
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* https://bugreports.qt.io/browse/QTBUG-106980
+  fixes build on SunOS, fixed in 6.4.1
+
+--- src/corelib/global/qlogging.cpp.orig       2022-09-19 10:23:04.000000000 +0000
++++ src/corelib/global/qlogging.cpp
+@@ -1302,7 +1302,7 @@ static QStringList backtraceFramesForLog
+     // use dladdr() instead of backtrace_symbols()
+     QString cachedLibrary;
+     const char *cachedFname = nullptr;
+-    auto decodeFrame = [&](const void *addr) -> DecodedFrame {
++    auto decodeFrame = [&](void *addr) -> DecodedFrame {
+         Dl_info info;
+         if (!dladdr(addr, &info))
+             return {};
diff --git a/qt6-qtbase/patches/patch-src_corelib_global_qversiontagging.h b/qt6-qtbase/patches/patch-src_corelib_global_qversiontagging.h
new file mode 100644 (file)
index 0000000..45d129b
--- /dev/null
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* remove redefine warnings when QT_NO_VERSION_TAGGING is defined
+
+--- src/corelib/global/qversiontagging.h.orig  2022-10-23 21:39:46.764900043 +0000
++++ src/corelib/global/qversiontagging.h
+@@ -73,7 +73,7 @@ struct QVersionTag
+ };
+ }
+-#if defined(QT_BUILD_CORE_LIB) || defined(QT_BOOTSTRAPPED) || defined(QT_STATIC)
++#if !defined(QT_NO_VERSION_TAGGING) && (defined(QT_BUILD_CORE_LIB) || defined(QT_BOOTSTRAPPED) || defined(QT_STATIC))
+ // don't make tags in QtCore, bootstrapped systems or if the user asked not to
+ #  define QT_NO_VERSION_TAGGING
+ #endif