summaryrefslogtreecommitdiff
path: root/media-gfx/okularpart/files
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/okularpart/files')
-rw-r--r--media-gfx/okularpart/files/okularpart-23.08.5-crashfix.patch86
-rw-r--r--media-gfx/okularpart/files/okularpart-23.08.5-only.patch35
-rw-r--r--media-gfx/okularpart/files/okularpart-23.08.5-tests.patch48
3 files changed, 169 insertions, 0 deletions
diff --git a/media-gfx/okularpart/files/okularpart-23.08.5-crashfix.patch b/media-gfx/okularpart/files/okularpart-23.08.5-crashfix.patch
new file mode 100644
index 000000000000..f05906668cae
--- /dev/null
+++ b/media-gfx/okularpart/files/okularpart-23.08.5-crashfix.patch
@@ -0,0 +1,86 @@
+From 7f639c28262455226da4db9d9630a48fea99e0f4 Mon Sep 17 00:00:00 2001
+From: Carl Schwan <carl@carlschwan.eu>
+Date: Tue, 5 Mar 2024 16:08:58 +0100
+Subject: [PATCH] Fix crash when in embedded dummy mode
+
+This is an issue for Kile as they use Okular in the "dummy mode" which
+doesn't include the annotation tool.
+
+BUG: 476207
+---
+ part/pageview.cpp | 24 ++++++++++++++++++------
+ 1 file changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/part/pageview.cpp b/part/pageview.cpp
+index c5c1d3e55c..c01c5488c6 100644
+--- a/part/pageview.cpp
++++ b/part/pageview.cpp
+@@ -5084,7 +5084,9 @@ void PageView::slotSetMouseNormal()
+ // force an update of the cursor
+ updateCursor();
+ Okular::Settings::self()->save();
+- d->annotator->detachAnnotation();
++ if (d->annotator) {
++ d->annotator->detachAnnotation();
++ }
+ }
+
+ void PageView::slotSetMouseZoom()
+@@ -5096,7 +5098,9 @@ void PageView::slotSetMouseZoom()
+ // force an update of the cursor
+ updateCursor();
+ Okular::Settings::self()->save();
+- d->annotator->detachAnnotation();
++ if (d->annotator) {
++ d->annotator->detachAnnotation();
++ }
+ }
+
+ void PageView::slotSetMouseMagnifier()
+@@ -5108,7 +5112,9 @@ void PageView::slotSetMouseMagnifier()
+ // force an update of the cursor
+ updateCursor();
+ Okular::Settings::self()->save();
+- d->annotator->detachAnnotation();
++ if (d->annotator) {
++ d->annotator->detachAnnotation();
++ }
+ }
+
+ void PageView::slotSetMouseSelect()
+@@ -5120,7 +5126,9 @@ void PageView::slotSetMouseSelect()
+ // force an update of the cursor
+ updateCursor();
+ Okular::Settings::self()->save();
+- d->annotator->detachAnnotation();
++ if (d->annotator) {
++ d->annotator->detachAnnotation();
++ }
+ }
+
+ void PageView::slotSetMouseTextSelect()
+@@ -5132,7 +5140,9 @@ void PageView::slotSetMouseTextSelect()
+ // force an update of the cursor
+ updateCursor();
+ Okular::Settings::self()->save();
+- d->annotator->detachAnnotation();
++ if (d->annotator) {
++ d->annotator->detachAnnotation();
++ }
+ }
+
+ void PageView::slotSetMouseTableSelect()
+@@ -5144,7 +5154,9 @@ void PageView::slotSetMouseTableSelect()
+ // force an update of the cursor
+ updateCursor();
+ Okular::Settings::self()->save();
+- d->annotator->detachAnnotation();
++ if (d->annotator) {
++ d->annotator->detachAnnotation();
++ }
+ }
+
+ void PageView::showNoSigningCertificatesDialog(bool nonDateValidCerts)
+--
+GitLab
+
diff --git a/media-gfx/okularpart/files/okularpart-23.08.5-only.patch b/media-gfx/okularpart/files/okularpart-23.08.5-only.patch
new file mode 100644
index 000000000000..7b62867610bf
--- /dev/null
+++ b/media-gfx/okularpart/files/okularpart-23.08.5-only.patch
@@ -0,0 +1,35 @@
+From e3baad173b95ad75afe9d339c4a86d030b67f4be Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 10 Mar 2024 21:37:44 +0100
+Subject: [PATCH] Disable bits we don't need for okularpart only
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c47d6ab0f..91f25c62e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -184,7 +184,7 @@ if (BUILD_MOBILE)
+ )
+ endif()
+
+-if(NOT WIN32 AND NOT ANDROID AND NOT APPLE)
++if(0)
+ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
+ Activities
+ )
+@@ -303,7 +303,7 @@ endif()
+ add_subdirectory( icons ) # an own directory for multi-size icons retrieved by KIconThemeLoader
+ add_subdirectory( part )
+ if(BUILD_DESKTOP)
+- add_subdirectory( shell )
++# add_subdirectory( shell )
+ endif()
+ add_subdirectory( generators )
+
+--
+2.44.0
+
diff --git a/media-gfx/okularpart/files/okularpart-23.08.5-tests.patch b/media-gfx/okularpart/files/okularpart-23.08.5-tests.patch
new file mode 100644
index 000000000000..8fc477be875a
--- /dev/null
+++ b/media-gfx/okularpart/files/okularpart-23.08.5-tests.patch
@@ -0,0 +1,48 @@
+From 323fed918995fe2e01036c74c1498446b4d2f122 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/comicbook/CMakeLists.txt | 10 +++-------
+ generators/comicbook/autotests/CMakeLists.txt | 6 ++++++
+ 8 files changed, 27 insertions(+), 18 deletions(-)
+ create mode 100644 generators/chm/autotests/CMakeLists.txt
+ create mode 100644 generators/comicbook/autotests/CMakeLists.txt
+
+diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
+index a0e7569a2..91bcc6ec7 100644
+--- a/generators/comicbook/CMakeLists.txt
++++ b/generators/comicbook/CMakeLists.txt
+@@ -25,13 +25,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
++)
+--
+2.33.0
+