diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-01-11 12:50:43 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-01-11 13:26:17 +0100 |
commit | e8116aa13928bb4db16c9bc98858434ad92b6ec7 (patch) | |
tree | e4cc968f946b1e06a9cba2e8c260ce8637263270 /kde-frameworks/kdoctools | |
parent | gnome-base/gnome-keyring: remove old (diff) | |
download | gentoo-e8116aa13928bb4db16c9bc98858434ad92b6ec7.tar.gz gentoo-e8116aa13928bb4db16c9bc98858434ad92b6ec7.tar.bz2 gentoo-e8116aa13928bb4db16c9bc98858434ad92b6ec7.zip |
kde-frameworks: Add KDE Frameworks 5.66.0
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kdoctools')
-rw-r--r-- | kde-frameworks/kdoctools/Manifest | 1 | ||||
-rw-r--r-- | kde-frameworks/kdoctools/files/kdoctools-5.66.0-docbundledir.patch | 160 | ||||
-rw-r--r-- | kde-frameworks/kdoctools/kdoctools-5.66.0.ebuild | 48 |
3 files changed, 209 insertions, 0 deletions
diff --git a/kde-frameworks/kdoctools/Manifest b/kde-frameworks/kdoctools/Manifest index 01373097fca4..f1b20e012f14 100644 --- a/kde-frameworks/kdoctools/Manifest +++ b/kde-frameworks/kdoctools/Manifest @@ -1,2 +1,3 @@ DIST kdoctools-5.64.0.tar.xz 429464 BLAKE2B 56623d9171956752eac51ec9cd7c8bedb5ff57c66b14619d1f8e1253c39fd3b00284fdb6ac2f03b3fd54fdbcfe037f07a46c126effe81ae67f67dc801023e98f SHA512 213c343fee983093391b84a81186a36edc7e78651ccf19381579695f9ed70af660131614393420258d63538953e494ff7246892dc4f31e1469bd7ab318eef1f9 DIST kdoctools-5.65.0.tar.xz 428076 BLAKE2B 487d7f2d4543e4f2670848d30a9eac93a73235547ee61a023bda992664f3dbc64a1a13e3a91d81590e1e4ea784223af692f359f54c482bf905638746a202e47a SHA512 1857d8838cd94dfd5c02dcbbdeba193c3d7aaf976be27cabf9f1b3631b3b55e0446d4f4b082677451b55ffa15b56efb62bfb0fcd0448cd157928dc41cb86b56b +DIST kdoctools-5.66.0.tar.xz 428884 BLAKE2B 906593af7889a6190b3cc0173971d54bd70d63e81d58a6598f3c58639cde5558e5ebd01a86ee2d5be9b2f4ba2a6d87f6be512bc69882e3d2f3f056f509af9a5c SHA512 b830d99bb4c39fd1dd8cb942d0b2b987cdf260ab4547ce7c37650cc9e0b3607d7a0009c02f67cd5b9cc9234cd026bf669d9b17983b569425dff33323ce7df272 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 000000000000..640e4d83426c --- /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 <QDebug> ++#include <QRegularExpression> ++#include <QTest> ++ ++#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 = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/doc/HTML$"))); ++ QVERIFY(position_dir_doc_HTML >= 0); ++ int position_dir_help = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/help$"))); ++ QVERIFY(position_dir_help >= 0); ++ /* The custom directory */ ++ int position_dir_custom = docDirs.lastIndexOf(QStringLiteral(KDOCTOOLS_CUSTOM_DOC_PATH)); ++ QVERIFY(position_dir_custom >= 0); ++} ++ ++QTEST_MAIN(documentCustomDirTest) ++#include "documentcustomdirtest.moc" +diff --git a/autotests/documentdirstest.cpp b/autotests/documentdirstest.cpp +new file mode 100644 +--- /dev/null ++++ b/autotests/documentdirstest.cpp +@@ -0,0 +1,34 @@ ++#include <QDebug> ++#include <QRegularExpression> ++#include <QTest> ++ ++#include "../src/docbookxslt.h" ++#include "config-kdoctools.h" ++#include "loggingcategory.h" ++ ++using namespace KDocTools; ++ ++class documentDirsTest: public QObject ++{ ++ Q_OBJECT ++private Q_SLOTS: ++ void testDirsContent(); ++}; ++ ++void documentDirsTest::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 = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/doc/HTML$"))); ++ QVERIFY(position_dir_doc_HTML >= 0); ++ int position_dir_help = docDirs.lastIndexOf(QRegularExpression(QStringLiteral(".*/help$"))); ++ QVERIFY(position_dir_help >= 0); ++} ++ ++QTEST_MAIN(documentDirsTest) ++#include "documentdirstest.moc" +diff --git a/config-kdoctools.h.cmake b/config-kdoctools.h.cmake +--- a/config-kdoctools.h.cmake ++++ b/config-kdoctools.h.cmake +@@ -3,3 +3,13 @@ + #define DOCBOOK_XML_CURRDTD "@DocBookXML4_DTD_DIR@" + + #define KDOCTOOLS_INSTALL_DATADIR_KF5 "${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_DATADIR_KF5}" ++ ++#define KDOCTOOLS_DOCBUNDLEDIR "${KDE_INSTALL_DOCBUNDLEDIR}" ++ ++/* Get the value set in the library at compile time, or allow the application ++ to set it if the library has not defined it (useful for example for testing ++ purposes) ++*/ ++#ifndef KDOCTOOLS_CUSTOM_DOC_PATH ++#define KDOCTOOLS_CUSTOM_DOC_PATH "${KDOCTOOLS_CUSTOM_DOC_PATH}" ++#endif +diff --git a/src/xslt.cpp b/src/xslt.cpp +--- a/src/xslt.cpp ++++ b/src/xslt.cpp +@@ -489,5 +489,13 @@ + QStringList KDocTools::documentationDirs() + { + /* List of paths containing documentation */ +- return QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory); ++ QStringList allDocDirs; ++ allDocDirs << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral(KDOCTOOLS_DOCBUNDLEDIR), QStandardPaths::LocateDirectory) ++ << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory) ++ << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("help"), QStandardPaths::LocateDirectory); ++ if (!QStringLiteral(KDOCTOOLS_CUSTOM_DOC_PATH).isEmpty()) { ++ allDocDirs << QStringLiteral(KDOCTOOLS_CUSTOM_DOC_PATH); ++ } ++ allDocDirs.removeDuplicates(); ++ return allDocDirs; + } diff --git a/kde-frameworks/kdoctools/kdoctools-5.66.0.ebuild b/kde-frameworks/kdoctools/kdoctools-5.66.0.ebuild new file mode 100644 index 000000000000..0d80c0455b6c --- /dev/null +++ b/kde-frameworks/kdoctools/kdoctools-5.66.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ECM_QTHELP="false" +PVCUT=$(ver_cut 1-2) +inherit ecm kde.org + +DESCRIPTION="Tools to generate documentation in various formats from DocBook files" + +LICENSE="MIT" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="nls" + +BDEPEND=" + dev-lang/perl + dev-perl/URI + nls? ( >=kde-frameworks/ki18n-${PVCUT}:5 ) +" +DEPEND=" + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + app-text/sgml-common + dev-libs/libxml2:2 + dev-libs/libxslt + =kde-frameworks/karchive-${PVCUT}*:5 +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-5.66.0-docbundledir.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package nls KF5I18n) + ) + + ecm_src_configure +} + +src_test() { + # bug 665622 + local myctestargs=( + -E "(kdoctools_install)" + ) + + ecm_src_test +} |