Skip to content

[qt] Add Qt 6.8.2 #26490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions recipes/qt/6.x.x/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
sources:
"6.8.2":
url:
- "https://download.qt.io/official_releases/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://download.qt.io/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirrors.20i.com/pub/qt.io/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://qt-mirror.dannhauer.de/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://ftp.fau.de/qtproject/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirrors.dotsrc.org/qtproject/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirror.accum.se/mirror/qt.io/qtproject/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://qt.mirror.constant.com/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirrors.cloud.tencent.com/qt/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirrors.sau.edu.cn/qt/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirror.bjtu.edu.cn/qt/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
- "https://mirror.aarnet.edu.au/pub/qtproject/archive/qt/6.8/6.8.2/single/qt-everywhere-src-6.8.2.tar.xz"
sha256: "659d8bb5931afac9ed5d89a78e868e6bd00465a58ab566e2123db02d674be559"
"6.7.3":
url:
- "https://download.qt.io/official_releases/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz"
Expand Down Expand Up @@ -65,6 +84,12 @@ sources:
- "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz"
sha256: "7cda4d119aad27a3887329cfc285f2aba5da85601212bcb0aea27bd6b7b544cb"
patches:
"6.8.2":
- "base_path": "qtwebengine/src/3rdparty"
"patch_description": "Workaround for too long .rps file name"
"patch_file": "patches/c72097e_6.8.diff"
"patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172"
"patch_type": "bugfix"
"6.7.3":
- "base_path": "qtwebengine"
"patch_description": "Workaround for too long .rps file name"
Expand Down
30 changes: 28 additions & 2 deletions recipes/qt/6.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class QtConan(ConanFile):
"with_md4c": [True, False],
"with_x11": [True, False],
"with_egl": [True, False],
"with_wmf": [True, False],

"gui": [True, False],
"widgets": [True, False],
Expand Down Expand Up @@ -112,6 +113,7 @@ class QtConan(ConanFile):
"with_md4c": True,
"with_x11": True,
"with_egl": False,
"with_wmf": False,

"gui": True,
"widgets": True,
Expand Down Expand Up @@ -175,6 +177,10 @@ def config_options(self):
if self.settings.os == "Windows":
self.options.opengl = "dynamic"
del self.options.with_gssapi
del self.options.with_gstreamer
else:
del self.options.with_wmf

if self.settings.os != "Linux":
self.options.qtwayland = False

Expand Down Expand Up @@ -246,8 +252,9 @@ def configure(self):
if not self.options.get_safe("qtmultimedia"):
self.options.rm_safe("with_libalsa")
del self.options.with_openal
del self.options.with_gstreamer
del self.options.with_pulseaudio
self.options.rm_safe("with_gstreamer")
self.options.rm_safe("with_wmf")

if self.settings.os in ("FreeBSD", "Linux"):
if self.options.get_safe("qtwebengine"):
Expand Down Expand Up @@ -652,6 +659,11 @@ def generate(self):
tc.variables["QT_USE_VCPKG"] = False
tc.cache_variables["QT_USE_VCPKG"] = False

if self.settings.get_safe("with_gstreamer", False):
tc.variables["QT_DEFAULT_MEDIA_BACKEND"] = "gstreamer"
elif self.settings.get_safe("with_wmf", False):
tc.variables["QT_DEFAULT_MEDIA_BACKEND"] = "windows"

tc.generate()

def package_id(self):
Expand Down Expand Up @@ -1140,6 +1152,16 @@ def _create_plugin(pluginname, libname, plugintype, requires):
"advapi32", "dwmapi", "gdi32", "imm32", "ole32", "oleaut32", "setupapi", "shell32", "shlwapi",
"user32", "winmm", "winspool", "wtsapi32", "shcore", "comdlg32", "d3d9", "runtimeobject"
]
# https://github.com/qt/qtbase/blob/v6.8.2/src/plugins/platforms/windows/CMakeLists.txt#L202
if Version(self.version) >= "6.8.2":
self.cpp_info.components["qtQWindowsIntegrationPlugin"].system_libs += ["uiautomationcore"]
# https://github.com/qt/qtmultimedia/blob/v6.8.2/src/plugins/multimedia/windows/CMakeLists.txt#L48
# https://github.com/qt/qtmultimedia/blob/v6.8.2/cmake/FindWMF.cmake#L21
self.cpp_info.components["QWindowsMediaPlugin"].system_libs += [
"amstrmid", "d3d9", "dmoguids", "dxva2", "evr", "gdi32", "ksuser", "mf", "mfcore", "mfplat",
"mfreadwrite", "mfuuid", "msdmo", "ole32", "oleaut32", "propsys", "shlwapi", "strmiids",
"user32", "uuid", "winmm", "wmcodecdspuuid"
]
elif self.settings.os == "Android":
_create_plugin("QAndroidIntegrationPlugin", "qtforandroid", "platforms", ["Core", "Gui"])
# https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/android/CMakeLists.txt#L68-L70
Expand All @@ -1161,6 +1183,8 @@ def _create_plugin(pluginname, libname, plugintype, requires):
if self.settings.os in ["Macos", "iOS"]:
# https://github.com/qt/qtbase/blob/v6.5.3/src/gui/CMakeLists.txt#L963
self.cpp_info.components["qtGui"].frameworks.append("Metal")
if Version(self.version) >= "6.8.0":
self.cpp_info.components["qtCore"].frameworks = [ "UniformTypeIdentifiers" ]
if self.settings.os in ["iOS", "tvOS"]:
_create_plugin("QIOSIntegrationPlugin", "qios", "platforms", [])
# https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/ios/CMakeLists.txt#L32-L37
Expand Down Expand Up @@ -1354,10 +1378,12 @@ def _create_plugin(pluginname, libname, plugintype, requires):
_create_module("MultimediaWidgets", ["Multimedia", "Widgets", "Gui"])
if self.options.qtdeclarative and qt_quick_enabled:
_create_module("MultimediaQuick", ["Multimedia", "Quick"])
if self.options.with_gstreamer:
if self.options.get_safe("with_gstreamer", False):
_create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", [
"gstreamer::gstreamer",
"gst-plugins-base::gst-plugins-base"])
elif self.options.get_safe("with_wmf", False):
_create_plugin("QWindowsMediaPlugin", "windowsmediaplugin", "multimedia", [])

if self.options.get_safe("qtpositioning"):
_create_module("Positioning", [])
Expand Down
36 changes: 36 additions & 0 deletions recipes/qt/6.x.x/patches/c72097e_6.8.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
commit 1e904d94557f68b95b32f7f9da079432c16e9dff
Author: Martin Delille <[email protected]>
Date: Fri Jan 31 10:48:50 2025 +0100

[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

diff --git a/gn/src/gn/ninja_action_target_writer.cc b/gn/src/gn/ninja_action_target_writer.cc
index 06da2447760..a646ed90b6f 100644
--- a/gn/src/gn/ninja_action_target_writer.cc
+++ b/gn/src/gn/ninja_action_target_writer.cc
@@ -151,6 +151,14 @@ 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";
Loading