summaryrefslogtreecommitdiff
path: root/kde-apps/okular
diff options
context:
space:
mode:
Diffstat (limited to 'kde-apps/okular')
-rw-r--r--kde-apps/okular/Manifest7
-rw-r--r--kde-apps/okular/files/okular-tests.patch112
-rw-r--r--kde-apps/okular/metadata.xml6
-rw-r--r--kde-apps/okular/okular-17.12.0.ebuild101
4 files changed, 222 insertions, 4 deletions
diff --git a/kde-apps/okular/Manifest b/kde-apps/okular/Manifest
index d7debe416e7f..5455bc38d366 100644
--- a/kde-apps/okular/Manifest
+++ b/kde-apps/okular/Manifest
@@ -1,4 +1,7 @@
AUX okular-17.08.3-cmake-3.10.patch 1615 BLAKE2B fa352ae2212f04ce20968fcc54906eb6cb96708d076c2a9e2b9ba95a8aeccbceedbf131b698d07e7a391e3e8ccbbb85422cb8937731116348f16e5163810e605 SHA512 2f06c6b54bba5241b3d5b72724363b3acc5554d314ea8bb5d77b0fd28963283cceee1c81627f6701ba2afd8e88f1239a14b05fea7271148bde55e4bc6d93adb1
-DIST okular-17.08.3.tar.xz 5618588 SHA256 d32e69b6be2a10d0eadc6f616be53dc8dd372c9123a6311628ac3f97b69054fd SHA512 33b8f1bbf1f4c5814b6df8bfd87a3deccc762564f312729a50956c85fc95f1ce9f057a8b43b51a368a3f0c2a4d9705dde09d1e575f7325ae32420c0106ce28b0 WHIRLPOOL a7288ad83ea6c0fc0590dbb9fb9bdf4d341375d922605ea07070ce67c47e0854c633be473f4b600a5a977a99cafa339fbae9c5aff0670eed2b9ffcdbe55a600e
+AUX okular-tests.patch 5197 BLAKE2B 8173bc550940cc783186e48794a911ed1fdc6015d48b1897d0cea1abee137f63ff9441c3c51c26b4bcd52c668046b37cb601a00e7192f5cd714d65606c5a4f38 SHA512 993fb48d8e2f51da617fa8a36ea20b479ff9c88e7aa848f52b6eda68ec58c4fe79876369ba3500009443d0ae970284c0a37da39ae39cfd6d48d767f3eb6dae96
+DIST okular-17.08.3.tar.xz 5618588 BLAKE2B b9f36211ba2620bcd984e715c37112d92f56c0f8d1d1298d54db3092fe205ac4abef18cf64756b81ac20e91fcbfe6dc18fbe6de682cc71caf0f24be4d2b7c15e SHA512 33b8f1bbf1f4c5814b6df8bfd87a3deccc762564f312729a50956c85fc95f1ce9f057a8b43b51a368a3f0c2a4d9705dde09d1e575f7325ae32420c0106ce28b0
+DIST okular-17.12.0.tar.xz 5718956 BLAKE2B aaefd5dc57ef63a0fa968ab8b1e3970199541dedf01c8864ebb05dc5aaee62f666d2150767b423f83cadff355174440b06c2e84c5e5e016f098d38febf1438d2 SHA512 f1b53fbbbc5cbb614a5cb3410c7c8749b785d140927c34a0a52864b44635b09094a4948589b8dbe019e4f34e4a369e0e4e0c0ecd057198a0f6acdcba8e131d1b
EBUILD okular-17.08.3.ebuild 2545 BLAKE2B 4c5ea67e0e889c61c6fc140e7481f1f95453a6e60094653bc92fe1d33eb5a4d4a5728dbf181c7cd7392ceb3e4516b856ebccca3511f48e07ccaaa849712c3c2d SHA512 98fa1c9da0dd4e106bd8e17d1750e80df925eb3dab91120a6981f915de007cb4fa41d12faacea41a3b7de8b9bdbf40f3a493e7dcf51c8c1b57b456fb705e8147
-MISC metadata.xml 738 BLAKE2B 8566dbe2adbe81daaccfd8fef9ab8b19c4ecf1970ab77958eedf5859ba8af8095b5c9811eb566a667770d457807806145b0c2277952a7fd604a428f49d89129e SHA512 cb722697cc24b68eeebed77f1c637be465e287a01627d58d76e6fb597319d2443acbe14389eaa2c8e8f4c24a78b1df005569b95f21d3122465092b4524ab5086
+EBUILD okular-17.12.0.ebuild 2861 BLAKE2B bc38d3b396791ff6a42d8060e89b60d37a980aef352dfcaf08f47b0f035a8d7103f12b6b7431cbd702b6b4fc7502d2fd4fcd6549951737072c6d1143cb65f56d SHA512 8b4e9eab90942a2e71c830ccc78fcf7764d87d6e2ac782a3d260f46a49f28161400ea2264daf38e27479f6b28c98d25b9a84c6c99fce25c96b37d3b68905ec39
+MISC metadata.xml 926 BLAKE2B e2afad30e18aa62424c2f3bfdb6b3904fe8fdacc7540b05ebe16381bb39ffaa2c93a97706bd264f0a2a2497ed1d1a7171fe971eab6642410f0555c639af32c93 SHA512 badde2fb8455146d7d0e320290900417eac11c4a07b222fcc6efd56e9291ff10a95df26169498cc5018c906c109cc78c626eac0c8e67c3f535be563abf169062
diff --git a/kde-apps/okular/files/okular-tests.patch b/kde-apps/okular/files/okular-tests.patch
new file mode 100644
index 000000000000..0e2cdaecd4af
--- /dev/null
+++ b/kde-apps/okular/files/okular-tests.patch
@@ -0,0 +1,112 @@
+From 5f093fa9798ad30cda115cea573d18296696a0a9 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/kimgio/CMakeLists.txt | 6 +-----
+ generators/kimgio/tests/CMakeLists.txt | 5 +++++
+ generators/kimgio/tests/kimgiotest.cpp | 2 +-
+ 6 files changed, 19 insertions(+), 16 deletions(-)
+ create mode 100644 generators/chm/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 6b0b8efc7..25fd6631a 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( 0 );
+- 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/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 b3039a6bb..78608df9d 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.14.2
+
diff --git a/kde-apps/okular/metadata.xml b/kde-apps/okular/metadata.xml
index 386d732f69b1..21ae2823da0f 100644
--- a/kde-apps/okular/metadata.xml
+++ b/kde-apps/okular/metadata.xml
@@ -7,11 +7,13 @@
</maintainer>
<use>
<flag name="chm">Enable support for Microsoft Compiled HTML Help files</flag>
- <flag name="epub">Add E-Book support via <pkg>app-text/ebook-tools</pkg></flag>
+ <flag name="epub">Enable E-Book support via <pkg>app-text/ebook-tools</pkg></flag>
<flag name="image-backend">Enable image viewing support</flag>
- <flag name="mobi">Add mobipocket support</flag>
+ <flag name="markdown">Enable Markdown support via <pkg>app-text/discount</pkg></flag>
+ <flag name="mobi">Enable mobipocket support</flag>
<flag name="mobile">Enable Plasma mobile support</flag>
<flag name="plucker">Enable Plucker E-Book for Palm OS devices support</flag>
+ <flag name="share">Enable support for a share menu using <pkg>dev-libs/purpose</pkg></flag>
<flag name="speech">Enable text-to-speech support</flag>
</use>
</pkgmetadata>
diff --git a/kde-apps/okular/okular-17.12.0.ebuild b/kde-apps/okular/okular-17.12.0.ebuild
new file mode 100644
index 000000000000..121506447bee
--- /dev/null
+++ b/kde-apps/okular/okular-17.12.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="forceoptional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Universal document viewer based on KDE Frameworks"
+HOMEPAGE="https://okular.kde.org https://www.kde.org/applications/graphics/okular"
+KEYWORDS="~amd64 ~x86"
+IUSE="chm crypt djvu epub +image-backend markdown mobi mobile +pdf plucker +postscript share speech +tiff"
+
+DEPEND="
+ $(add_frameworks_dep kactivities)
+ $(add_frameworks_dep karchive)
+ $(add_frameworks_dep kbookmarks)
+ $(add_frameworks_dep kcompletion)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kjs)
+ $(add_frameworks_dep kparts)
+ $(add_frameworks_dep kpty)
+ $(add_frameworks_dep kwallet)
+ $(add_frameworks_dep threadweaver)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtprintsupport)
+ $(add_qt_dep qtsvg)
+ $(add_qt_dep qtwidgets)
+ media-libs/freetype
+ media-libs/phonon[qt5(+)]
+ sys-libs/zlib
+ chm? (
+ $(add_frameworks_dep khtml)
+ dev-libs/chmlib
+ )
+ crypt? ( app-crypt/qca:2[qt5] )
+ djvu? ( app-text/djvu )
+ epub? ( app-text/ebook-tools )
+ image-backend? (
+ $(add_kdeapps_dep libkexiv2)
+ $(add_qt_dep qtgui 'gif,jpeg,png')
+ )
+ markdown? ( app-text/discount )
+ mobi? ( $(add_kdeapps_dep kdegraphics-mobipocket) )
+ pdf? ( app-text/poppler[qt5,-exceptions(-)] )
+ plucker? ( virtual/jpeg:0 )
+ postscript? ( app-text/libspectre )
+ share? ( dev-libs/purpose:5 )
+ speech? ( $(add_qt_dep qtspeech) )
+ tiff? ( media-libs/tiff:0 )
+"
+RDEPEND="${DEPEND}
+ image-backend? ( $(add_frameworks_dep kimageformats) )
+ mobile? (
+ $(add_frameworks_dep kirigami)
+ $(add_qt_dep qtquickcontrols)
+ )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-tests.patch" )
+
+src_prepare() {
+ kde5_src_prepare
+ use mobile || cmake_comment_add_subdirectory mobile
+ use test || cmake_comment_add_subdirectory conf/autotests
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package chm CHM)
+ $(cmake-utils_use_find_package crypt Qca-qt5)
+ $(cmake-utils_use_find_package djvu DjVuLibre)
+ $(cmake-utils_use_find_package epub EPub)
+ $(cmake-utils_use_find_package image-backend KF5KExiv2)
+ $(cmake-utils_use_find_package markdown Discount)
+ $(cmake-utils_use_find_package mobi QMobipocket)
+ $(cmake-utils_use_find_package pdf Poppler)
+ $(cmake-utils_use_find_package plucker JPEG)
+ $(cmake-utils_use_find_package postscript LibSpectre)
+ $(cmake-utils_use_find_package share KDEExperimentalPurpose)
+ $(cmake-utils_use_find_package speech Qt5TextToSpeech)
+ $(cmake-utils_use_find_package tiff TIFF)
+ )
+
+ kde5_src_configure
+}
+
+src_test() {
+ # mainshelltest hangs, chmgeneratortest fails, bug #603116
+ local myctestargs=(
+ -E "(mainshelltest|chmgeneratortest)"
+ )
+
+ kde5_src_test
+}