commit:     b87841a0b5ef78cae490826b81deac0014c15587
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 18 12:56:07 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 18 12:56:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b87841a0

net-misc/owncloud-client: fix runtime w/ 
kde-frameworks/extra-cmake-modules-6.19.0

Closes: https://bugs.gentoo.org/964420
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../owncloud-client-6.0.0.17092-ecm-6.19.0.patch   | 70 ++++++++++++++++++++++
 .../owncloud-client-6.0.0.17092-r1.ebuild          | 57 ++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git 
a/net-misc/owncloud-client/files/owncloud-client-6.0.0.17092-ecm-6.19.0.patch 
b/net-misc/owncloud-client/files/owncloud-client-6.0.0.17092-ecm-6.19.0.patch
new file mode 100644
index 000000000000..5a4046b172a1
--- /dev/null
+++ 
b/net-misc/owncloud-client/files/owncloud-client-6.0.0.17092-ecm-6.19.0.patch
@@ -0,0 +1,70 @@
+https://bugs.gentoo.org/964420
+https://github.com/owncloud/client/pull/12374
+
+From 61eda498590c5f6633b39bf1e3f95771c2ae0645 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Sat, 18 Oct 2025 13:26:13 +0100
+Subject: [PATCH] Fix compatibility with extra-cmake-modules-6.19.0
+
+owncloud is not using a custom QQmlExtensionPlugin subclass, so we need
+to pass GENERATE_PLUGIN_SOURCE so that a default implementation is generated.
+
+This fixes compatibility with ECM 6.19 since that (correctly) considers plugins
+that don't use GENERATE_PLUGIN_SOURCE to be not optional [0]. That causes the
+QML engine to try and load the (invalid) plugin:
+
+```
+QList(qrc:/qt/qml/org/ownCloud/gui/qml/AccountBar.qml:18:1: Failed to extract 
plugin
+  meta data from '/usr/lib64/qt6/qml/org/ownCloud/gui/libowncloudGuiplugin.so':
+    '/usr/lib64/qt6/qml/org/ownCloud/gui/libowncloudGuiplugin.so' is not a Qt 
plugin (metadata not found)
+    import org.ownCloud.gui 1.0
+    ^)
+```
+
+Pass GENERATE_PLUGIN_SOURCE to fix the startup problem.
+
+[0] commit 4e9b73da40792ece7885924007441880ecc06d8d
+
+Bug: https://bugs.gentoo.org/964420
+---
+ src/gui/CMakeLists.txt       | 1 +
+ src/libsync/CMakeLists.txt   | 1 +
+ src/resources/CMakeLists.txt | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
+index 80a0a6fd90c..355e45737c8 100644
+--- a/src/gui/CMakeLists.txt
++++ b/src/gui/CMakeLists.txt
+@@ -100,6 +100,7 @@ ecm_add_qml_module(owncloudGui
+         URI org.ownCloud.gui
+         VERSION 1.0
+         NAMESPACE OCC
++        GENERATE_PLUGIN_SOURCE
+         QML_FILES
+             qml/AccountBar.qml
+             qml/AccountButton.qml
+diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt
+index af3d72041cb..531f77e4b88 100644
+--- a/src/libsync/CMakeLists.txt
++++ b/src/libsync/CMakeLists.txt
+@@ -99,6 +99,7 @@ ecm_add_qml_module(libsync
+         URI org.ownCloud.libsync
+         VERSION 1.0
+         NAMESPACE OCC
++        GENERATE_PLUGIN_SOURCE
+ )
+ 
+ ecm_finalize_qml_module(libsync DESTINATION ${KDE_INSTALL_QMLDIR})
+diff --git a/src/resources/CMakeLists.txt b/src/resources/CMakeLists.txt
+index 7f630a07063..adbd58671ec 100644
+--- a/src/resources/CMakeLists.txt
++++ b/src/resources/CMakeLists.txt
+@@ -45,6 +45,7 @@ ecm_add_qml_module(owncloudResources
+         URI org.ownCloud.resources
+         VERSION 1.0
+         NAMESPACE OCC
++        GENERATE_PLUGIN_SOURCE
+ )
+ 
+ ecm_finalize_qml_module(owncloudResources DESTINATION ${KDE_INSTALL_QMLDIR})

diff --git a/net-misc/owncloud-client/owncloud-client-6.0.0.17092-r1.ebuild 
b/net-misc/owncloud-client/owncloud-client-6.0.0.17092-r1.ebuild
new file mode 100644
index 000000000000..16f111087c36
--- /dev/null
+++ b/net-misc/owncloud-client/owncloud-client-6.0.0.17092-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+MY_PN="ownCloud"
+DESCRIPTION="Synchronize files from ownCloud Server with your computer"
+HOMEPAGE="https://owncloud.com/";
+SRC_URI="https://download.owncloud.com/desktop/${MY_PN}/stable/${PV}/source/${MY_PN}-${PV}.tar.xz";
+S=${WORKDIR}/${MY_PN}-${PV}
+
+LICENSE="CC-BY-3.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="keyring test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+       dev-libs/kdsingleapplication[qt6(+)]
+       dev-libs/qtkeychain[keyring?,qt6(+)]
+       dev-qt/qtbase:6[concurrent,gui,network,ssl,widgets]
+       net-libs/libre-graph-api-cpp-qt-client
+       sys-fs/inotify-tools"
+
+DEPEND="${RDEPEND}
+       test? (
+               dev-util/cmocka
+               dev-qt/qtbase:6[test]
+       )"
+
+BDEPEND="
+       dev-qt/qttools:6[linguist]
+       kde-frameworks/extra-cmake-modules"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.2.0.10193-no_fortify_override.patch
+       "${FILESDIR}"/${PN}-6.0.0.17092-ecm-6.19.0.patch
+)
+
+src_prepare() {
+       # Keep tests in ${T}
+       sed -i -e "s#\"/tmp#\"${T}#g" test/test*.cpp || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
+               -DBUILD_TESTING=$(usex test)
+               -DKDE_INSTALL_SYSCONFDIR=/etc
+       )
+
+       cmake_src_configure
+}

Reply via email to