[DO-981] qt package (!15)

Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/15
This commit is contained in:
Aleksandr Vodyanov
2025-02-13 12:25:48 +03:00
parent 60445ac09e
commit 3759e1163f
228 changed files with 16106 additions and 12 deletions

View File

@@ -0,0 +1,28 @@
From b404930e122013e76ba8fe165f3432288c051438 Mon Sep 17 00:00:00 2001
From: shjiu <shanheng.jiu@qt.io>
Date: Fri, 17 Nov 2023 09:41:31 +0900
Subject: [PATCH] Fix build error with lambda on GCC 9.2
This patch is specific to the return type of updatePtrSimd function as boolean to avoid the bug of GCC 9.2.
Fixes: QTBUG-112920
Pick-to: 6.7 6.6 6.5
Change-Id: I21cb1f6dda34448b2290ab72ec280b6b2a3732c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
---
src/corelib/text/qstring.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 2dc415584f3..d9e89f8e5bb 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -471,7 +471,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
if constexpr (UseSse4_1) {
# ifndef Q_OS_QNX // compiler fails in the code below
__m128i mask;
- auto updatePtrSimd = [&](__m128i data) {
+ auto updatePtrSimd = [&](__m128i data) -> bool {
__m128i masked = _mm_and_si128(mask, data);
__m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
uint result = _mm_movemask_epi8(comparison);

View File

@@ -0,0 +1,28 @@
From b404930e122013e76ba8fe165f3432288c051438 Mon Sep 17 00:00:00 2001
From: shjiu <shanheng.jiu@qt.io>
Date: Fri, 17 Nov 2023 09:41:31 +0900
Subject: [PATCH] Fix build error with lambda on GCC 9.2
This patch is specific to the return type of updatePtrSimd function as boolean to avoid the bug of GCC 9.2.
Fixes: QTBUG-112920
Pick-to: 6.7 6.6 6.5
Change-Id: I21cb1f6dda34448b2290ab72ec280b6b2a3732c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
---
src/corelib/text/qstring.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 2dc415584f3..d9e89f8e5bb 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -461,7 +461,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
if constexpr (UseSse4_1) {
# ifndef Q_OS_QNX // compiler fails in the code below
__m128i mask;
- auto updatePtrSimd = [&](__m128i data) {
+ auto updatePtrSimd = [&](__m128i data) -> bool {
__m128i masked = _mm_and_si128(mask, data);
__m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
uint result = _mm_movemask_epi8(comparison);

View File

@@ -0,0 +1,42 @@
From c72097e8790553771daf3231124c3fbe1a438379 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Thu, 30 Mar 2017 11:37:24 +0300
Subject: [PATCH] chromium: workaround for too long .rps file name
Ninja may fail when the build directory is too long:
ninja: error: WriteFile(__third_party_WebKit_Source_bindings_modules_\
interfaces_info_individual_modules__home_qt_work_build_build-nitrogen\
6x_tmp_work_cortexa9hf-neon-mx6qdl-poky-linux-gnueabi_qtwebengine_5.9\
.0_gitAUTOINC_29afdb0a34_049134677a-r0_build_src_toolchain_target__ru\
le.rsp): Unable to create file. File name too long
Task-number: QTBUG-59769
Change-Id: I73c5e64ae5174412be2a675e35b0b6047f2bf4c1
---
src/3rdparty/gn/src/gn/ninja_action_target_writer.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/3rdparty/gn/src/gn/ninja_action_target_writer.cc b/src/3rdparty/gn/src/gn/ninja_action_target_writer.cc
index a5bc6cd..5cefbfe 100644
--- a/src/3rdparty/gn/src/gn/ninja_action_target_writer.cc
+++ b/src/3rdparty/gn/tosrcols/gn/ninja_action_target_writer.cc
@@ -122,9 +122,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() {
// strictly necessary for regular one-shot actions, but it's easier to
// just always define unique_name.
std::string rspfile = custom_rule_name;
+
+ //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end
+ //please note ".$unique_name" is not used at the moment
+ int pos = 0;
+ std::string delimiter("_");
+ while (rspfile.length() > 250 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos)
+ rspfile = rspfile.substr(0,pos);
+
if (!target_->sources().empty())
rspfile += ".$unique_name";
rspfile += ".rsp";
+
out_ << " rspfile = " << rspfile << std::endl;
// Response file contents.

View File

@@ -0,0 +1,42 @@
From c72097e8790553771daf3231124c3fbe1a438379 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Thu, 30 Mar 2017 11:37:24 +0300
Subject: [PATCH] chromium: workaround for too long .rps file name
Ninja may fail when the build directory is too long:
ninja: error: WriteFile(__third_party_WebKit_Source_bindings_modules_\
interfaces_info_individual_modules__home_qt_work_build_build-nitrogen\
6x_tmp_work_cortexa9hf-neon-mx6qdl-poky-linux-gnueabi_qtwebengine_5.9\
.0_gitAUTOINC_29afdb0a34_049134677a-r0_build_src_toolchain_target__ru\
le.rsp): Unable to create file. File name too long
Task-number: QTBUG-59769
Change-Id: I73c5e64ae5174412be2a675e35b0b6047f2bf4c1
---
src/3rdparty/gn/src/gn/ninja_action_target_writer.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/3rdparty/gn/src/gn/ninja_action_target_writer.cc b/src/3rdparty/gn/src/gn/ninja_action_target_writer.cc
index a5bc6cd..5cefbfe 100644
--- a/src/3rdparty/gn/src/gn/ninja_action_target_writer.cc
+++ b/src/3rdparty/gn/tosrcols/gn/ninja_action_target_writer.cc
@@ -125,9 +125,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() {
// strictly necessary for regular one-shot actions, but it's easier to
// just always define unique_name.
std::string rspfile = custom_rule_name;
+
+ //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end
+ //please note ".$unique_name" is not used at the moment
+ int pos = 0;
+ std::string delimiter("_");
+ while (rspfile.length() > 250 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos)
+ rspfile = rspfile.substr(0,pos);
+
if (!target_->sources().empty())
rspfile += ".$unique_name";
rspfile += ".rsp";
+
out_ << " rspfile = " << rspfile << std::endl;
// Response file contents.

View File

@@ -0,0 +1,26 @@
From d13958dabb9f5542d772c6312cd33e4960bf1137 Mon Sep 17 00:00:00 2001
From: Eric Lemanissier <eric.lemanissier@gmail.com>
Date: Tue, 29 Nov 2022 09:15:58 +0000
Subject: [PATCH] fix pcre2 detection
Pick-to: 6.3
Change-Id: I89f167e11bf1c72c9fae474ddd12380636ac5df8
---
diff --git a/cmake/FindWrapSystemPCRE2.cmake b/cmake/FindWrapSystemPCRE2.cmake
index f8516d3..3ac04b8 100644
--- a/cmake/FindWrapSystemPCRE2.cmake
+++ b/cmake/FindWrapSystemPCRE2.cmake
@@ -6,11 +6,7 @@
find_package(PCRE2 ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} COMPONENTS 16BIT QUIET)
-# TODO: pcre2-16 is not the target name provided by the upstream Config file. It is PCRE2::16BIT.
-# https://github.com/PCRE2Project/pcre2/blob/2410fbe3869cab403f02b94caa9ab37ee9f5854b/cmake/pcre2-config.cmake.in#L122
-# We don't strictly need to handle that though, because the pkg-config code path below still
-# finds the correct libraries.
-set(__pcre2_target_name "PCRE2::pcre2-16")
+set(__pcre2_target_name "PCRE2::16BIT")
if(PCRE2_FOUND AND TARGET "${__pcre2_target_name}")
# Hunter case.
set(__pcre2_found TRUE)

View File

@@ -0,0 +1,16 @@
--- a/src/tools/syncqt/main.cpp
+++ b/src/tools/syncqt/main.cpp
@@ -851,12 +851,7 @@
bool headerFileExists = std::filesystem::exists(headerFile);
- std::filesystem::path headerFileRootName =
- std::filesystem::weakly_canonical(headerFile, ec).root_name();
- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName
- ? std::filesystem::relative(headerFile, outputDir).generic_string()
- : headerFile.generic_string();
- ec.clear();
+ std::string aliasedFilepath = headerFile.generic_string();
std::string aliasPath = outputDir + '/' + m_currentFilename;

View File

@@ -0,0 +1,16 @@
--- a/src/tools/syncqt/main.cpp
+++ b/src/tools/syncqt/main.cpp
@@ -875,12 +875,7 @@
bool headerFileExists = std::filesystem::exists(headerFile);
- std::filesystem::path headerFileRootName =
- std::filesystem::weakly_canonical(headerFile, ec).root_name();
- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName
- ? std::filesystem::relative(headerFile, outputDir).generic_string()
- : headerFile.generic_string();
- ec.clear();
+ std::string aliasedFilepath = headerFile.generic_string();
std::string aliasPath = outputDir + '/' + m_currentFilename;

View File

@@ -0,0 +1,16 @@
--- a/src/tools/syncqt/main.cpp
+++ b/src/tools/syncqt/main.cpp
@@ -866,12 +866,7 @@
bool headerFileExists = std::filesystem::exists(headerFile);
- std::filesystem::path headerFileRootName =
- std::filesystem::weakly_canonical(headerFile, ec).root_name();
- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName
- ? std::filesystem::relative(headerFile, outputDir).generic_string()
- : headerFile.generic_string();
- ec.clear();
+ std::string aliasedFilepath = headerFile.generic_string();
std::string aliasPath = outputDir + '/' + m_currentFilename;

View File

@@ -0,0 +1,45 @@
From 0efea8020c1d221635aaa0a71529edb392cfe3cc Mon Sep 17 00:00:00 2001
From: Joerg Bornemann <joerg.bornemann@qt.io>
Date: Mon, 11 Sep 2023 14:48:32 +0200
Subject: [PATCH] CMake: Fix build with CMake 3.28 on macOS
FindWrapOpenGL.cmake assumed that IMPORTED_LOCATION is the absolute path
of the library within the framework. That's not the case with CMake 3.28
anymore. There, IMPORTED_LOCATION is the absolute path of the framework
directory.
The relevant upstream CMake change is
6b01a27f901b5eb392955fea322cde44a1b782a3.
Pick-to: 6.2 6.5 6.6
Change-Id: I6b702a28318e0978c56dec83c398965aa77ef020
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
---
cmake/FindWrapOpenGL.cmake | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmake/FindWrapOpenGL.cmake b/cmake/FindWrapOpenGL.cmake
index 3e6abaf4dda..7295a159caf 100644
--- a/cmake/FindWrapOpenGL.cmake
+++ b/cmake/FindWrapOpenGL.cmake
@@ -14,14 +14,18 @@
add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED)
if(APPLE)
+ # CMake 3.27 and older:
# On Darwin platforms FindOpenGL sets IMPORTED_LOCATION to the absolute path of the library
# within the framework. This ends up as an absolute path link flag, which we don't want,
# because that makes our .prl files un-relocatable.
# Extract the framework path instead, and use that in INTERFACE_LINK_LIBRARIES,
- # which CMake ends up transforming into a reloctable -framework flag.
+ # which CMake ends up transforming into a relocatable -framework flag.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/20871 for details.
+ #
+ # CMake 3.28 and above:
+ # IMPORTED_LOCATION is the absolute path the the OpenGL.framework folder.
get_target_property(__opengl_fw_lib_path OpenGL::GL IMPORTED_LOCATION)
- if(__opengl_fw_lib_path)
+ if(__opengl_fw_lib_path AND NOT __opengl_fw_lib_path MATCHES "/([^/]+)\\.framework$")
get_filename_component(__opengl_fw_path "${__opengl_fw_lib_path}" DIRECTORY)
endif()

View File

@@ -0,0 +1,15 @@
--- QtPriHelpers.cmake.original 2021-08-03 23:38:06.343653948 +0300
+++ QtPriHelpers.cmake 2021-08-03 23:26:24.483637483 +0300
@@ -30,7 +30,11 @@
if(lib_target_type STREQUAL "INTERFACE_LIBRARY")
get_target_property(iface_libs ${lib_target} INTERFACE_LINK_LIBRARIES)
if(iface_libs)
- list(PREPEND lib_targets ${iface_libs})
+ foreach (iface_lib ${iface_libs})
+ if (NOT "${iface_lib}" STREQUAL "${lib_target}")
+ list(PREPEND lib_targets ${iface_lib})
+ endif ()
+ endforeach ()
endif()
else()
list(APPEND lib_libs "$<TARGET_LINKER_FILE:${lib_target}>")