summaryrefslogtreecommitdiffstats
path: root/patches/qt-everywhere-src-5.12.2/0106-HACK-qtwebengine-workaround-for-too-long-file-names.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/qt-everywhere-src-5.12.2/0106-HACK-qtwebengine-workaround-for-too-long-file-names.patch')
-rw-r--r--patches/qt-everywhere-src-5.12.2/0106-HACK-qtwebengine-workaround-for-too-long-file-names.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/qt-everywhere-src-5.12.2/0106-HACK-qtwebengine-workaround-for-too-long-file-names.patch b/patches/qt-everywhere-src-5.12.2/0106-HACK-qtwebengine-workaround-for-too-long-file-names.patch
new file mode 100644
index 000000000..bef3dfc2f
--- /dev/null
+++ b/patches/qt-everywhere-src-5.12.2/0106-HACK-qtwebengine-workaround-for-too-long-file-names.patch
@@ -0,0 +1,39 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 7 Nov 2017 10:20:09 +0100
+Subject: [PATCH] HACK: qtwebengine: workaround for too long file names
+
+Without this building fails with:
+ninja: error: WriteFile(__third_party_WebKit_Source_bindings_modules_v8_bindings_modules_v8_generated_init_partial__XXX_path_to_the_bsp_platform_XX_build-target_qt-everywhere-opensource-src-5.9.2-build_qtwebengine_src_toolchain_target__rule.rsp): Unable to create file. File name too long
+
+Hack taken from the upstream bugreport:
+https://bugreports.qt.io/browse/QTBUG-59769
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+---
+ .../src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc b/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc
+index 7e945c0de0ed..cd98df3c5657 100644
+--- a/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc
++++ b/qtwebengine/src/3rdparty/gn/tools/gn/ninja_action_target_writer.cc
+@@ -118,9 +118,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.