commit:     8e90d659f60262832fd42bf96060b48867853eb1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 20 21:14:48 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 21:15:16 2023 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=8e90d659

kde-apps/kio-extras: Fix build w/o Qt5Test

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

 .../files/kio-extras-23.04.0-tests-optional.patch  | 42 ++++++++++++++++++++++
 kde-apps/kio-extras/kio-extras-23.04.0.ebuild      |  3 ++
 .../kio-extras/kio-extras-23.04.49.9999.ebuild     |  3 ++
 3 files changed, 48 insertions(+)

diff --git a/kde-apps/kio-extras/files/kio-extras-23.04.0-tests-optional.patch 
b/kde-apps/kio-extras/files/kio-extras-23.04.0-tests-optional.patch
new file mode 100644
index 0000000000..7c4b740128
--- /dev/null
+++ b/kde-apps/kio-extras/files/kio-extras-23.04.0-tests-optional.patch
@@ -0,0 +1,42 @@
+From 02c9f3cb6d095c50930c223eaeb86c45fdcc42da Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Thu, 20 Apr 2023 23:11:02 +0200
+Subject: [PATCH] Follow precedence that tests are built conditionally
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ activities/CMakeLists.txt | 4 +++-
+ smb/CMakeLists.txt        | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/activities/CMakeLists.txt b/activities/CMakeLists.txt
+index 57756ad65..81749cacf 100644
+--- a/activities/CMakeLists.txt
++++ b/activities/CMakeLists.txt
+@@ -56,7 +56,9 @@ target_link_libraries(
+    Qt::Network
+ )
+ 
+-add_subdirectory(autotests)
++if (BUILD_TESTING)
++   add_subdirectory(autotests)
++endif()
+ 
+ # install target (typical /usr/lib64/qtX/plugins/kf5/kio)
+ install(
+diff --git a/smb/CMakeLists.txt b/smb/CMakeLists.txt
+index 66ed5b4ad..1ecf0e66d 100644
+--- a/smb/CMakeLists.txt
++++ b/smb/CMakeLists.txt
+@@ -117,5 +117,7 @@ if(WITH_SHAREDMIMEINFO)
+     update_xdg_mimetypes(${KDE_INSTALL_MIMEDIR})
+ endif()
+ 
+-add_subdirectory(autotests)
++if (BUILD_TESTING)
++    add_subdirectory(autotests)
++endif()
+ add_subdirectory(kded)
+-- 
+2.40.0
+

diff --git a/kde-apps/kio-extras/kio-extras-23.04.0.ebuild 
b/kde-apps/kio-extras/kio-extras-23.04.0.ebuild
index 129dfcade4..53dc2f72af 100644
--- a/kde-apps/kio-extras/kio-extras-23.04.0.ebuild
+++ b/kde-apps/kio-extras/kio-extras-23.04.0.ebuild
@@ -75,6 +75,9 @@ RDEPEND="${DEPEND}
 "
 BDEPEND="man? ( dev-util/gperf )"
 
+# https://invent.kde.org/network/kio-extras/-/merge_requests/236
+PATCHES=( "${FILESDIR}/${P}-tests-optional.patch" )
+
 src_configure() {
        local mycmakeargs=(
                $(cmake_use_find_package activities KF5Activities)

diff --git a/kde-apps/kio-extras/kio-extras-23.04.49.9999.ebuild 
b/kde-apps/kio-extras/kio-extras-23.04.49.9999.ebuild
index 93591179d0..eda5f6e33d 100644
--- a/kde-apps/kio-extras/kio-extras-23.04.49.9999.ebuild
+++ b/kde-apps/kio-extras/kio-extras-23.04.49.9999.ebuild
@@ -75,6 +75,9 @@ RDEPEND="${DEPEND}
 "
 BDEPEND="man? ( dev-util/gperf )"
 
+# https://invent.kde.org/network/kio-extras/-/merge_requests/236
+PATCHES=( "${FILESDIR}/${PN}-23.04.0-tests-optional.patch" )
+
 src_configure() {
        local mycmakeargs=(
                $(cmake_use_find_package activities KF5Activities)

Reply via email to