commit: 90a8bb7672ce3f5625f53227b01a0a4c1d44e089
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Mar 26 14:40:26 2025 +0000
Commit: orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Mar 26 14:40:26 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=90a8bb76
dev-qt/qtbase: sync ::gentoo
Signed-off-by: orbea <orbea <AT> riseup.net>
dev-qt/qtbase/files/qtbase-6.8.2-cross.patch | 36 ++++++++++++++++++++++++++++
dev-qt/qtbase/qtbase-6.8.2-r2.ebuild | 2 ++
2 files changed, 38 insertions(+)
diff --git a/dev-qt/qtbase/files/qtbase-6.8.2-cross.patch
b/dev-qt/qtbase/files/qtbase-6.8.2-cross.patch
new file mode 100644
index 0000000..b597aa3
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.8.2-cross.patch
@@ -0,0 +1,36 @@
+When cross-compiling, CMake needs to find the build host's Qt6CoreTools. It
+therefore prepends QT_HOST_PATH, which is /usr, to CMAKE_FIND_ROOT_PATH. The
+problem is that CMAKE_FIND_ROOT_PATH is only a hint, not a definitive
+location. Just below, CMake's find_package is usually told to look in
+/usr/${CHOST}/usr/lib/cmake and /usr/lib/cmake when cross-compiling. Since
+both of these are under /usr, it chooses the former instead of the latter.
+It then ends up trying to execute non-native Qt binaries.
+
+We can avoid this problem by setting CMAKE_FIND_ROOT_PATH to a more precise
+location. All the Qt6 modules are installed under /usr/lib/cmake, represented
+by the __qt_find_package_host_qt_path variable, so we can point it there.
+
+find_package has two modes, module mode and config mode. No mode is
+explicitly chosen in this case, so it tries both. In module mode, it would
+use a module called FindQt6*.cmake, but no such module exists. It is
+therefore safe to assume config mode, which involves the files under
+/usr/lib/cmake.
+
+See the isSameDirectoryOrSubDirectory() call in CMake's
+cmFindCommon::RerootPaths() function for exactly where this goes wrong.
+
+Chewi
+
+https://bugs.gentoo.org/950314
+
+--- a/cmake/QtConfig.cmake.in
++++ b/cmake/QtConfig.cmake.in
+@@ -131,7 +131,7 @@
+ set(__qt_backup_cmake_find_root_path "${CMAKE_FIND_ROOT_PATH}")
+ list(PREPEND CMAKE_PREFIX_PATH "${__qt_find_package_host_qt_path}"
+ ${_qt_additional_host_packages_prefix_paths})
+- list(PREPEND CMAKE_FIND_ROOT_PATH "${QT_HOST_PATH}"
++ list(PREPEND CMAKE_FIND_ROOT_PATH "${__qt_find_package_host_qt_path}"
+ ${_qt_additional_host_packages_root_paths})
+ endif()
+
diff --git a/dev-qt/qtbase/qtbase-6.8.2-r2.ebuild
b/dev-qt/qtbase/qtbase-6.8.2-r2.ebuild
index 51b2905..629caaf 100644
--- a/dev-qt/qtbase/qtbase-6.8.2-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.8.2-r2.ebuild
@@ -147,6 +147,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
"${FILESDIR}"/${PN}-6.8.0-qcontiguouscache.patch
+ "${FILESDIR}"/${PN}-6.8.2-cross.patch
"${FILESDIR}"/${P}-QTBUG-133500.patch
"${FILESDIR}"/${P}-QTBUG-133808.patch
)
@@ -374,6 +375,7 @@ src_install() {
)
local delete=( # sigh
"${D}${QT6_BINDIR}"/test*
+ "${D}${QT6_LIBDIR}/objects-${CMAKE_BUILD_TYPE}"/*test*
"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
)
# using -f given not tracking which tests may be skipped or not