From 856d5d9042d469ffe622bb0f526fe4c6790c2a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 5 Jun 2020 22:42:15 +0200 Subject: [PATCH] qtwayland-native/qtwaylandscanner: remove full path comment from generated files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since Qt 5.15 qtwaylandscanner adds the source-xml-file which can be in sysroot. That triggers our cmake_extra_sanity.bbclass. So remove comment - we did not miss it in Qt < 5.15. Signed-off-by: Andreas Müller --- extends-meta-qt5/qtwayland_git.bbappend | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 extends-meta-qt5/qtwayland_git.bbappend diff --git a/extends-meta-qt5/qtwayland_git.bbappend b/extends-meta-qt5/qtwayland_git.bbappend new file mode 100644 index 00000000..78099ba0 --- /dev/null +++ b/extends-meta-qt5/qtwayland_git.bbappend @@ -0,0 +1,16 @@ +# Since Qt5.15 qtwaylandscanner creates a comment as: + +# // source file is /home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-mortsgna-linux-gnueabi/kwayland/5.70.0-r0/recipe-sysroot/usr/share/wayland-protocols/unstable/tablet/tablet-unstable-v2.xml + +# which triggers our make_extra_sanity.bbclass. +# To be compatible with Qt5.14 (dunfell) and >= Qt5.15 (current master) we do +# some sed instead of patching. +do_patch_append_class-native() { + bb.build.exec_func('do_fix_qtwaylandscanner_cpp', d) +} + +do_fix_qtwaylandscanner_cpp () { + if [ -f ${S}/src/qtwaylandscanner/qtwaylandscanner.cpp ]; then + sed -i 's:printf("// source file is://printf("// source file is:' ${S}/src/qtwaylandscanner/qtwaylandscanner.cpp + fi +}