commit:     9cfae1197d9b99643ea11bffe8af55a7ac4ae05c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 22 11:21:01 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 22 11:21:01 2017 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=9cfae119

dev-util/kdevelop-css: Make tests optional, fix test DEPEND

Reported-by: Johannes Hirte <johannes.hirte <AT> datenkhaos.de>
Gentoo-bug: 630928
Package-Manager: Portage-2.3.12, Repoman-2.3.3

 .../kdevelop-css/files/kdevelop-css-tests.patch    | 50 ++++++++++++++++++++++
 dev-util/kdevelop-css/kdevelop-css-9999.ebuild     |  6 ++-
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/dev-util/kdevelop-css/files/kdevelop-css-tests.patch 
b/dev-util/kdevelop-css/files/kdevelop-css-tests.patch
new file mode 100644
index 0000000000..79654840d5
--- /dev/null
+++ b/dev-util/kdevelop-css/files/kdevelop-css-tests.patch
@@ -0,0 +1,50 @@
+From 7a32e32d55f6e765798098790beda88b0dc5eb7a Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Sun, 22 Oct 2017 13:12:10 +0200
+Subject: [PATCH] Make tests conditional on BUILD_TESTING
+
+They depend on kdevelop being built with tests.
+---
+ CMakeLists.txt        | 2 ++
+ parser/CMakeLists.txt | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4d25a98..c310b9e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -88,6 +88,7 @@ target_link_libraries(kdevcsssupport
+ # kdebugsettings file
+ install(FILES kdevcsssupport.categories DESTINATION ${KDE_INSTALL_CONFDIR})
+ 
++if(BUILD_TESTING)
+ ### next target
+ set(completionmodeltest_SRCS
+     completion/test/modeltest.cpp
+@@ -139,5 +140,6 @@ ecm_add_test(${parsejobtest_SRCS}
+         KDev::Interfaces KDev::Language KDev::Tests
+         KF5::I18n KF5::TextEditor
+ )
++endif()
+ 
+ feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
+diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt
+index e9014f8..91afa21 100644
+--- a/parser/CMakeLists.txt
++++ b/parser/CMakeLists.txt
+@@ -47,6 +47,7 @@ target_link_libraries( kdev4cssparser LINK_PRIVATE
+ )
+ install(TARGETS kdev4cssparser DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
+ 
++if(BUILD_TESTING)
+ ### next target
+ add_executable(css-parser ${CMAKE_CURRENT_BINARY_DIR}/tokenizer.cpp main.cpp)
+ target_link_libraries(css-parser
+@@ -71,3 +72,4 @@ ecm_add_test(${parsertest_SRCS}
+         KDev::Language
+         KDev::Tests
+ )
++endif()
+-- 
+2.14.2
+

diff --git a/dev-util/kdevelop-css/kdevelop-css-9999.ebuild 
b/dev-util/kdevelop-css/kdevelop-css-9999.ebuild
index c47afe1f5a..40f7bfc622 100644
--- a/dev-util/kdevelop-css/kdevelop-css-9999.ebuild
+++ b/dev-util/kdevelop-css/kdevelop-css-9999.ebuild
@@ -4,6 +4,7 @@
 EAPI=6
 
 KDEBASE="kdevelop"
+KDE_TEST="true"
 KMNAME="kdev-css"
 inherit kde5
 
@@ -21,8 +22,11 @@ RDEPEND="
        $(add_qt_dep qtgui)
        $(add_qt_dep qtwidgets)
        dev-util/kdevelop-pg-qt:5
-       dev-util/kdevelop:5
+       >=dev-util/kdevelop-5.1.80:5
 "
 DEPEND="${RDEPEND}
        sys-devel/flex
+       test? ( >=dev-util/kdevelop-5.1.80:5[test] )
 "
+
+PATCHES=( "${FILESDIR}/${PN}-tests.patch" ) # TODO: upstream

Reply via email to