commit: 90e4c97053ab2ec448453c9242e6a0fff145ed70
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Mon Jan 19 23:52:55 2015 +0000
Commit: Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Wed Jan 21 20:47:43 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=90e4c970
[kde-apps/libkcddb] Make tests optional
---
.../files/libkcddb-5.9999-tests-optional.patch | 27 ++++++++++++++++++++++
kde-apps/libkcddb/libkcddb-5.9999.ebuild | 8 ++-----
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/kde-apps/libkcddb/files/libkcddb-5.9999-tests-optional.patch
b/kde-apps/libkcddb/files/libkcddb-5.9999-tests-optional.patch
new file mode 100644
index 0000000..22ddd41
--- /dev/null
+++ b/kde-apps/libkcddb/files/libkcddb-5.9999-tests-optional.patch
@@ -0,0 +1,27 @@
+--- a/CMakeLists.txt 2015-01-20 00:43:05.096398998 +0100
++++ b/CMakeLists.txt 2015-01-20 00:44:37.340010389 +0100
+@@ -12,7 +12,7 @@
+ include(GenerateExportHeader)
+ include(ECMSetupVersion)
+
+-find_package(Qt5 REQUIRED COMPONENTS Network Widgets Test)
++find_package(Qt5 REQUIRED COMPONENTS Network Widgets)
+ find_package(KF5 REQUIRED COMPONENTS Config DocTools Codecs I18n KIO
WidgetsAddons)
+
+ ecm_setup_version(${KF5_VERSION}
+@@ -36,10 +36,14 @@
+
+ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+
+-add_subdirectory( test )
+ add_subdirectory( kcmcddb )
+ add_subdirectory( libkcddb )
+
++if(BUILD_TESTING)
++ find_package(Qt5Test REQUIRED)
++ add_subdirectory( test )
++endif()
++
+ feature_summary(WHAT PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
+
+ # Figure out the relative path from the installed Config.cmake file to the
install prefix (which may be at
diff --git a/kde-apps/libkcddb/libkcddb-5.9999.ebuild
b/kde-apps/libkcddb/libkcddb-5.9999.ebuild
index bced8d8..3293d1a 100644
--- a/kde-apps/libkcddb/libkcddb-5.9999.ebuild
+++ b/kde-apps/libkcddb/libkcddb-5.9999.ebuild
@@ -5,6 +5,7 @@
EAPI=5
EGIT_BRANCH="kf5"
+KDE_TEST="true"
inherit kde5
DESCRIPTION="KDE library for CDDB"
@@ -32,12 +33,7 @@ RDEPEND="${DEPEND}
!kde-base/libkcddb:4
"
-src_prepare() {
- sed -e '/add_subdirectory( test )/ s/^#*/#/' \
- -i CMakeLists.txt || die
-
- kde5_src_prepare
-}
+PATCHES=( "${FILESDIR}/${PN}-5.9999-tests-optional.patch" )
src_configure() {
local mycmakeargs=(