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