From 752d6256e5204b958b0ef7905675a940b5e9172f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 12 May 2022 16:42:50 +0300 Subject: gentoo resync : 12.05.2022 --- kde-apps/okular/files/okular-20.11.90-tests.patch | 148 --------------------- .../files/okular-22.04.0-optional-options.patch | 113 ++++++++++++++++ 2 files changed, 113 insertions(+), 148 deletions(-) delete mode 100644 kde-apps/okular/files/okular-20.11.90-tests.patch create mode 100644 kde-apps/okular/files/okular-22.04.0-optional-options.patch (limited to 'kde-apps/okular/files') diff --git a/kde-apps/okular/files/okular-20.11.90-tests.patch b/kde-apps/okular/files/okular-20.11.90-tests.patch deleted file mode 100644 index 633513bd2af3..000000000000 --- a/kde-apps/okular/files/okular-20.11.90-tests.patch +++ /dev/null @@ -1,148 +0,0 @@ -From d9cdea559ffa730fd3592b78f5f8530da3d4c803 Mon Sep 17 00:00:00 2001 -From: Andreas Sturmlechner -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="$") -+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="$") -diff --git a/generators/chm/autotests/chmgeneratortest.cpp b/generators/chm/autotests/chmgeneratortest.cpp -index 18305913e..b28822d68 100644 ---- a/generators/chm/autotests/chmgeneratortest.cpp -+++ b/generators/chm/autotests/chmgeneratortest.cpp -@@ -32,7 +32,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 db14d741f..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}/part/pagepainter.cpp ${CMAKE_SOURCE_DIR}/part/guiutils.cpp ${CMAKE_SOURCE_DIR}/part/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="$") -+ 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..844c9096a ---- /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}/part/pagepainter.cpp ${CMAKE_SOURCE_DIR}/part/guiutils.cpp ${CMAKE_SOURCE_DIR}/part/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="$") -diff --git a/generators/kimgio/tests/kimgiotest.cpp b/generators/kimgio/tests/kimgiotest.cpp -index 2b507ed79..acd70b168 100644 ---- a/generators/kimgio/tests/kimgiotest.cpp -+++ b/generators/kimgio/tests/kimgiotest.cpp -@@ -7,7 +7,7 @@ - * (at your option) any later version. * - ***************************************************************************/ - --#include "../../settings_core.h" -+#include "../../../settings_core.h" - #include "../generator_kimgio.h" - - #include --- -2.29.2 - diff --git a/kde-apps/okular/files/okular-22.04.0-optional-options.patch b/kde-apps/okular/files/okular-22.04.0-optional-options.patch new file mode 100644 index 000000000000..caaf389b670b --- /dev/null +++ b/kde-apps/okular/files/okular-22.04.0-optional-options.patch @@ -0,0 +1,113 @@ +From f29b89d8ac7fcca1cf74462dcc33da24551c924f 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 547671f24..f1e14fa8b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,12 +91,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 +@@ -110,21 +107,19 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS + KIO + ThreadWeaver + WindowSystem +- ${optionalComponents} ++ OPTIONAL_COMPONENTS + DocTools +- JS +- Wallet + ) + + if (BUILD_DESKTOP) + find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS Parts Crash IconThemes TextWidgets) + endif() + +-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 8360bb32b..0871c17ee 100644 +--- a/core/generator.cpp ++++ b/core/generator.cpp +@@ -9,6 +9,7 @@ + */ + + #include "generator.h" ++#include "config-okular.h" + #include "generator_p.h" + #include "observer.h" + +diff --git a/core/scripter.cpp b/core/scripter.cpp +index c60645895..2e6eacc72 100644 +--- a/core/scripter.cpp ++++ b/core/scripter.cpp +@@ -5,6 +5,7 @@ + */ + + #include "scripter.h" ++#include "config-okular.h" + + #include + #include +-- +2.35.1 + -- cgit v1.2.3