Warning, /packaging/yocto-meta-kf6/classes/kf6-cmake-framework.bbclass is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2014 Johan Thelin <johan.thelin@pelagicore.com> 0002 # SPDX-FileCopyrightText: 2016 Sébastien Taylor <sebastien@au-zone.com> 0003 # SPDX-FileCopyrightText: 2017-2019 Volker Krause <vkrause@kde.org> 0004 # SPDX-FileCopyrightText: 2023 Andreas Cord-Landwehr <cordlandwehr@kde.org> 0005 # 0006 # SPDX-License-Identifier: MIT 0007 0008 inherit kf6-cmake 0009 inherit pkgconfig 0010 inherit mime-xdg 0011 0012 EXTRA_OECMAKE:append:class-native = " \ 0013 -DOE_KF6_PATH_HOST_ROOT=${STAGING_DIR_HOST} \ 0014 -DBUILD_TESTING=OFF \ 0015 -DBUILD_DESIGNERPLUGIN=OFF \ 0016 -DBUILD_WITH_QT6=ON \ 0017 -DQT_MAJOR_VERSION=6 \ 0018 " 0019 0020 EXTRA_OECMAKE:append:class-target = " \ 0021 -DOE_KF6_PATH_HOST_ROOT=${STAGING_DIR_HOST} \ 0022 -DBUILD_TESTING=OFF \ 0023 -DKF6_HOST_TOOLING=${STAGING_LIBDIR_NATIVE}/cmake \ 0024 -DBUILD_DESIGNERPLUGIN=OFF \ 0025 -DBUILD_WITH_QT6=ON \ 0026 -DQT_MAJOR_VERSION=6 \ 0027 " 0028 0029 DEPENDS:append = " \ 0030 extra-cmake-modules \ 0031 qttools-native \ 0032 " 0033 0034 # don't bother with translations for host tools 0035 do_configure:prepend:class-native() { 0036 rm -rf ${S}/po 0037 } 0038 0039 do_compile:prepend() { 0040 export XDG_DATA_DIRS=${STAGING_DATADIR}:$XDG_DATA_DIRS 0041 export LD_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE}:$LD_LIBRARY_PATH 0042 } 0043 0044 # This function is rather offensive, but it seems to work: 0045 # look into _usr or Export subpathes (depending on CMake version) for CMake target files inside 0046 # the build directory an rewrite absolut pathes to have a OE_KF6_PATH_HOST_ROOT prefix variable 0047 do_install:prepend() { 0048 if [ "0" -ne $(find . -name \*.cmake | grep '_usr\|Export' | wc -l) ]; then 0049 sed -i 's/\"\/usr\//\"\$\{OE_KF6_PATH_HOST_ROOT\}\/usr\//g' $(find . -name "*.cmake" | grep '_usr\|Export') 0050 sed -i 's/\;\/usr\//\;\$\{OE_KF6_PATH_HOST_ROOT\}\/usr\//g' $(find . -name "*.cmake" | grep '_usr\|Export') 0051 fi 0052 } 0053 0054 BBCLASSEXTEND = "native nativesdk" 0055 0056 FILES:${PN}:append = " \ 0057 ${datadir}/dbus-1/services/*.service \ 0058 ${datadir}/dbus-1/system-services/*.service \ 0059 ${datadir}/dbus-1/system.d/*.conf \ 0060 ${datadir}/knotifications6/*.notifyrc \ 0061 ${datadir}/kservices6/*.desktop \ 0062 ${datadir}/kservices6/*.protocol \ 0063 ${datadir}/kservicetypes6/*.desktop \ 0064 ${datadir}/kservices6/*.desktop \ 0065 ${datadir}/polkit-1/actions/*.policy \ 0066 ${datadir}/mime/packages/kde6.xml \ 0067 ${libdir}/qml/org/kde/* \ 0068 " 0069 0070 # TODO "${datadir}/kdevappwizard/templates/*.tar.bz2" is deprecated, remove when all frameworks are ported away 0071 FILES:${PN}-dev:append = " \ 0072 ${datadir}/dbus-1/interfaces/*.xml \ 0073 ${datadir}/kdevappwizard/templates/*.tar.bz2 \ 0074 ${datadir}/kdevfiletemplates/templates/*.tar.bz2 \ 0075 ${datadir}/qlogging-categories6 \ 0076 ${libdir}/cmake \ 0077 ${libdir}/plugins/designer/*.so \ 0078 ${prefix}/mkspecs/modules/qt_*.pri \ 0079 "