1 |
commit: 9cfae1197d9b99643ea11bffe8af55a7ac4ae05c |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 22 11:21:01 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 22 11:21:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=9cfae119 |
7 |
|
8 |
dev-util/kdevelop-css: Make tests optional, fix test DEPEND |
9 |
|
10 |
Reported-by: Johannes Hirte <johannes.hirte <AT> datenkhaos.de> |
11 |
Gentoo-bug: 630928 |
12 |
Package-Manager: Portage-2.3.12, Repoman-2.3.3 |
13 |
|
14 |
.../kdevelop-css/files/kdevelop-css-tests.patch | 50 ++++++++++++++++++++++ |
15 |
dev-util/kdevelop-css/kdevelop-css-9999.ebuild | 6 ++- |
16 |
2 files changed, 55 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/dev-util/kdevelop-css/files/kdevelop-css-tests.patch b/dev-util/kdevelop-css/files/kdevelop-css-tests.patch |
19 |
new file mode 100644 |
20 |
index 0000000000..79654840d5 |
21 |
--- /dev/null |
22 |
+++ b/dev-util/kdevelop-css/files/kdevelop-css-tests.patch |
23 |
@@ -0,0 +1,50 @@ |
24 |
+From 7a32e32d55f6e765798098790beda88b0dc5eb7a Mon Sep 17 00:00:00 2001 |
25 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
26 |
+Date: Sun, 22 Oct 2017 13:12:10 +0200 |
27 |
+Subject: [PATCH] Make tests conditional on BUILD_TESTING |
28 |
+ |
29 |
+They depend on kdevelop being built with tests. |
30 |
+--- |
31 |
+ CMakeLists.txt | 2 ++ |
32 |
+ parser/CMakeLists.txt | 2 ++ |
33 |
+ 2 files changed, 4 insertions(+) |
34 |
+ |
35 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
36 |
+index 4d25a98..c310b9e 100644 |
37 |
+--- a/CMakeLists.txt |
38 |
++++ b/CMakeLists.txt |
39 |
+@@ -88,6 +88,7 @@ target_link_libraries(kdevcsssupport |
40 |
+ # kdebugsettings file |
41 |
+ install(FILES kdevcsssupport.categories DESTINATION ${KDE_INSTALL_CONFDIR}) |
42 |
+ |
43 |
++if(BUILD_TESTING) |
44 |
+ ### next target |
45 |
+ set(completionmodeltest_SRCS |
46 |
+ completion/test/modeltest.cpp |
47 |
+@@ -139,5 +140,6 @@ ecm_add_test(${parsejobtest_SRCS} |
48 |
+ KDev::Interfaces KDev::Language KDev::Tests |
49 |
+ KF5::I18n KF5::TextEditor |
50 |
+ ) |
51 |
++endif() |
52 |
+ |
53 |
+ feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) |
54 |
+diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt |
55 |
+index e9014f8..91afa21 100644 |
56 |
+--- a/parser/CMakeLists.txt |
57 |
++++ b/parser/CMakeLists.txt |
58 |
+@@ -47,6 +47,7 @@ target_link_libraries( kdev4cssparser LINK_PRIVATE |
59 |
+ ) |
60 |
+ install(TARGETS kdev4cssparser DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}) |
61 |
+ |
62 |
++if(BUILD_TESTING) |
63 |
+ ### next target |
64 |
+ add_executable(css-parser ${CMAKE_CURRENT_BINARY_DIR}/tokenizer.cpp main.cpp) |
65 |
+ target_link_libraries(css-parser |
66 |
+@@ -71,3 +72,4 @@ ecm_add_test(${parsertest_SRCS} |
67 |
+ KDev::Language |
68 |
+ KDev::Tests |
69 |
+ ) |
70 |
++endif() |
71 |
+-- |
72 |
+2.14.2 |
73 |
+ |
74 |
|
75 |
diff --git a/dev-util/kdevelop-css/kdevelop-css-9999.ebuild b/dev-util/kdevelop-css/kdevelop-css-9999.ebuild |
76 |
index c47afe1f5a..40f7bfc622 100644 |
77 |
--- a/dev-util/kdevelop-css/kdevelop-css-9999.ebuild |
78 |
+++ b/dev-util/kdevelop-css/kdevelop-css-9999.ebuild |
79 |
@@ -4,6 +4,7 @@ |
80 |
EAPI=6 |
81 |
|
82 |
KDEBASE="kdevelop" |
83 |
+KDE_TEST="true" |
84 |
KMNAME="kdev-css" |
85 |
inherit kde5 |
86 |
|
87 |
@@ -21,8 +22,11 @@ RDEPEND=" |
88 |
$(add_qt_dep qtgui) |
89 |
$(add_qt_dep qtwidgets) |
90 |
dev-util/kdevelop-pg-qt:5 |
91 |
- dev-util/kdevelop:5 |
92 |
+ >=dev-util/kdevelop-5.1.80:5 |
93 |
" |
94 |
DEPEND="${RDEPEND} |
95 |
sys-devel/flex |
96 |
+ test? ( >=dev-util/kdevelop-5.1.80:5[test] ) |
97 |
" |
98 |
+ |
99 |
+PATCHES=( "${FILESDIR}/${PN}-tests.patch" ) # TODO: upstream |