diff --git a/recipes-kf5/tier1/kconfig.inc b/recipes-kf5/tier1/kconfig.inc --- a/recipes-kf5/tier1/kconfig.inc +++ b/recipes-kf5/tier1/kconfig.inc @@ -10,11 +10,19 @@ DEPENDS = "qtbase" -SRC_URI = "git://anongit.kde.org/kconfig;nobranch=1" +SRC_URI = " \ + git://anongit.kde.org/kconfig;nobranch=1 \ + file://0001-no-gui.patch \ +" S = "${WORKDIR}/git" inherit cmake_kf5 +sysroot_stage_all_append_class-target () { + mkdir -p ${SYSROOT_DESTDIR}${libexecdir}/kf5 + cp ${D}${libexecdir}/kf5/kconf_update ${SYSROOT_DESTDIR}${libexecdir}/kf5 +} + FILES_${PN}-dev += " \ ${libdir}/cmake/KF5Config/*.cmake \ ${prefix}/mkspecs/modules/qt_KConfig*.pri \ diff --git a/recipes-kf5/tier1/kconfig/0001-no-gui.patch b/recipes-kf5/tier1/kconfig/0001-no-gui.patch new file mode 100644 --- /dev/null +++ b/recipes-kf5/tier1/kconfig/0001-no-gui.patch @@ -0,0 +1,100 @@ +commit 61ed46048d3ae7aa182102d192bab3e49339a010 +Author: Volker Krause +Date: Sun Jul 30 15:47:29 2017 +0200 + + Allow to build KConfig without Qt5Gui + + This is particularly useful for cross-compilation, where we only need the + kconfig_compiler on the host system. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e50ba5..458630e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,8 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) + + set(REQUIRED_QT_VERSION 5.6.0) + +-find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui Xml) ++find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Xml) ++find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui) + include(KDEInstallDirs) + include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) + include(KDECMakeSettings) +diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt +index c1ae1de..7d6698f 100644 +--- a/autotests/CMakeLists.txt ++++ b/autotests/CMakeLists.txt +@@ -52,6 +52,7 @@ ecm_add_tests( + + target_include_directories(test_kconf_update PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../src/kconf_update) + ++if(TARGET Qt5::Gui) + ecm_add_tests( + kconfigguitest.cpp + kconfigloadertest.cpp +@@ -62,4 +63,4 @@ ecm_add_tests( + ) + + add_subdirectory(kconfig_compiler) +- ++endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 998a1d5..d4ca886 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,5 +1,7 @@ + add_subdirectory(core) +-add_subdirectory(gui) ++if(TARGET Qt5::Gui) ++ add_subdirectory(gui) ++endif() + add_subdirectory(kconfig_compiler) + add_subdirectory(kconf_update) + add_subdirectory(kreadconfig) +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 9b7491c..46fabd5 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -1,6 +1,3 @@ +- +-find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) +- + set(libkconfigcore_SRCS + kconfig.cpp + kconfigbase.cpp +diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +index 9659326..08786d3 100644 +--- a/src/gui/CMakeLists.txt ++++ b/src/gui/CMakeLists.txt +@@ -1,7 +1,3 @@ +- +-find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) +-find_package(Qt5Xml ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) +- + set(libkconfiggui_SRCS + kconfiggui.cpp + kconfiggroupgui.cpp +diff --git a/src/kconf_update/CMakeLists.txt b/src/kconf_update/CMakeLists.txt +index b1342a8..db11511 100644 +--- a/src/kconf_update/CMakeLists.txt ++++ b/src/kconf_update/CMakeLists.txt +@@ -1,5 +1,3 @@ +-find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) +- + remove_definitions(-DQT_NO_CAST_FROM_ASCII) + + ########### next target ############### +diff --git a/src/kconfig_compiler/CMakeLists.txt b/src/kconfig_compiler/CMakeLists.txt +index 004a649..dc0a08d 100644 +--- a/src/kconfig_compiler/CMakeLists.txt ++++ b/src/kconfig_compiler/CMakeLists.txt +@@ -16,8 +16,6 @@ else() + add_executable(KF5::kconfig_compiler ALIAS kconfig_compiler) + endif() + +-find_package(Qt5Xml ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) +- + target_link_libraries(kconfig_compiler Qt5::Xml) + + ecm_mark_nongui_executable(kconfig_compiler) diff --git a/recipes-kf5/tier2/kcrash.inc b/recipes-kf5/tier2/kcrash.inc --- a/recipes-kf5/tier2/kcrash.inc +++ b/recipes-kf5/tier2/kcrash.inc @@ -7,7 +7,10 @@ DEPENDS = "kcoreaddons kwindowsystem kcoreaddons-native" -SRC_URI = "git://anongit.kde.org/kcrash" +SRC_URI = " \ + git://anongit.kde.org/kcrash \ + file://0001-no-x11.patch \ +" S = "${WORKDIR}/git" inherit cmake_kf5 diff --git a/recipes-kf5/tier2/kcrash/0001-no-x11.patch b/recipes-kf5/tier2/kcrash/0001-no-x11.patch new file mode 100644 --- /dev/null +++ b/recipes-kf5/tier2/kcrash/0001-no-x11.patch @@ -0,0 +1,52 @@ +commit 7974f8ddbe9f9594abcf9aac951138c636d79a2a +Author: Volker Krause +Date: Sun Jul 30 15:02:48 2017 +0200 + + Fix build on Linux without X11 + + Reviewers: #frameworks + + Tags: #frameworks + + Differential Revision: https://phabricator.kde.org/D6992 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 82220d6..76f4b8a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,10 +19,11 @@ include(KDECMakeSettings) + + if (NOT APPLE) + find_package(X11) ++ find_package(Wayland) + endif() + + set(HAVE_X11 ${X11_FOUND}) +- ++set(HAVE_WAYLAND ${Wayland_FOUND}) + + include(GenerateExportHeader) + include(ECMSetupVersion) +diff --git a/src/config-kcrash.h.cmake b/src/config-kcrash.h.cmake +index fa032a3..1d92bec 100644 +--- a/src/config-kcrash.h.cmake ++++ b/src/config-kcrash.h.cmake +@@ -1,4 +1,5 @@ + #cmakedefine01 HAVE_X11 ++#cmakedefine01 HAVE_WAYLAND + #cmakedefine KCRASH_CORE_PATTERN_RAISE + + #define kde_socklen_t socklen_t +diff --git a/src/kcrash.cpp b/src/kcrash.cpp +index 830a036..778cd4f 100644 +--- a/src/kcrash.cpp ++++ b/src/kcrash.cpp +@@ -265,6 +265,8 @@ static const char* displayEnvVarName_c() + // Can't use QGuiApplication::platformName() here, there is no app instance. + #if HAVE_X11 + return "DISPLAY"; ++#elif HAVE_WAYLAND ++ return "WAYLAND_DISPLAY"; + #elif defined(Q_OS_OSX) + return "MAC_DISPLAY"; + #elif defined(Q_OS_WIN) diff --git a/recipes-kf5/tier1/kglobalaccel.inc b/recipes-kf5/tier3/kglobalaccel.inc rename from recipes-kf5/tier1/kglobalaccel.inc rename to recipes-kf5/tier3/kglobalaccel.inc --- a/recipes-kf5/tier1/kglobalaccel.inc +++ b/recipes-kf5/tier3/kglobalaccel.inc @@ -5,9 +5,18 @@ " PR = "r0" -DEPENDS = "qtbase qtx11extras" +DEPENDS = " \ + qtbase \ + kcoreaddons \ + kcoreaddons-native \ + kconfig \ + kconfig-native \ + kcrash \ + kdbusaddons \ + ${@bb.utils.contains("DISTRO_FEATURES", "x11", "qtx11extras", "", d)} \ +" -SRC_URI = "git://anongit.kde.org/kglobalaccel" +SRC_URI = "git://anongit.kde.org/kglobalaccel;nobranch=1" S = "${WORKDIR}/git" inherit cmake_kf5 @@ -19,4 +28,6 @@ FILES_${PN} += " \ /usr/share/dbus-1/interfaces/kf5_org.*.xml \ + /usr/share/dbus-1/services/org.kde.kglobalaccel.service \ + /usr/share/kservices5/kglobalaccel5.desktop \ " diff --git a/recipes-kf5/tier1/kglobalaccel_5.36.0.bb b/recipes-kf5/tier3/kglobalaccel_5.36.0.bb rename from recipes-kf5/tier1/kglobalaccel_5.36.0.bb rename to recipes-kf5/tier3/kglobalaccel_5.36.0.bb