commit:     b5cc895aca8e527870e415cf73435b74f013b9c2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  8 15:52:11 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Oct  8 16:27:42 2025 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=b5cc895a

kde-frameworks/ksecretd-services: new package, add 6.19.0, 9999

Provides IUSE systemd to work around KDE-bug #509680 [1] caused by
upstream commit ecf9e2ec7fceca538a9266f5bb9488b4dced1d09 [2]

[1] https://bugs.kde.org/show_bug.cgi?id=509680
[2] https://invent.kde.org/frameworks/kwallet/-/commit/ecf9e2ec

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../ksecretd-services-6.19.0.ebuild                | 62 ++++++++++++++++++++++
 .../ksecretd-services-9999.ebuild                  | 62 ++++++++++++++++++++++
 kde-frameworks/ksecretd-services/metadata.xml      | 12 +++++
 3 files changed, 136 insertions(+)

diff --git a/kde-frameworks/ksecretd-services/ksecretd-services-6.19.0.ebuild 
b/kde-frameworks/ksecretd-services/ksecretd-services-6.19.0.ebuild
new file mode 100644
index 0000000000..29645d228c
--- /dev/null
+++ b/kde-frameworks/ksecretd-services/ksecretd-services-6.19.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# this is purely for service file creation
+ECM_I18N="false"
+ECM_HANDBOOK="false"
+KDE_ORG_NAME="kwallet"
+inherit ecm-common frameworks.kde.org
+
+DESCRIPTION="D-Bus service files for ksecretd kwallet runtime component"
+
+LICENSE="LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="systemd"
+
+RDEPEND="!<kde-frameworks/kwallet-runtime-6.18.0-r1:6"
+
+ecm-common_inject_heredoc() {
+       my_configure_file(){
+               echo "configure_file(src/runtime/ksecretd/${1}.in 
\${CMAKE_CURRENT_BINARY_DIR}/${1})"
+       }
+
+       cat >> CMakeLists.txt <<- _EOF_ || die
+               option(WITH_SYSTEMD "Install service file for portal DBus 
service" ON) # KDE-bug #509680
+               $(my_configure_file org.kde.secretservicecompat.service)
+               if(WITH_SYSTEMD)
+                       $(my_configure_file 
org.freedesktop.impl.portal.desktop.kwallet.service)
+               endif()
+               install(FILES
+                               
\${CMAKE_CURRENT_BINARY_DIR}/org.kde.secretservicecompat.service
+                       DESTINATION \${KDE_INSTALL_DBUSSERVICEDIR}
+               )
+               if(WITH_SYSTEMD)
+                       install(FILES
+                                       
\${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.impl.portal.desktop.kwallet.service
+                               DESTINATION \${KDE_INSTALL_DBUSSERVICEDIR}
+                       )
+               endif()
+       _EOF_
+}
+
+src_prepare() {
+       ecm-common_src_prepare
+
+       # Safety measure in case new services are added in the future
+       local known_num_of_services=2
+       local found_num_of_services=$(find src/runtime/ksecretd -iname 
"*service.in" | wc -l)
+       if [[ ${found_num_of_services} != ${known_num_of_services} ]]; then
+               eerror "Number of service files mismatch!"
+               eerror "Expected: ${known_num_of_services}"
+               eerror "Found: ${found_num_of_services}"
+               die
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=( -DWITH_SYSTEMD=$(usex systemd) )
+       ecm-common_src_configure
+}

diff --git a/kde-frameworks/ksecretd-services/ksecretd-services-9999.ebuild 
b/kde-frameworks/ksecretd-services/ksecretd-services-9999.ebuild
new file mode 100644
index 0000000000..1486436e58
--- /dev/null
+++ b/kde-frameworks/ksecretd-services/ksecretd-services-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# this is purely for service file creation
+ECM_I18N="false"
+ECM_HANDBOOK="false"
+KDE_ORG_NAME="kwallet"
+inherit ecm-common frameworks.kde.org
+
+DESCRIPTION="D-Bus service files for ksecretd kwallet runtime component"
+
+LICENSE="LGPL-2+"
+SLOT="0"
+KEYWORDS=""
+IUSE="systemd"
+
+RDEPEND="!<kde-frameworks/kwallet-runtime-6.18.0-r1:6"
+
+ecm-common_inject_heredoc() {
+       my_configure_file(){
+               echo "configure_file(src/runtime/ksecretd/${1}.in 
\${CMAKE_CURRENT_BINARY_DIR}/${1})"
+       }
+
+       cat >> CMakeLists.txt <<- _EOF_ || die
+               option(WITH_SYSTEMD "Install service file for portal DBus 
service" ON) # KDE-bug #509680
+               $(my_configure_file org.kde.secretservicecompat.service)
+               if(WITH_SYSTEMD)
+                       $(my_configure_file 
org.freedesktop.impl.portal.desktop.kwallet.service)
+               endif()
+               install(FILES
+                               
\${CMAKE_CURRENT_BINARY_DIR}/org.kde.secretservicecompat.service
+                       DESTINATION \${KDE_INSTALL_DBUSSERVICEDIR}
+               )
+               if(WITH_SYSTEMD)
+                       install(FILES
+                                       
\${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.impl.portal.desktop.kwallet.service
+                               DESTINATION \${KDE_INSTALL_DBUSSERVICEDIR}
+                       )
+               endif()
+       _EOF_
+}
+
+src_prepare() {
+       ecm-common_src_prepare
+
+       # Safety measure in case new services are added in the future
+       local known_num_of_services=2
+       local found_num_of_services=$(find src/runtime/ksecretd -iname 
"*service.in" | wc -l)
+       if [[ ${found_num_of_services} != ${known_num_of_services} ]]; then
+               eerror "Number of service files mismatch!"
+               eerror "Expected: ${known_num_of_services}"
+               eerror "Found: ${found_num_of_services}"
+               die
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=( -DWITH_SYSTEMD=$(usex systemd) )
+       ecm-common_src_configure
+}

diff --git a/kde-frameworks/ksecretd-services/metadata.xml 
b/kde-frameworks/ksecretd-services/metadata.xml
new file mode 100644
index 0000000000..34fd23fdbd
--- /dev/null
+++ b/kde-frameworks/ksecretd-services/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo KDE Project</name>
+       </maintainer>
+       <upstream>
+               
<bugs-to>https://bugs.kde.org/enter_bug.cgi?product=frameworks-kwallet</bugs-to>
+               <remote-id type="kde-invent">frameworks/kwallet</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to