From 5a24d7b8493bd97fdedab6fde4e691b6bcf679ac Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sun, 3 Sep 2017 19:23:42 +0200 Subject: [PATCH] Enable building of translations for target recipes --- classes/cmake_kf5.bbclass | 6 ++--- recipes-kf5/tier3/plasma-framework.inc | 1 + .../0001-optional-kdoctools.patch | 27 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 recipes-kf5/tier3/plasma-framework/0001-optional-kdoctools.patch diff --git a/classes/cmake_kf5.bbclass b/classes/cmake_kf5.bbclass index b4070c6..73aa010 100644 --- a/classes/cmake_kf5.bbclass +++ b/classes/cmake_kf5.bbclass @@ -5,10 +5,10 @@ EXTRA_OECMAKE += " \ -DBUILD_TESTING=OFF \ " -DEPENDS += "extra-cmake-modules" +DEPENDS += "extra-cmake-modules qttools-native" -# FIXME: using tags gives us translations, translations require lrelease/lconvert host tools, the ecm recipe can't deal with that yet... -do_configure_prepend() { +# don't bother with translations for host tools +do_configure_class-native_prepend() { rm -rf ${S}/po } diff --git a/recipes-kf5/tier3/plasma-framework.inc b/recipes-kf5/tier3/plasma-framework.inc index 44e9f64..936fb92 100644 --- a/recipes-kf5/tier3/plasma-framework.inc +++ b/recipes-kf5/tier3/plasma-framework.inc @@ -27,6 +27,7 @@ DEPENDS = " \ SRC_URI = " \ git://anongit.kde.org/plasma-framework;nobranch=1 \ + file://0001-optional-kdoctools.patch \ " S = "${WORKDIR}/git" diff --git a/recipes-kf5/tier3/plasma-framework/0001-optional-kdoctools.patch b/recipes-kf5/tier3/plasma-framework/0001-optional-kdoctools.patch new file mode 100644 index 0000000..9e01379 --- /dev/null +++ b/recipes-kf5/tier3/plasma-framework/0001-optional-kdoctools.patch @@ -0,0 +1,27 @@ +commit d3fdf43c075f64610244ba93f2af6a1800b81ce3 +Author: Volker Krause +Date: Sun Sep 3 19:15:18 2017 +0200 + + Fix build without KDocTools + + Reviewers: #frameworks + + Tags: #frameworks + + Differential Revision: https://phabricator.kde.org/D7680 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b6932baa8..e1760a1c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -160,7 +160,9 @@ endif() + add_definitions(-DTRANSLATION_DOMAIN=\"libplasma5\") + if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") + ki18n_install(po) +- kdoctools_install(po) ++ if (KF5DocTools_FOUND) ++ kdoctools_install(po) ++ endif() + endif() + add_subdirectory(src) +