Index: recipes-kf5/tier1/sonnet.inc =================================================================== --- /dev/null +++ recipes-kf5/tier1/sonnet.inc @@ -0,0 +1,25 @@ +DESCRIPTION = "Sonnet" +HOMEPAGE = "https://api.kde.org/frameworks/sonnet/html/index.html" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + " +PR = "r0" + +DEPENDS = "qtbase sonnet-native qtbase-native" + +SRC_URI = "git://anongit.kde.org/sonnet;nobranch=1 \ + file://0001-no-widgets.patch \ +" +S = "${WORKDIR}/git" + +inherit cmake_kf5 +EXTRA_OECMAKE += " -DPARSETRIGRAMS_EXECUTABLE=${STAGING_DIR_NATIVE}/usr/bin/parsetrigrams" + +FILES_${PN} += " \ + ${datadir}/kf5/sonnet/* \ +" + +FILES_${PN}-dev += " \ + ${libdir}/cmake/KF5Sonnet/*.cmake \ + ${prefix}/mkspecs/modules/qt_Sonnet*.pri \ +" Index: recipes-kf5/tier1/sonnet/0001-no-widgets.patch =================================================================== --- /dev/null +++ recipes-kf5/tier1/sonnet/0001-no-widgets.patch @@ -0,0 +1,53 @@ +commit e5cf922c9bd53c13d05cb8776dde14a9e66c0db1 +Author: Volker Krause +Date: Sun Jul 30 13:36:25 2017 +0200 + + Allow to build Sonnet without Qt5Widgets + + Summary: + This is useful for cross-compilation, where we only need the QtCore-only + parsetrigrams build tool on the host and avoids having to pull in a full + graphics stack for the host build in Yocto. + + Reviewers: #frameworks, cordlandwehr + + Tags: #frameworks + + Differential Revision: https://phabricator.kde.org/D6990 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64df939..19bbd17 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,7 +17,8 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) + include(KDECMakeSettings) + + set(REQUIRED_QT_VERSION 5.6.0) +-find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) ++find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG COMPONENTS Widgets) ++find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core) + + + include(GenerateExportHeader) +@@ -43,7 +44,9 @@ endif() + add_subdirectory(src) + add_subdirectory(autotests) + add_subdirectory(data) +-add_subdirectory(examples) ++if(TARGET Qt5::Widgets) ++ add_subdirectory(examples) ++endif() + + + # create a Config.cmake and a ConfigVersion.cmake file and install them +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index cf40289..e6e4212 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,3 +1,5 @@ + add_subdirectory(core) + add_subdirectory(plugins) +-add_subdirectory(ui) ++if(TARGET Qt5::Widgets) ++ add_subdirectory(ui) ++endif() Index: recipes-kf5/tier1/sonnet_5.36.0.bb =================================================================== --- /dev/null +++ recipes-kf5/tier1/sonnet_5.36.0.bb @@ -0,0 +1,2 @@ +require ${PN}.inc +SRCREV = "v${PV}"