commit: 93e60138b73fb5f06b207c433976881aa25a2226
Author: Andreas Sturmlechner gentoo org>
AuthorDate: Tue Dec 31 19:13:11 2019 +
Commit: Andreas Sturmlechner gentoo org>
CommitDate: Tue Dec 31 19:14:53 2019 +
URL:https://gitweb.gentoo.org/proj/kde.git/commit/?id=93e60138
kde-frameworks/kdoctools: Use upstream docbundledir patch
See also: https://phabricator.kde.org/D26306
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner gentoo.org>
.../kdoctools-5.54.0-gentoo-docbundledir.patch | 26
.../files/kdoctools-5.66.0-docbundledir.patch | 160 +
kde-frameworks/kdoctools/kdoctools-.ebuild | 2 +-
3 files changed, 161 insertions(+), 27 deletions(-)
diff --git
a/kde-frameworks/kdoctools/files/kdoctools-5.54.0-gentoo-docbundledir.patch
b/kde-frameworks/kdoctools/files/kdoctools-5.54.0-gentoo-docbundledir.patch
deleted file mode 100644
index cb6c35f19f..00
--- a/kde-frameworks/kdoctools/files/kdoctools-5.54.0-gentoo-docbundledir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 79f31819b95fcb0bd3d30630f769706923d41609 Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner
-Date: Mon, 28 Jan 2019 22:50:56 +0100
-Subject: [PATCH] xslt.cpp: Add /usr/share/help dir to list of paths containing
- documentation
-
- src/xslt.cpp | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/xslt.cpp b/src/xslt.cpp
-index 1000e33..a0fbe4c 100644
a/src/xslt.cpp
-+++ b/src/xslt.cpp
-@@ -494,5 +494,7 @@ QStringList getKDocToolsCatalogs()
- QStringList KDocTools::documentationDirs()
- {
- /* List of paths containing documentation */
--return QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory);
-+QStringList docDirs =
QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
QStringLiteral("help"), QStandardPaths::LocateDirectory);
-+
docDirs.append(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory));
-+return docDirs;
- }
---
-2.20.1
-
diff --git a/kde-frameworks/kdoctools/files/kdoctools-5.66.0-docbundledir.patch
b/kde-frameworks/kdoctools/files/kdoctools-5.66.0-docbundledir.patch
new file mode 100644
index 00..640e4d8342
--- /dev/null
+++ b/kde-frameworks/kdoctools/files/kdoctools-5.66.0-docbundledir.patch
@@ -0,0 +1,160 @@
+diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
+--- a/autotests/CMakeLists.txt
b/autotests/CMakeLists.txt
+@@ -1,3 +1,40 @@
++include(ECMMarkAsTest)
++
++find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Test)
++
++find_package(LibXslt REQUIRED)
++find_package(LibXml2 REQUIRED)
++
++include_directories( ${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR} )
++
++include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src)
++include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
++
++add_definitions(-DSIMPLE_XSLT)
++
++function(kdoctools_define_document_test basetest)
++ set(documentdirstest_SRCS
++${basetest}.cpp
++../src/xslt.cpp
++${CMAKE_CURRENT_BINARY_DIR}/../src/loggingcategory.cpp
++ )
++
++ add_executable(${basetest} ${documentdirstest_SRCS})
++ target_link_libraries(${basetest}
++Qt5::Core Qt5::Test
++${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${LIBXSLT_EXSLT_LIBRARIES}
++ )
++
++ add_test(NAME ${basetest} COMMAND ${basetest})
++ ecm_mark_as_test(${basetest})
++endfunction()
++
++kdoctools_define_document_test(documentdirstest)
++
++kdoctools_define_document_test(documentcustomdirtest)
++# custom path, used by the test
++target_compile_definitions(documentcustomdirtest PRIVATE
KDOCTOOLS_CUSTOM_DOC_PATH="/usr/share/doc/kde/HTML")
++
+ add_test(
+ NAME meinproc_template
+ COMMAND meinproc5 --srcdir ${CMAKE_CURRENT_BINARY_DIR}/../src
${CMAKE_CURRENT_SOURCE_DIR}/../src/template.docbook
+diff --git a/autotests/documentcustomdirtest.cpp
b/autotests/documentcustomdirtest.cpp
+new file mode 100644
+--- /dev/null
b/autotests/documentcustomdirtest.cpp
+@@ -0,0 +1,37 @@
++#include
++#include
++#include
++
++#include "../src/docbookxslt.h"
++#include "config-kdoctools.h"
++#include "loggingcategory.h"
++
++using namespace KDocTools;
++
++class documentCustomDirTest: public QObject
++{
++Q_OBJECT
++private Q_SLOTS:
++void testDirsContent();
++};
++
++void documentCustomDirTest::testDirsContent()
++{
++const QStringList docDirs = documentationDirs();
++QVERIFY(docDirs.size() >= 1);
++/* DOCBUNDLEDIR (one of its matches) must be the first element */
++
QVERIFY(docDirs[0].indexOf(QRegularExpression(QStringLiteral(KDOCTOOLS_DOCBUNDLEDIR)))
>= 0);
++/* Check all the other items that should be there;
++ check the last occurrence, as each locateAll can return more items
++ and also some of them may match KDOCTOOLS_DOCBUNDLEDIR */
++int position_dir_doc_HTML =