1 |
commit: 6d5c6fb2da4af3e46043a57c8d9197bbdb8fc07a |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 2 08:14:47 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 2 08:14:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=6d5c6fb2 |
7 |
|
8 |
kde-frameworks/kdoctools: Drop obsolete patch |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
.../files/kdoctools-5.66.0-docbundledir.patch | 160 --------------------- |
14 |
1 file changed, 160 deletions(-) |
15 |
|
16 |
diff --git a/kde-frameworks/kdoctools/files/kdoctools-5.66.0-docbundledir.patch b/kde-frameworks/kdoctools/files/kdoctools-5.66.0-docbundledir.patch |
17 |
deleted file mode 100644 |
18 |
index 640e4d8342..0000000000 |
19 |
--- a/kde-frameworks/kdoctools/files/kdoctools-5.66.0-docbundledir.patch |
20 |
+++ /dev/null |
21 |
@@ -1,160 +0,0 @@ |
22 |
-diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt |
23 |
---- a/autotests/CMakeLists.txt |
24 |
-+++ b/autotests/CMakeLists.txt |
25 |
-@@ -1,3 +1,40 @@ |
26 |
-+include(ECMMarkAsTest) |
27 |
-+ |
28 |
-+find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Test) |
29 |
-+ |
30 |
-+find_package(LibXslt REQUIRED) |
31 |
-+find_package(LibXml2 REQUIRED) |
32 |
-+ |
33 |
-+include_directories( ${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR} ) |
34 |
-+ |
35 |
-+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src) |
36 |
-+include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) |
37 |
-+ |
38 |
-+add_definitions(-DSIMPLE_XSLT) |
39 |
-+ |
40 |
-+function(kdoctools_define_document_test basetest) |
41 |
-+ set(documentdirstest_SRCS |
42 |
-+ ${basetest}.cpp |
43 |
-+ ../src/xslt.cpp |
44 |
-+ ${CMAKE_CURRENT_BINARY_DIR}/../src/loggingcategory.cpp |
45 |
-+ ) |
46 |
-+ |
47 |
-+ add_executable(${basetest} ${documentdirstest_SRCS}) |
48 |
-+ target_link_libraries(${basetest} |
49 |
-+ Qt5::Core Qt5::Test |
50 |
-+ ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${LIBXSLT_EXSLT_LIBRARIES} |
51 |
-+ ) |
52 |
-+ |
53 |
-+ add_test(NAME ${basetest} COMMAND ${basetest}) |
54 |
-+ ecm_mark_as_test(${basetest}) |
55 |
-+endfunction() |
56 |
-+ |
57 |
-+kdoctools_define_document_test(documentdirstest) |
58 |
-+ |
59 |
-+kdoctools_define_document_test(documentcustomdirtest) |
60 |
-+# custom path, used by the test |
61 |
-+target_compile_definitions(documentcustomdirtest PRIVATE KDOCTOOLS_CUSTOM_DOC_PATH="/usr/share/doc/kde/HTML") |
62 |
-+ |
63 |
- add_test( |
64 |
- NAME meinproc_template |
65 |
- COMMAND meinproc5 --srcdir ${CMAKE_CURRENT_BINARY_DIR}/../src ${CMAKE_CURRENT_SOURCE_DIR}/../src/template.docbook |
66 |
-diff --git a/autotests/documentcustomdirtest.cpp b/autotests/documentcustomdirtest.cpp |
67 |
-new file mode 100644 |
68 |
---- /dev/null |
69 |
-+++ b/autotests/documentcustomdirtest.cpp |
70 |
-@@ -0,0 +1,37 @@ |
71 |
-+#include <QDebug> |
72 |
-+#include <QRegularExpression> |
73 |
-+#include <QTest> |
74 |
-+ |
75 |
-+#include "../src/docbookxslt.h" |
76 |
-+#include "config-kdoctools.h" |
77 |
-+#include "loggingcategory.h" |
78 |
-+ |
79 |
-+using namespace KDocTools; |
80 |
-+ |
81 |
-+class documentCustomDirTest: public QObject |
82 |
-+{ |
83 |
-+ Q_OBJECT |
84 |
-+private Q_SLOTS: |
85 |
-+ void testDirsContent(); |
86 |
-+}; |
87 |
-+ |
88 |
-+void documentCustomDirTest::testDirsContent() |
89 |
-+{ |
90 |
-+ const QStringList docDirs = documentationDirs(); |
91 |
-+ QVERIFY(docDirs.size() >= 1); |
92 |
-+ /* DOCBUNDLEDIR (one of its matches) must be the first element */ |
93 |
-+ QVERIFY(docDirs[0].indexOf(QRegularExpression(QStringLiteral(KDOCTOOLS_DOCBUNDLEDIR))) >= 0); |
94 |
-+ /* Check all the other items that should be there; |
95 |
-+ check the last occurrence, as each locateAll can return more items |
96 |
-+ and also some of them may match KDOCTOOLS_DOCBUNDLEDIR */ |
97 |
-+ int position_dir_doc_HTML = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/doc/HTML$"))); |
98 |
-+ QVERIFY(position_dir_doc_HTML >= 0); |
99 |
-+ int position_dir_help = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/help$"))); |
100 |
-+ QVERIFY(position_dir_help >= 0); |
101 |
-+ /* The custom directory */ |
102 |
-+ int position_dir_custom = docDirs.lastIndexOf(QStringLiteral(KDOCTOOLS_CUSTOM_DOC_PATH)); |
103 |
-+ QVERIFY(position_dir_custom >= 0); |
104 |
-+} |
105 |
-+ |
106 |
-+QTEST_MAIN(documentCustomDirTest) |
107 |
-+#include "documentcustomdirtest.moc" |
108 |
-diff --git a/autotests/documentdirstest.cpp b/autotests/documentdirstest.cpp |
109 |
-new file mode 100644 |
110 |
---- /dev/null |
111 |
-+++ b/autotests/documentdirstest.cpp |
112 |
-@@ -0,0 +1,34 @@ |
113 |
-+#include <QDebug> |
114 |
-+#include <QRegularExpression> |
115 |
-+#include <QTest> |
116 |
-+ |
117 |
-+#include "../src/docbookxslt.h" |
118 |
-+#include "config-kdoctools.h" |
119 |
-+#include "loggingcategory.h" |
120 |
-+ |
121 |
-+using namespace KDocTools; |
122 |
-+ |
123 |
-+class documentDirsTest: public QObject |
124 |
-+{ |
125 |
-+ Q_OBJECT |
126 |
-+private Q_SLOTS: |
127 |
-+ void testDirsContent(); |
128 |
-+}; |
129 |
-+ |
130 |
-+void documentDirsTest::testDirsContent() |
131 |
-+{ |
132 |
-+ const QStringList docDirs = documentationDirs(); |
133 |
-+ QVERIFY(docDirs.size() >= 1); |
134 |
-+ /* DOCBUNDLEDIR (one of its matches) must be the first element */ |
135 |
-+ QVERIFY(docDirs[0].indexOf(QRegularExpression(QStringLiteral(KDOCTOOLS_DOCBUNDLEDIR))) >= 0); |
136 |
-+ /* Check all the other items that should be there; |
137 |
-+ check the last occurrence, as each locateAll can return more items |
138 |
-+ and also some of them may match KDOCTOOLS_DOCBUNDLEDIR */ |
139 |
-+ int position_dir_doc_HTML = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/doc/HTML$"))); |
140 |
-+ QVERIFY(position_dir_doc_HTML >= 0); |
141 |
-+ int position_dir_help = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/help$"))); |
142 |
-+ QVERIFY(position_dir_help >= 0); |
143 |
-+} |
144 |
-+ |
145 |
-+QTEST_MAIN(documentDirsTest) |
146 |
-+#include "documentdirstest.moc" |
147 |
-diff --git a/config-kdoctools.h.cmake b/config-kdoctools.h.cmake |
148 |
---- a/config-kdoctools.h.cmake |
149 |
-+++ b/config-kdoctools.h.cmake |
150 |
-@@ -3,3 +3,13 @@ |
151 |
- #define DOCBOOK_XML_CURRDTD "@DocBookXML4_DTD_DIR@" |
152 |
- |
153 |
- #define KDOCTOOLS_INSTALL_DATADIR_KF5 "${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_DATADIR_KF5}" |
154 |
-+ |
155 |
-+#define KDOCTOOLS_DOCBUNDLEDIR "${KDE_INSTALL_DOCBUNDLEDIR}" |
156 |
-+ |
157 |
-+/* Get the value set in the library at compile time, or allow the application |
158 |
-+ to set it if the library has not defined it (useful for example for testing |
159 |
-+ purposes) |
160 |
-+*/ |
161 |
-+#ifndef KDOCTOOLS_CUSTOM_DOC_PATH |
162 |
-+#define KDOCTOOLS_CUSTOM_DOC_PATH "${KDOCTOOLS_CUSTOM_DOC_PATH}" |
163 |
-+#endif |
164 |
-diff --git a/src/xslt.cpp b/src/xslt.cpp |
165 |
---- a/src/xslt.cpp |
166 |
-+++ b/src/xslt.cpp |
167 |
-@@ -489,5 +489,13 @@ |
168 |
- QStringList KDocTools::documentationDirs() |
169 |
- { |
170 |
- /* List of paths containing documentation */ |
171 |
-- return QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory); |
172 |
-+ QStringList allDocDirs; |
173 |
-+ allDocDirs << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral(KDOCTOOLS_DOCBUNDLEDIR), QStandardPaths::LocateDirectory) |
174 |
-+ << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory) |
175 |
-+ << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("help"), QStandardPaths::LocateDirectory); |
176 |
-+ if (!QStringLiteral(KDOCTOOLS_CUSTOM_DOC_PATH).isEmpty()) { |
177 |
-+ allDocDirs << QStringLiteral(KDOCTOOLS_CUSTOM_DOC_PATH); |
178 |
-+ } |
179 |
-+ allDocDirs.removeDuplicates(); |
180 |
-+ return allDocDirs; |
181 |
- } |