commit:     3b49f48d5f32e2af6061820f90cbd450535410c3
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  7 16:53:40 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Mar  7 16:53:40 2022 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=3b49f48d

kde-plasma/discover: Rebase tests-optional.patch

Closes: https://bugs.gentoo.org/834691
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/discover/discover-9999.ebuild           |  2 +-
 .../files/discover-5.24.90-tests-optional.patch    | 94 ++++++++++++++++++++++
 2 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/kde-plasma/discover/discover-9999.ebuild 
b/kde-plasma/discover/discover-9999.ebuild
index 7ea0d466e9..934f14c1cf 100644
--- a/kde-plasma/discover/discover-9999.ebuild
+++ b/kde-plasma/discover/discover-9999.ebuild
@@ -56,7 +56,7 @@ RDEPEND="${DEPEND}
        >=kde-frameworks/kirigami-${KFMIN}:5
 "
 
-PATCHES=( "${FILESDIR}/${PN}-5.21.90-tests-optional.patch" )
+PATCHES=( "${FILESDIR}/${PN}-5.24.90-tests-optional.patch" )
 
 src_prepare() {
        ecm_src_prepare

diff --git a/kde-plasma/discover/files/discover-5.24.90-tests-optional.patch 
b/kde-plasma/discover/files/discover-5.24.90-tests-optional.patch
new file mode 100644
index 0000000000..f90f81abf5
--- /dev/null
+++ b/kde-plasma/discover/files/discover-5.24.90-tests-optional.patch
@@ -0,0 +1,94 @@
+From 608e1dc8232002bc4cff600eae7571a100856334 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <ast...@gentoo.org>
+Date: Fri, 14 May 2021 12:38:57 +0200
+Subject: [PATCH] Use BUILD_TESTING to make tests optional
+
+Variable is provided by KDECMakeSettings and default enabled.
+
+Signed-off-by: Andreas Sturmlechner <ast...@gentoo.org>
+---
+ CMakeLists.txt                                     | 6 +++++-
+ libdiscover/CMakeLists.txt                         | 4 +++-
+ libdiscover/backends/DummyBackend/CMakeLists.txt   | 4 +++-
+ libdiscover/backends/FlatpakBackend/CMakeLists.txt | 4 +++-
+ libdiscover/backends/KNSBackend/CMakeLists.txt     | 4 +++-
+ 5 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cd8c61aa..8ce3fa8c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,7 +22,7 @@ include(GenerateExportHeader)
+ include(ECMQtDeclareLoggingCategory)
+ include(KDEClangFormat)
+ include(KDEGitCommitHooks)
+-find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED CONFIG 
COMPONENTS Widgets Test Network Xml Concurrent DBus Quick)
++find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED CONFIG 
COMPONENTS Widgets Network Xml Concurrent DBus Quick)
+ 
+ if (QT_MAJOR_VERSION STREQUAL "5")
+         find_package(Qt5X11Extras REQUIRED)
+@@ -30,6 +30,10 @@ elseif (QT_MAJOR_VERSION STREQUAL "6")
+         find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG 
REQUIRED Gui) # qtx11extras_p.h
+ endif()
+ 
++if(BUILD_TESTING)
++    find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED)
++endif()
++
+ find_package(PkgConfig REQUIRED)
+ 
+ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED CoreAddons Config Crash 
DBusAddons I18n Archive XmlGui ItemModels KIO Declarative KCMUtils IdleTime)
+diff --git a/libdiscover/CMakeLists.txt b/libdiscover/CMakeLists.txt
+index a26d6934..ca827f3b 100644
+--- a/libdiscover/CMakeLists.txt
++++ b/libdiscover/CMakeLists.txt
+@@ -4,7 +4,9 @@ 
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-paths.h.cmake ${CMAKE_CURRENT_
+ 
+ add_subdirectory(backends)
+ add_subdirectory(notifiers)
+-add_subdirectory(tests)
++if(BUILD_TESTING)
++    add_subdirectory(tests)
++endif()
+ 
+ set(discovercommon_SRCS
+     Category/Category.cpp
+diff --git a/libdiscover/backends/DummyBackend/CMakeLists.txt 
b/libdiscover/backends/DummyBackend/CMakeLists.txt
+index 5b4aef10..38377d80 100644
+--- a/libdiscover/backends/DummyBackend/CMakeLists.txt
++++ b/libdiscover/backends/DummyBackend/CMakeLists.txt
+@@ -1,4 +1,6 @@
+-add_subdirectory(tests)
++if(BUILD_TESTING)
++    add_subdirectory(tests)
++endif()
+ 
+ set(dummy-backend_SRCS
+     DummyResource.cpp
+diff --git a/libdiscover/backends/FlatpakBackend/CMakeLists.txt 
b/libdiscover/backends/FlatpakBackend/CMakeLists.txt
+index 55e6b38e..e2d11b93 100644
+--- a/libdiscover/backends/FlatpakBackend/CMakeLists.txt
++++ b/libdiscover/backends/FlatpakBackend/CMakeLists.txt
+@@ -1,4 +1,6 @@
+-add_subdirectory(tests)
++if(BUILD_TESTING)
++    add_subdirectory(tests)
++endif()
+ 
+ set(flatpak-backend_SRCS
+     FlatpakResource.cpp
+diff --git a/libdiscover/backends/KNSBackend/CMakeLists.txt 
b/libdiscover/backends/KNSBackend/CMakeLists.txt
+index 54f19e1f..ec3443e9 100644
+--- a/libdiscover/backends/KNSBackend/CMakeLists.txt
++++ b/libdiscover/backends/KNSBackend/CMakeLists.txt
+@@ -1,4 +1,6 @@
+-add_subdirectory(tests)
++if(BUILD_TESTING)
++    add_subdirectory(tests)
++endif()
+ 
+ add_library(kns-backend MODULE
+     KNSBackend.cpp
+-- 
+2.35.1
+

Reply via email to