diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-30 12:37:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-30 12:37:28 +0100 |
commit | be9d77d3ac6af8f4ead98d89706f356b65578c93 (patch) | |
tree | f82923fbca262493e83dd1382e561a2fae24cc46 /kde-apps/okular | |
parent | 7ec0832ab5dafbf70de83e0c2f3ee740416a0950 (diff) | |
parent | 6faaec2b812feecd9c8751b8a19004da4a17ea5b (diff) |
Merge branch 'edge' into next
Diffstat (limited to 'kde-apps/okular')
-rw-r--r-- | kde-apps/okular/Manifest | 3 | ||||
-rw-r--r-- | kde-apps/okular/files/okular-20.03.70-tests.patch | 148 | ||||
-rw-r--r-- | kde-apps/okular/okular-20.04.0.ebuild | 112 |
3 files changed, 263 insertions, 0 deletions
diff --git a/kde-apps/okular/Manifest b/kde-apps/okular/Manifest index fcf863d6148d..6e3c0265e5a4 100644 --- a/kde-apps/okular/Manifest +++ b/kde-apps/okular/Manifest @@ -1,6 +1,9 @@ AUX okular-18.08.0-tests.patch 5197 BLAKE2B 8173bc550940cc783186e48794a911ed1fdc6015d48b1897d0cea1abee137f63ff9441c3c51c26b4bcd52c668046b37cb601a00e7192f5cd714d65606c5a4f38 SHA512 993fb48d8e2f51da617fa8a36ea20b479ff9c88e7aa848f52b6eda68ec58c4fe79876369ba3500009443d0ae970284c0a37da39ae39cfd6d48d767f3eb6dae96 AUX okular-18.12.0-tests.patch 568 BLAKE2B ad0a70fb37b513df846b0831d2335917817e12f63dcdc46955618de6e07ccca72c9e8378f625deabd11ab174fddc5122f68237decd3402cb5b402e5b21fe55e9 SHA512 29d9271e4165fa4f3d1cf02cb00e32be662f5ae39b77fdf9f7d9ccfa24dcded5d38cd7b9fe1a1c6e65021faa77504663dd5030506baffdbc3f449bc67f6b21d8 AUX okular-19.12.3-CVE-2020-9359.patch 902 BLAKE2B 644004775b9a66637ed75697524c6f0b2a8077fae7cfcf36a063b46e2f921946c285319740e6debef25b2ea93c18ad5dc8c9b739b8950af305416416517849b5 SHA512 2d8870f1aa63defcf2ecfd42c0dfb0d474af6885c2448566704795d7caa2e9c20e5ede284db58139ea5736d5d0074d23c023a89f359d09fd6051d1f03f561903 +AUX okular-20.03.70-tests.patch 6613 BLAKE2B 46bbb80b1b97bc92ed0c17ae352a977710d7234eb85c647356d9593a138f6c872960511c7f8d8eb24e060b2ffecb0cc5b1bf79ed198ba10e43fb341c1cdc6e5a SHA512 c1a283888b612950eda1080d941f157651b8e52c4032b5fc46786ab45045c5e8d272769516a90cf652a384519b2fe046ec951dc45c4edfb5258c50112b8d2ed2 DIST okular-19.12.3.tar.xz 7208888 BLAKE2B c98e6708d5784ce2dc976de0b205681cc34c0a6b5684e408267da05ba335fa4e9c064eec393dc080dd97f06f38ef665aba9354787d2e42d13312b4820836f168 SHA512 ccc3c357fefe04691bba7bc803321789c3a1fdad4cfc610e9c425b2373efd94340fa2ceb2e357569ad14f1c0c69ef0db8079d9bc082a6d5708ccbfb3b65d8b3d +DIST okular-20.04.0.tar.xz 7236816 BLAKE2B 7c95bccbb351354008a43581d5764b55e8025333063a527af9154d4bbfb28f117a2f3eb3578732727465c35cc163dee01ce94981f92ccfac832d0951bbcc2d07 SHA512 97d999618cb6042108a420963154cccbc67e2cf96c0afef4ffb46c7c2cfbf976a316cc277cd78e7e67af7f405b4426cb6edb6cd51c736a1a5071fdb428d3b55d EBUILD okular-19.12.3-r1.ebuild 3205 BLAKE2B c000e95e21e6637b94a9afab498a98b27b6e9ca25f53b2e59a6d1fb5763dbd29ea3beeb1daf6d1991bb6ac15b49af7fca1c0535847795d8503c00636315d682c SHA512 90eecfadef6170fe4d0ef1a9ea4c86cf43de8d693cf48568ee7ac5b60d05f4402bbf61b48d497d167a3beb3100214754149d1ebf571ce8d33b983c586149de3f +EBUILD okular-20.04.0.ebuild 3144 BLAKE2B 5b01afedeb08de96658fd9d33fb3a49914117e717e4433fe3183a2921a031717488ca5e620a2fce5fe5845e8cd39cd86ee382a15d8970d767ba9aa7bd3d2413d SHA512 ec9877a7e35c7434bff28d6df5ff60246b23e78c4bddab9524af232b888ac8b814180cc74ecc1f5fec371b6d03906d0e2c986fbaa02a59b28ff9b232b21b5731 MISC metadata.xml 932 BLAKE2B 456a0365909d541af476ce468c18b0446bd0843d0f4cf4babcfefea66e39ce27a1e0dbc513b9e28b97259232fcdd645e977fc6ebd453c8d418ce9319b3e5d806 SHA512 b5083af937d991ba200bf5044e2cb5206d7ede82043bfcde7b94a2503da3a63f3b356403cf85287fdf76cca61d152a49e1847aa6161fd0837f261b019debc53e diff --git a/kde-apps/okular/files/okular-20.03.70-tests.patch b/kde-apps/okular/files/okular-20.03.70-tests.patch new file mode 100644 index 000000000000..d906e2a00f30 --- /dev/null +++ b/kde-apps/okular/files/okular-20.03.70-tests.patch @@ -0,0 +1,148 @@ +From c675ba8bed1e792f351fabf3ba040a86138f9f84 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com> +Date: Thu, 12 Oct 2017 14:09:09 +0200 +Subject: [PATCH] Move tests into existing (auto)tests subdirectories + +--- + generators/chm/CMakeLists.txt | 12 +++--------- + generators/chm/autotests/CMakeLists.txt | 8 ++++++++ + generators/chm/autotests/chmgeneratortest.cpp | 2 +- + generators/comicbook/CMakeLists.txt | 10 +++------- + generators/comicbook/autotests/CMakeLists.txt | 6 ++++++ + generators/kimgio/CMakeLists.txt | 6 +----- + generators/kimgio/tests/CMakeLists.txt | 5 +++++ + generators/kimgio/tests/kimgiotest.cpp | 2 +- + 8 files changed, 28 insertions(+), 23 deletions(-) + create mode 100644 generators/chm/autotests/CMakeLists.txt + create mode 100644 generators/comicbook/autotests/CMakeLists.txt + create mode 100644 generators/kimgio/tests/CMakeLists.txt + +diff --git a/generators/chm/CMakeLists.txt b/generators/chm/CMakeLists.txt +index 9d82b9394..b3a33afe4 100644 +--- a/generators/chm/CMakeLists.txt ++++ b/generators/chm/CMakeLists.txt +@@ -30,15 +30,9 @@ set(okularGenerator_chmlib_SRCS + okular_add_generator(okularGenerator_chmlib ${okularGenerator_chmlib_SRCS}) + target_link_libraries(okularGenerator_chmlib okularcore ${CHM_LIBRARY} ${LIBZIP_LIBRARY} KF5::KHtml) + +-########### autotests ############### +- +-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) +-ecm_add_test(autotests/chmgeneratortest.cpp +- TEST_NAME "chmgeneratortest" +- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore +-) +- +-target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>") ++if(BUILD_TESTING) ++ add_subdirectory(autotests) ++endif() + + ########### install files ############### + install( FILES okularChm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) +diff --git a/generators/chm/autotests/CMakeLists.txt b/generators/chm/autotests/CMakeLists.txt +new file mode 100644 +index 000000000..59753ca45 +--- /dev/null ++++ b/generators/chm/autotests/CMakeLists.txt +@@ -0,0 +1,8 @@ ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) ++ ++ecm_add_test(chmgeneratortest.cpp ++ TEST_NAME "chmgeneratortest" ++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore ++) ++ ++target_compile_definitions(chmgeneratortest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_chmlib>") +diff --git a/generators/chm/autotests/chmgeneratortest.cpp b/generators/chm/autotests/chmgeneratortest.cpp +index 9245a736f..5a2c487b4 100644 +--- a/generators/chm/autotests/chmgeneratortest.cpp ++++ b/generators/chm/autotests/chmgeneratortest.cpp +@@ -34,7 +34,7 @@ void ChmGeneratorTest::initTestCase() + { + Okular::SettingsCore::instance( QStringLiteral("ChmGeneratorTest") ); + m_document = new Okular::Document( nullptr ); +- const QString testFile = QStringLiteral(KDESRCDIR "autotests/data/test.chm"); ++ const QString testFile = QStringLiteral(KDESRCDIR "data/test.chm"); + QMimeDatabase db; + const QMimeType mime = db.mimeTypeForFile( testFile ); + QCOMPARE( m_document->openDocument(testFile, QUrl(), mime), Okular::Document::OpenSuccess ); +diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt +index 9a07c7183..316c93152 100644 +--- a/generators/comicbook/CMakeLists.txt ++++ b/generators/comicbook/CMakeLists.txt +@@ -29,13 +29,9 @@ if (KArchive_HAVE_LZMA) + target_compile_definitions(okular_comicbook PRIVATE -DWITH_K7ZIP=1) + endif() + +-########### autotests ############### +- +-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) +-ecm_add_test(autotests/comicbooktest.cpp +- TEST_NAME "comicbooktest" +- LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook +-) ++if(BUILD_TESTING) ++ add_subdirectory(autotests) ++endif() + + ########### install files ############### + install( FILES okularComicbook.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) +diff --git a/generators/comicbook/autotests/CMakeLists.txt b/generators/comicbook/autotests/CMakeLists.txt +new file mode 100644 +index 000000000..aaacb341a +--- /dev/null ++++ b/generators/comicbook/autotests/CMakeLists.txt +@@ -0,0 +1,6 @@ ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) ++ ++ecm_add_test(comicbooktest.cpp ++ TEST_NAME "comicbooktest" ++ LINK_LIBRARIES Qt5::Test KF5::CoreAddons okularcore okular_comicbook ++) +diff --git a/generators/kimgio/CMakeLists.txt b/generators/kimgio/CMakeLists.txt +index b8cac76df..49f893bc1 100644 +--- a/generators/kimgio/CMakeLists.txt ++++ b/generators/kimgio/CMakeLists.txt +@@ -13,13 +13,9 @@ okular_add_generator(okularGenerator_kimgio generator_kimgio.cpp) + target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n) + + if(BUILD_TESTING) +- add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" ) +- 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 ) +- ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) +- target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>") ++ add_subdirectory(tests) + endif() + +- + ########### install files ############### + install( FILES okularKimgio.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) + install( PROGRAMS okularApplication_kimgio.desktop org.kde.mobile.okular_kimgio.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) +diff --git a/generators/kimgio/tests/CMakeLists.txt b/generators/kimgio/tests/CMakeLists.txt +new file mode 100644 +index 000000000..f31bf3fe8 +--- /dev/null ++++ b/generators/kimgio/tests/CMakeLists.txt +@@ -0,0 +1,5 @@ ++add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" ) ++ ++set( kimgiotest_SRCS kimgiotest.cpp ${CMAKE_SOURCE_DIR}/ui/pagepainter.cpp ${CMAKE_SOURCE_DIR}/ui/guiutils.cpp ${CMAKE_SOURCE_DIR}/ui/debug_ui.cpp ) ++ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test) ++target_compile_definitions(kimgiotest PRIVATE -DGENERATOR_PATH="$<TARGET_FILE:okularGenerator_kimgio>") +diff --git a/generators/kimgio/tests/kimgiotest.cpp b/generators/kimgio/tests/kimgiotest.cpp +index f2e50641d..a24f7af80 100644 +--- a/generators/kimgio/tests/kimgiotest.cpp ++++ b/generators/kimgio/tests/kimgiotest.cpp +@@ -9,7 +9,7 @@ + + + #include "../generator_kimgio.h" +-#include "../../settings_core.h" ++#include "../../../settings_core.h" + + #include <core/observer.h> + #include <core/page.h> +-- +2.25.1 + diff --git a/kde-apps/okular/okular-20.04.0.ebuild b/kde-apps/okular/okular-20.04.0.ebuild new file mode 100644 index 000000000000..4604e290db83 --- /dev/null +++ b/kde-apps/okular/okular-20.04.0.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ECM_HANDBOOK="forceoptional" +ECM_TEST="forceoptional" +PVCUT=$(ver_cut 1-3) +KFMIN=5.69.0 +QTMIN=5.12.3 +VIRTUALX_REQUIRED="test" +inherit ecm kde.org + +DESCRIPTION="Universal document viewer based on KDE Frameworks" +HOMEPAGE="https://okular.kde.org https://kde.org/applications/office/org.kde.okular" + +LICENSE="GPL-2" # TODO: CHECK +SLOT="5" +KEYWORDS="~amd64 ~ppc64" +IUSE="chm crypt djvu epub +image-backend markdown mobi mobile +pdf plucker +postscript share speech +tiff" + +DEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtprintsupport-${QTMIN}:5 + >=dev-qt/qtsvg-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kactivities-${KFMIN}:5 + >=kde-frameworks/karchive-${KFMIN}:5 + >=kde-frameworks/kbookmarks-${KFMIN}:5 + >=kde-frameworks/kcompletion-${KFMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kcrash-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/kjs-${KFMIN}:5 + >=kde-frameworks/kparts-${KFMIN}:5 + >=kde-frameworks/kpty-${KFMIN}:5 + >=kde-frameworks/kwallet-${KFMIN}:5 + >=kde-frameworks/threadweaver-${KFMIN}:5 + media-libs/freetype + media-libs/phonon[qt5(+)] + sys-libs/zlib + chm? ( + dev-libs/chmlib + >=kde-frameworks/khtml-${KFMIN}:5 + ) + crypt? ( app-crypt/qca:2[qt5(+)] ) + djvu? ( app-text/djvu ) + epub? ( app-text/ebook-tools ) + image-backend? ( + >=dev-qt/qtgui-${QTMIN}:5[gif,jpeg,png] + >=kde-apps/libkexiv2-${PVCUT}:5 + ) + markdown? ( app-text/discount ) + mobi? ( >=kde-apps/kdegraphics-mobipocket-${PVCUT}:5 ) + pdf? ( app-text/poppler[qt5] ) + plucker? ( virtual/jpeg:0 ) + postscript? ( app-text/libspectre ) + share? ( >=kde-frameworks/purpose-${KFMIN}:5 ) + speech? ( >=dev-qt/qtspeech-${QTMIN}:5 ) + tiff? ( media-libs/tiff:0 ) +" +RDEPEND="${DEPEND} + image-backend? ( >=kde-frameworks/kimageformats-${KFMIN}:5 ) + mobile? ( + >=dev-qt/qtquickcontrols-${QTMIN}:5 + >=kde-frameworks/kirigami-${KFMIN}:5 + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-18.12.0-tests.patch" + "${FILESDIR}/${PN}-20.03.70-tests.patch" +) + +src_prepare() { + ecm_src_prepare + use mobile || cmake_comment_add_subdirectory mobile + use test || cmake_comment_add_subdirectory conf/autotests +} + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package chm CHM) + $(cmake_use_find_package crypt Qca-qt5) + $(cmake_use_find_package djvu DjVuLibre) + $(cmake_use_find_package epub EPub) + $(cmake_use_find_package image-backend KF5KExiv2) + $(cmake_use_find_package markdown Discount) + $(cmake_use_find_package mobi QMobipocket) + $(cmake_use_find_package pdf Poppler) + $(cmake_use_find_package plucker JPEG) + $(cmake_use_find_package postscript LibSpectre) + $(cmake_use_find_package share KF5Purpose) + $(cmake_use_find_package speech Qt5TextToSpeech) + $(cmake_use_find_package tiff TIFF) + ) + + ecm_src_configure +} + +src_test() { + # mainshelltest hangs, chmgeneratortest fails, bug #603116 + # parttest hangs, bug #641728 + local myctestargs=( + -E "(mainshelltest|chmgeneratortest|parttest)" + ) + + ecm_src_test +} |