From ae098ebeae4d30897deedcdea34fd270f1fc4bc9 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 2 Sep 2021 12:40:46 +0200 Subject: [PATCH] kde-apps/okular: 21.08.1 version bump Signed-off-by: Andreas Sturmlechner --- kde-apps/okular/Manifest | 1 + .../okular-21.08.1-optional-options.patch | 109 +++++++++++++++++ kde-apps/okular/metadata.xml | 1 + kde-apps/okular/okular-21.08.1.ebuild | 111 ++++++++++++++++++ 4 files changed, 222 insertions(+) create mode 100644 kde-apps/okular/files/okular-21.08.1-optional-options.patch create mode 100644 kde-apps/okular/okular-21.08.1.ebuild diff --git a/kde-apps/okular/Manifest b/kde-apps/okular/Manifest index 8a578a2c2cf57..2c76f4031e62f 100644 --- a/kde-apps/okular/Manifest +++ b/kde-apps/okular/Manifest @@ -1,2 +1,3 @@ DIST okular-21.04.3.tar.xz 8052500 BLAKE2B d0bcd358f9da6c0a19c30d036e73736c06e67730d30be6fca64c33a188adbe8bc1f15efba2c62739e88fc3a4dfe4100a9c3588e077f689176f1a0a2ad2f6b59b SHA512 21f34dcef50d15a8816d3898a002133e068ba239d1730892e0d71e58e6196b493544792fa5c06de689fdf1fe7f853586578f3963a64e46a9797484f983814c22 DIST okular-21.08.0.tar.xz 8083288 BLAKE2B 8eae57acf83632c10d202cbe9ff87815d4daabb80f18f09979fe1c19eaa48340c1f7f3c4d71acc81024ae2a3c567844371e3b95cd9fe9a40429dbaacbdf2db62 SHA512 49d0c9ffb3315fd0076f3999a1e066929608c330215eee8670631cca5cebc77ad2ecf9c6e64f7e4f82c29ae664fea32be0ded330e4233c379b165a7655ded984 +DIST okular-21.08.1.tar.xz 8087324 BLAKE2B f73539cde4781cffd986a42da7f4c79928882c2b1f67bf26b6e588ba050c208b732af8fe5646c58a8b8295e7c31a1e6361822347895c15a74faba8ca9939c10b SHA512 bce89cc7280137c2c995eb17ee3ab1d5e214068883971a8bae0bd7cc91e0f6286aaade401283046d0bc3eccb587daa59b7894fcc8b89ebaad94cbb11c8ce5088 diff --git a/kde-apps/okular/files/okular-21.08.1-optional-options.patch b/kde-apps/okular/files/okular-21.08.1-optional-options.patch new file mode 100644 index 0000000000000..71d8df156e516 --- /dev/null +++ b/kde-apps/okular/files/okular-21.08.1-optional-options.patch @@ -0,0 +1,109 @@ +From 54351076f87ce2a43a87427d9c3f3e00539b9fd5 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Tue, 31 Aug 2021 16:48:42 +0200 +Subject: [PATCH] Make WITH_KWALLET and WITH_KJS proper cmake options + +Since I was asked to implement this, might as well make it real options, +not just limited to ANDROID. Even though optional find_package() call is +already being used for KF5Purpose as well. + +KF5DocTools is not made required more often than not. + +See also: https://invent.kde.org/graphics/okular/-/issues/61 +Downstream report: https://bugs.gentoo.org/810958 + +Signed-off-by: Andreas Sturmlechner +--- + CMakeLists.txt | 21 ++++++++------------- + config-okular.h.cmake | 6 ++++++ + core/generator.cpp | 1 + + core/scripter.cpp | 1 + + 4 files changed, 16 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2506c3cfa..984f3695e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,12 +76,9 @@ ecm_setup_qtplugin_macro_names( + PACKAGE_SETUP_AUTOMOC_VARIABLES + ) + +-set(optionalComponents) +-if (ANDROID) +-# we want to make sure that generally all components are found +- +- set(optionalComponents "OPTIONAL_COMPONENTS") +-endif() ++# we want to make sure that generally all components are found ++option(WITH_KWALLET "Build with desktop-wide storage for password support" ON) ++option(WITH_KJS "Build with scripting support" ON) + + find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS + Archive +@@ -98,17 +95,15 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS + TextWidgets + ThreadWeaver + WindowSystem +- ${optionalComponents} ++ OPTIONAL_COMPONENTS + DocTools +- JS +- Wallet + ) + +-if(KF5Wallet_FOUND) +- add_definitions(-DWITH_KWALLET=1) ++if(WITH_KWALLET) ++ find_package(KF5Wallet ${KF5_REQUIRED_VERSION} REQUIRED) + endif() +-if(KF5JS_FOUND) +- add_definitions(-DWITH_KJS=1) ++if(WITH_KJS) ++ find_package(KF5JS ${KF5_REQUIRED_VERSION} REQUIRED) + endif() + + if(NOT WIN32 AND NOT ANDROID) +diff --git a/config-okular.h.cmake b/config-okular.h.cmake +index 905aac9cb..00e45f77c 100644 +--- a/config-okular.h.cmake ++++ b/config-okular.h.cmake +@@ -1,6 +1,12 @@ + /* Defines if force the use DRM in okular */ + #define OKULAR_FORCE_DRM ${_OKULAR_FORCE_DRM} + ++/* Defines if the KJS framework is available */ ++#cmakedefine WITH_KJS ++ ++/* Defines if the kwallet framework is available */ ++#cmakedefine WITH_KWALLET ++ + /* Defines if the purpose framework is available */ + #define PURPOSE_FOUND ${PURPOSE_FOUND} + +diff --git a/core/generator.cpp b/core/generator.cpp +index 051c2c922..f675ebcb3 100644 +--- a/core/generator.cpp ++++ b/core/generator.cpp +@@ -8,6 +8,7 @@ + SPDX-License-Identifier: GPL-2.0-or-later + */ + ++#include "config-okular.h" + #include "generator.h" + #include "generator_p.h" + #include "observer.h" +diff --git a/core/scripter.cpp b/core/scripter.cpp +index c60645895..d5b640dbb 100644 +--- a/core/scripter.cpp ++++ b/core/scripter.cpp +@@ -4,6 +4,7 @@ + SPDX-License-Identifier: GPL-2.0-or-later + */ + ++#include "config-okular.h" + #include "scripter.h" + + #include +-- +2.33.0 + diff --git a/kde-apps/okular/metadata.xml b/kde-apps/okular/metadata.xml index 530e48b08dd11..00b74ac444b0b 100644 --- a/kde-apps/okular/metadata.xml +++ b/kde-apps/okular/metadata.xml @@ -12,6 +12,7 @@ Enable support for Microsoft Compiled HTML Help files Enable E-Book support via app-text/ebook-tools Enable image viewing support + Enable encrypted storage of passwords with kde-frameworks/kwallet Enable Markdown support via app-text/discount Enable mobipocket support Enable Plucker E-Book for Palm OS devices support diff --git a/kde-apps/okular/okular-21.08.1.ebuild b/kde-apps/okular/okular-21.08.1.ebuild new file mode 100644 index 0000000000000..ec6ce64b24978 --- /dev/null +++ b/kde-apps/okular/okular-21.08.1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_HANDBOOK="forceoptional" +ECM_TEST="forceoptional" +PVCUT=$(ver_cut 1-3) +KFMIN=5.84.0 +QTMIN=5.15.2 +VIRTUALX_REQUIRED="test" +inherit ecm kde.org + +DESCRIPTION="Universal document viewer based on KDE Frameworks" +HOMEPAGE="https://okular.kde.org https://apps.kde.org/okular/" + +LICENSE="GPL-2" # TODO: CHECK +SLOT="5" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="chm djvu epub +image-backend kwallet markdown mobi +pdf +plucker +postscript qml 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/ki18n-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/kjs-${KFMIN}:5 + >=kde-frameworks/kparts-${KFMIN}:5 + >=kde-frameworks/kpty-${KFMIN}:5 + >=kde-frameworks/ktextwidgets-${KFMIN}:5 + >=kde-frameworks/threadweaver-${KFMIN}:5 + media-libs/freetype + >=media-libs/phonon-4.11.0 + sys-libs/zlib + chm? ( + dev-libs/chmlib + dev-libs/libzip:= + >=kde-frameworks/khtml-${KFMIN}:5 + ) + djvu? ( app-text/djvu ) + epub? ( app-text/ebook-tools ) + image-backend? ( + >=dev-qt/qtgui-${QTMIN}:5[gif,jpeg,png] + >=kde-apps/libkexiv2-${PVCUT}:5 + ) + kwallet? ( >=kde-frameworks/kwallet-${KFMIN}:5 ) + markdown? ( app-text/discount ) + mobi? ( >=kde-apps/kdegraphics-mobipocket-${PVCUT}:5 ) + pdf? ( app-text/poppler[nss,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 ) + qml? ( + >=dev-qt/qtquickcontrols2-${QTMIN}:5 + >=kde-frameworks/kirigami-${KFMIN}:5 + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-20.11.90-tests.patch" # bug 734138 + "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry + "${FILESDIR}/${P}-optional-options.patch" # bug 810958 +) + +src_configure() { + local mycmakeargs=( + -DOKULAR_UI=$(usex qml "both" "desktop") + $(cmake_use_find_package chm CHM) + $(cmake_use_find_package chm KF5KHtml) + $(cmake_use_find_package chm LibZip) + $(cmake_use_find_package djvu DjVuLibre) + $(cmake_use_find_package epub EPub) + $(cmake_use_find_package image-backend KF5KExiv2) + -DWITH_KWALLET=$(usex kwallet) + $(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, annotationtoolbartest fails, KDE-Bug #429640 + local myctestargs=( + -E "(mainshelltest|chmgeneratortest|parttest|annotationtoolbartest)" + ) + + ecm_src_test +}