From 6301203a0c6e32bc8d644596ae5b5a7e987b6da7 Mon Sep 17 00:00:00 2001 From: Andreas Cord-Landwehr Date: Thu, 14 Apr 2022 11:30:19 +0200 Subject: [PATCH] Port to new desktoptojson crosscompilation behavior --- classes/kcoreaddons.bbclass | 14 +++++++------- recipes-kf5/obsolete/kdelibs4support.inc | 12 +++++------- recipes-kf5/tier3/ktexteditor.inc | 11 ++++++----- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/classes/kcoreaddons.bbclass b/classes/kcoreaddons.bbclass index 790cf17..f3efca1 100644 --- a/classes/kcoreaddons.bbclass +++ b/classes/kcoreaddons.bbclass @@ -1,17 +1,17 @@ # Class for recipes using kcoreaddons host tools # # SPDX-FileCopyrightText: 2019 Volker Krause +# SPDX-FileCopyrightText: 2022 Andreas Cord-Landwehr # # SPDX-License-Identifier: MIT -do_compile:prepend() { - # desktoptojson needs to find installed service type files - export XDG_DATA_DIRS=${STAGING_DATADIR}:$XDG_DATA_DIRS -} - -DEPENDS += " \ +DEPENDS:append = " \ kcoreaddons \ kcoreaddons-native \ " -EXTRA_OECMAKE += " -DKF5_HOST_TOOLING=${STAGING_DIR_NATIVE}/${libdir}/cmake" +# for crosscompilation desktoptojson uses CMAKE_SYSROOT as root path for locating files +EXTRA_OECMAKE:append = " \ + -DKF5_HOST_TOOLING=${STAGING_DIR_NATIVE}/${libdir}/cmake \ + -DCMAKE_SYSROOT=${RECIPE_SYSROOT} \ +" diff --git a/recipes-kf5/obsolete/kdelibs4support.inc b/recipes-kf5/obsolete/kdelibs4support.inc index b0d987b..77cd8d1 100644 --- a/recipes-kf5/obsolete/kdelibs4support.inc +++ b/recipes-kf5/obsolete/kdelibs4support.inc @@ -20,7 +20,6 @@ DEPENDS = " \ kglobalaccel \ kiconthemes \ kio \ - kcoreaddons-native \ kconfig-native \ kauth-native \ knotifications \ @@ -30,18 +29,17 @@ DEPENDS = " \ openssl \ " -EXTRA_OECMAKE:class-target += " -DHAVE_GOOD_GETADDRINFO=ON" +EXTRA_OECMAKE:append:class-target = " \ + -DHAVE_GOOD_GETADDRINFO=ON \ + -DKSERVICETYPE_PATH_kdedmodule.desktop=${STAGING_DATADIR} \ +" require kdelibs4support_metainfo.inc inherit cmake_kf5 inherit ki18n inherit perlnative inherit kdoctools - -do_compile:prepend() { - # desktoptojson needs to find installed service type files - export XDG_DATA_DIRS=${STAGING_DATADIR}:$XDG_DATA_DIRS -} +inherit kcoreaddons do_install:append:class-target() { rm -rf ${D}${libdir}/plugins/designer diff --git a/recipes-kf5/tier3/ktexteditor.inc b/recipes-kf5/tier3/ktexteditor.inc index edc44ad..9485b72 100644 --- a/recipes-kf5/tier3/ktexteditor.inc +++ b/recipes-kf5/tier3/ktexteditor.inc @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: 2017-2020 Volker Krause # SPDX-FileCopyrightText: 2018-2019 Alistair Francis -# SPDX-FileCopyrightText: 2020 Andreas Cord-Landwehr +# SPDX-FileCopyrightText: 2020-2022 Andreas Cord-Landwehr # # SPDX-License-Identifier: MIT @@ -28,10 +28,11 @@ inherit cmake_kf5 inherit ki18n inherit reuse_license_checksums -do_compile:prepend() { - # desktoptojson needs to find installed service type files - export XDG_DATA_DIRS=${STAGING_DATADIR}:$XDG_DATA_DIRS -} +# crosscompile support for kcoreaddons_desktop_to_json +EXTRA_OECMAKE += " \ + -DKSERVICETYPE_PATH_kpart.desktop=${STAGING_DATADIR} \ + -DCMAKE_SYSROOT=${RECIPE_SYSROOT} \ +" FILES:${PN} += " \ ${libdir}/plugins/kf5/parts/katepart.so \