Re-enable the daemon until Plasma 6

The plan was to use the new kglobalacceld, but that is not hooked
up to start on Plasma 5.
We can keep building this daemon as it doesn't actually conflict
with kf6-kglobalaccel or kglobalacceld.

After we ship Plasma 6 we should enable the compatibility flag again
and switch to using kglobalacceld instead. At that point we can use
-DBUILD_RUNTIME=OFF instead of -DKF6_COMPAT_BUILD=ON.
epel9
Alessandro Astone 1 year ago
parent 1314ef8ccb
commit 5f235653b9

@ -1,113 +0,0 @@
From b0595dd3ca6b812223af8695a87480f54d094523 Mon Sep 17 00:00:00 2001
From: Nicolas Fella <nicolas.fella@gmx.de>
Date: Mon, 9 Oct 2023 20:22:03 +0200
Subject: [PATCH] Add build option for KF6 coinstallability
When shipping both KF5 and KF6 one wants to disable installing some runtime components
We have the BUILD_RUNTIME option, but that disables too much, i.e. the KGlobalAccelPrivate library that is needed to build KWin
Add another option for the coinstallability build
---
CMakeLists.txt | 2 ++
src/runtime/CMakeLists.txt | 60 ++++++++++++++++++++------------------
2 files changed, 34 insertions(+), 28 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69171686..37772501 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,8 @@ set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprec
option(BUILD_RUNTIME "Build the kglobalacceld runtime" ON)
add_feature_info(BUILD_RUNTIME ${BUILD_RUNTIME} "The kglobalacceld runtime")
+option(KF6_COMPAT_BUILD "Don't build runtime components that conflict with KF6" OFF)
+
option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
diff --git a/src/runtime/CMakeLists.txt b/src/runtime/CMakeLists.txt
index 5562d0c9..8a2447ca 100644
--- a/src/runtime/CMakeLists.txt
+++ b/src/runtime/CMakeLists.txt
@@ -52,26 +52,45 @@ if(XCB_XCB_FOUND)
endif()
endif()
-add_executable(kglobalaccel5 main.cpp logging.cpp)
-ecm_mark_nongui_executable(kglobalaccel5)
+if (NOT KF6_COMPAT_BUILD)
+ add_executable(kglobalaccel5 main.cpp logging.cpp)
+ ecm_mark_nongui_executable(kglobalaccel5)
-target_include_directories(kglobalaccel5 PRIVATE ${CMAKE_BINARY_DIR})
+ target_include_directories(kglobalaccel5 PRIVATE ${CMAKE_BINARY_DIR})
-target_link_libraries(kglobalaccel5
- KF5GlobalAccelPrivate
- KF5::DBusAddons # KDBusService
- KF5::Crash
+ target_link_libraries(kglobalaccel5
+ KF5GlobalAccelPrivate
+ KF5::DBusAddons # KDBusService
+ KF5::Crash
+ )
+
+ add_subdirectory(plugins)
+
+ if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.102.0)
+ install( FILES kglobalaccel.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} RENAME kglobalaccel5.desktop)
+ endif()
+
+ install( TARGETS kglobalaccel5 ${KF_INSTALL_TARGETS_DEFAULT_ARGS} )
+
+
+ # D-Bus activation service file, and associated systemd service
+ include (ECMGenerateDBusServiceFile)
+ include (ECMConfiguredInstall)
+ ecm_generate_dbus_service_file(
+ NAME org.kde.kglobalaccel
+ EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/kglobalaccel5"
+ SYSTEMD_SERVICE plasma-kglobalaccel.service
+ DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
)
-add_subdirectory(plugins)
+ ecm_install_configured_files(
+ INPUT plasma-kglobalaccel.service.in
+ DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR}
+ )
+endif()
# Install application and configuration
install(TARGETS KF5GlobalAccelPrivate EXPORT KF5GlobalAccelTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
-install( TARGETS kglobalaccel5 ${KF_INSTALL_TARGETS_DEFAULT_ARGS} )
-
-if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.102.0)
- install( FILES kglobalaccel.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} RENAME kglobalaccel5.desktop)
-endif()
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kf5globalaccelprivate_export.h
@@ -79,18 +98,3 @@ install(FILES
kglobalaccel_interface.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KGlobalAccel/private COMPONENT Devel
)
-
-# D-Bus activation service file, and associated systemd service
-include (ECMGenerateDBusServiceFile)
-include (ECMConfiguredInstall)
-ecm_generate_dbus_service_file(
- NAME org.kde.kglobalaccel
- EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/kglobalaccel5"
- SYSTEMD_SERVICE plasma-kglobalaccel.service
- DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
-)
-
-ecm_install_configured_files(
- INPUT plasma-kglobalaccel.service.in
- DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR}
-)
--
GitLab

@ -1,10 +1,11 @@
%bcond kf6_compat %[0%{?fedora} >= 40 || 0%{?rhel} >= 10]
# TODO: Enable after shipping Plasma 6
%bcond kf6_compat 0
%global framework kglobalaccel
Name: kf5-%{framework}
Version: 5.111.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: KDE Frameworks 5 Tier 3 integration module for global shortcuts
License: LGPLv2+
@ -15,9 +16,6 @@ URL: https://invent.kde.org/frameworks/%{framework}
Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz
## upstream fixes
# Add build flag for KF6 coinstallability
# https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/100
Patch0: 100.patch
BuildRequires: extra-cmake-modules >= %{majmin}
BuildRequires: kf5-rpm-macros
@ -67,7 +65,7 @@ developing applications that use %{name}.
%build
%cmake_kf5 %{?with_kf6_compat:-DKF6_COMPAT_BUILD=ON}
%cmake_kf5 %{?with_kf6_compat:-DBUILD_RUNTIME=OFF}
%cmake_build
@ -112,6 +110,9 @@ rm -fv %{buildroot}%{_prefix}/lib/systemd/user/plasma-kglobalaccel.service
%changelog
* Tue Oct 24 2023 Alessandro Astone <ales.astone@gmail.com> - 5.111.0-5
- Re-enable the daemon until Plasma 6
* Wed Oct 18 2023 Alessandro Astone <ales.astone@gmail.com> - 5.111.0-4
- Require the new kglobalacceld if compat build

Loading…
Cancel
Save