From a4f9c5691b8b7295fc06e548aee0413b38eee711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 6 Sep 2022 00:42:44 +0200 Subject: [PATCH] kwin: Fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * separate out native build of qtwaylandscanner_kde * hack cmake_extra_sanity.bbclass happy Signed-off-by: Andreas Müller --- recipes-kde/plasma/untier/kwin/kwin.bb | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/recipes-kde/plasma/untier/kwin/kwin.bb b/recipes-kde/plasma/untier/kwin/kwin.bb index 05f3809f..d397cab3 100644 --- a/recipes-kde/plasma/untier/kwin/kwin.bb +++ b/recipes-kde/plasma/untier/kwin/kwin.bb @@ -15,6 +15,25 @@ LIC_FILES_CHKSUM = " \ REQUIRED_DISTRO_FEATURES:class-target = "x11" +# Bad hack to circumvent odd behavior on kwin build and to make +# cmake_extra_sanity.bbclass happy: +# * Files created by qtwaylandscanner have a comment with full path containing +# sysroot +# * qtwaylandscanner is run twice: during compile and install +# +# => we need a very specific sequence of appends: +# 1. build +# 2. adjust +# 3. check by cmake_extra_sanity.bbclass +inherit cmake_qt5 +do_install:append:class-target() { + cd ${B}/src/wayland + # Adjust comments to make cmake_extra_sanity.bbclass happy + for wayland_source in `grep -rl '// source file is ${STAGING_DIR_HOST}'`; do + sed -i 's:// source file is ${STAGING_DIR_HOST}:// source file is :g' "$wayland_source" + done +} + inherit kde-plasma features_check gettext DEPENDS:remove:class-native = "kwayland-native" @@ -72,7 +91,7 @@ OECMAKE_SOURCEPATH:class-native = "${S}/src/wayland/tools" EXTRA_OECMAKE:append:class-target = " \ -DKF5_HOST_TOOLING=${STAGING_LIBDIR_NATIVE}/cmake \ -DCMAKE_SYSROOT=${STAGING_DIR_NATIVE} \ - -DQTWAYLANDSCANNER_KDE_EXECUTABLE=${STAGING_LIBDIR_NATIVE}/qtwaylandscanner_kde \ + -DQTWAYLANDSCANNER_KDE_EXECUTABLE=${STAGING_BINDIR_NATIVE}/qtwaylandscanner_kde \ " do_install:class-native() {