Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/okular/, kde-apps/okular/files/
Date: Sat, 01 Aug 2020 17:07:21
Message-Id: 1596301583.ff582f9be402830adf5fbcadd994e03d523b1c44.asturm@gentoo
1 commit: ff582f9be402830adf5fbcadd994e03d523b1c44
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 1 17:05:35 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 1 17:06:23 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=ff582f9b
7
8 kde-apps/okular: Re-add modified tests-optional.patch
9
10 Closes: https://bugs.gentoo.org/734138
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 kde-apps/okular/files/okular-20.07.90-tests.patch | 148 ++++++++++++++++++++++
15 kde-apps/okular/okular-20.07.90.ebuild | 2 +
16 kde-apps/okular/okular-20.08.49.9999.ebuild | 2 +
17 kde-apps/okular/okular-9999.ebuild | 2 +
18 4 files changed, 154 insertions(+)
19
20 diff --git a/kde-apps/okular/files/okular-20.07.90-tests.patch b/kde-apps/okular/files/okular-20.07.90-tests.patch
21 new file mode 100644
22 index 0000000000..6bd229fc38
23 --- /dev/null
24 +++ b/kde-apps/okular/files/okular-20.07.90-tests.patch
25 @@ -0,0 +1,148 @@
26 +From c675ba8bed1e792f351fabf3ba040a86138f9f84 Mon Sep 17 00:00:00 2001
27 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
28 +Date: Thu, 12 Oct 2017 14:09:09 +0200
29 +Subject: [PATCH] Move tests into existing (auto)tests subdirectories
30 +
31 +---
32 + generators/chm/CMakeLists.txt | 12 +++---------
33 + generators/chm/autotests/CMakeLists.txt | 8 ++++++++
34 + generators/chm/autotests/chmgeneratortest.cpp | 2 +-
35 + generators/comicbook/CMakeLists.txt | 10 +++-------
36 + generators/comicbook/autotests/CMakeLists.txt | 6 ++++++
37 + generators/kimgio/CMakeLists.txt | 6 +-----
38 + generators/kimgio/tests/CMakeLists.txt | 5 +++++
39 + generators/kimgio/tests/kimgiotest.cpp | 2 +-
40 + 8 files changed, 28 insertions(+), 23 deletions(-)
41 + create mode 100644 generators/chm/autotests/CMakeLists.txt
42 + create mode 100644 generators/comicbook/autotests/CMakeLists.txt
43 + create mode 100644 generators/kimgio/tests/CMakeLists.txt
44 +
45 +diff --git a/generators/chm/CMakeLists.txt b/generators/chm/CMakeLists.txt
46 +index 9d82b9394..b3a33afe4 100644
47 +--- a/generators/chm/CMakeLists.txt
48 ++++ b/generators/chm/CMakeLists.txt
49 +@@ -30,15 +30,9 @@ set(okularGenerator_chmlib_SRCS
50 + okular_add_generator(okularGenerator_chmlib ${okularGenerator_chmlib_SRCS})
51 + target_link_libraries(okularGenerator_chmlib okularcore ${CHM_LIBRARY} ${LIBZIP_LIBRARY} KF5::KHtml)
52 +
53 +-########### autotests ###############
54 +-
55 +-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
56 +-ecm_add_test(autotests/chmgeneratortest.cpp
57 +- TEST_NAME "chmgeneratortest"
58 +- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore
59 +-)
60 +-
61 +-target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>")
62 ++if(BUILD_TESTING)
63 ++ add_subdirectory(autotests)
64 ++endif()
65 +
66 + ########### install files ###############
67 + install( FILES okularChm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
68 +diff --git a/generators/chm/autotests/CMakeLists.txt b/generators/chm/autotests/CMakeLists.txt
69 +new file mode 100644
70 +index 000000000..59753ca45
71 +--- /dev/null
72 ++++ b/generators/chm/autotests/CMakeLists.txt
73 +@@ -0,0 +1,8 @@
74 ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" )
75 ++
76 ++ecm_add_test(chmgeneratortest.cpp
77 ++ TEST_NAME "chmgeneratortest"
78 ++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore
79 ++)
80 ++
81 ++target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>")
82 +diff --git a/generators/chm/autotests/chmgeneratortest.cpp b/generators/chm/autotests/chmgeneratortest.cpp
83 +index 9245a736f..5a2c487b4 100644
84 +--- a/generators/chm/autotests/chmgeneratortest.cpp
85 ++++ b/generators/chm/autotests/chmgeneratortest.cpp
86 +@@ -34,7 +34,7 @@ void ChmGeneratorTest::initTestCase()
87 + {
88 + Okular::SettingsCore::instance(QStringLiteral("ChmGeneratorTest"));
89 + m_document = new Okular::Document(nullptr);
90 +- const QString testFile = QStringLiteral(KDESRCDIR "autotests/data/test.chm");
91 ++ const QString testFile = QStringLiteral(KDESRCDIR "data/test.chm");
92 + QMimeDatabase db;
93 + const QMimeType mime = db.mimeTypeForFile(testFile);
94 + QCOMPARE(m_document->openDocument(testFile, QUrl(), mime), Okular::Document::OpenSuccess);
95 +diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
96 +index 9a07c7183..316c93152 100644
97 +--- a/generators/comicbook/CMakeLists.txt
98 ++++ b/generators/comicbook/CMakeLists.txt
99 +@@ -29,13 +29,9 @@ if (KArchive_HAVE_LZMA)
100 + target_compile_definitions(okular_comicbook PRIVATE -DWITH_K7ZIP=1)
101 + endif()
102 +
103 +-########### autotests ###############
104 +-
105 +-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
106 +-ecm_add_test(autotests/comicbooktest.cpp
107 +- TEST_NAME "comicbooktest"
108 +- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook
109 +-)
110 ++if(BUILD_TESTING)
111 ++ add_subdirectory(autotests)
112 ++endif()
113 +
114 + ########### install files ###############
115 + install( FILES okularComicbook.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
116 +diff --git a/generators/comicbook/autotests/CMakeLists.txt b/generators/comicbook/autotests/CMakeLists.txt
117 +new file mode 100644
118 +index 000000000..aaacb341a
119 +--- /dev/null
120 ++++ b/generators/comicbook/autotests/CMakeLists.txt
121 +@@ -0,0 +1,6 @@
122 ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" )
123 ++
124 ++ecm_add_test(comicbooktest.cpp
125 ++ TEST_NAME "comicbooktest"
126 ++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook
127 ++)
128 +diff --git a/generators/kimgio/CMakeLists.txt b/generators/kimgio/CMakeLists.txt
129 +index b8cac76df..49f893bc1 100644
130 +--- a/generators/kimgio/CMakeLists.txt
131 ++++ b/generators/kimgio/CMakeLists.txt
132 +@@ -13,13 +13,9 @@ okular_add_generator(okularGenerator_kimgio generator_kimgio.cpp)
133 + target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n)
134 +
135 + if(BUILD_TESTING)
136 +- add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
137 +- set( kimgiotest_SRCS tests/kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp ${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp )
138 +- ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test)
139 +- target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>")
140 ++ add_subdirectory(tests)
141 + endif()
142 +
143 +-
144 + ########### install files ###############
145 + install( FILES okularKimgio.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
146 + install( PROGRAMS okularApplication_kimgio.desktop org.kde.mobile.okular_kimgio.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
147 +diff --git a/generators/kimgio/tests/CMakeLists.txt b/generators/kimgio/tests/CMakeLists.txt
148 +new file mode 100644
149 +index 000000000..f31bf3fe8
150 +--- /dev/null
151 ++++ b/generators/kimgio/tests/CMakeLists.txt
152 +@@ -0,0 +1,5 @@
153 ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" )
154 ++
155 ++set( kimgiotest_SRCS kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp ${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp )
156 ++ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test)
157 ++target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>")
158 +diff --git a/generators/kimgio/tests/kimgiotest.cpp b/generators/kimgio/tests/kimgiotest.cpp
159 +index f2e50641d..a24f7af80 100644
160 +--- a/generators/kimgio/tests/kimgiotest.cpp
161 ++++ b/generators/kimgio/tests/kimgiotest.cpp
162 +@@ -9,7 +9,7 @@
163 + ***************************************************************************/
164 +
165 +
166 +-#include "../../settings_core.h"
167 ++#include "../../../settings_core.h"
168 + #include "../generator_kimgio.h"
169 +
170 + #include <core/observer.h>
171 +--
172 +2.25.1
173 +
174
175 diff --git a/kde-apps/okular/okular-20.07.90.ebuild b/kde-apps/okular/okular-20.07.90.ebuild
176 index c9ad0072e8..b90821208b 100644
177 --- a/kde-apps/okular/okular-20.07.90.ebuild
178 +++ b/kde-apps/okular/okular-20.07.90.ebuild
179 @@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
180 )
181 "
182
183 +PATCHES=( "${FILESDIR}/${P}-tests.patch" ) # bug 734138
184 +
185 src_prepare() {
186 ecm_src_prepare
187 use mobile || cmake_comment_add_subdirectory mobile
188
189 diff --git a/kde-apps/okular/okular-20.08.49.9999.ebuild b/kde-apps/okular/okular-20.08.49.9999.ebuild
190 index 91bb31a944..80da659569 100644
191 --- a/kde-apps/okular/okular-20.08.49.9999.ebuild
192 +++ b/kde-apps/okular/okular-20.08.49.9999.ebuild
193 @@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
194 )
195 "
196
197 +PATCHES=( "${FILESDIR}/${PN}-20.07.90-tests.patch" ) # bug 734138
198 +
199 src_prepare() {
200 ecm_src_prepare
201 use mobile || cmake_comment_add_subdirectory mobile
202
203 diff --git a/kde-apps/okular/okular-9999.ebuild b/kde-apps/okular/okular-9999.ebuild
204 index 91bb31a944..80da659569 100644
205 --- a/kde-apps/okular/okular-9999.ebuild
206 +++ b/kde-apps/okular/okular-9999.ebuild
207 @@ -70,6 +70,8 @@ RDEPEND="${DEPEND}
208 )
209 "
210
211 +PATCHES=( "${FILESDIR}/${PN}-20.07.90-tests.patch" ) # bug 734138
212 +
213 src_prepare() {
214 ecm_src_prepare
215 use mobile || cmake_comment_add_subdirectory mobile