aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-11-18 22:57:21 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2024-11-20 17:09:20 +0100
commitff49342cf73aa9cc2908dc47aa39a05225514432 (patch)
treefaf68e295c2bc5d9b494e901c5b0e72941d3e2aa
parentkde-plasma/plasma-desktop: Fixup patch (diff)
downloadkde-ff49342cf73aa9cc2908dc47aa39a05225514432.tar.gz
kde-ff49342cf73aa9cc2908dc47aa39a05225514432.tar.bz2
kde-ff49342cf73aa9cc2908dc47aa39a05225514432.zip
kde-apps/okular: Switch tests.patch to upstreamed change
Upstream commit b20b87743dda8647484dc5a4db62ad6d92cc22d8 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--kde-apps/okular/files/okular-24.04.80-tests.patch46
-rw-r--r--kde-apps/okular/files/okular-24.11.80-tests.patch83
-rw-r--r--kde-apps/okular/okular-24.11.80.ebuild4
-rw-r--r--kde-apps/okular/okular-24.12.49.9999.ebuild4
-rw-r--r--kde-apps/okular/okular-9999.ebuild3
5 files changed, 88 insertions, 52 deletions
diff --git a/kde-apps/okular/files/okular-24.04.80-tests.patch b/kde-apps/okular/files/okular-24.04.80-tests.patch
deleted file mode 100644
index b36ab68432..0000000000
--- a/kde-apps/okular/files/okular-24.04.80-tests.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 3f90abab39233c2fb56b7cb3b95d552c0ca1146d Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Tue, 19 Dec 2023 10:13:52 +0100
-Subject: [PATCH] Move tests into existing (auto)tests subdirectories
-
-Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
----
- generators/comicbook/CMakeLists.txt | 9 +++------
- generators/comicbook/autotests/CMakeLists.txt | 5 +++++
- 2 files changed, 8 insertions(+), 6 deletions(-)
- create mode 100644 generators/comicbook/autotests/CMakeLists.txt
-
-diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
-index 53075836d..c601e9d7b 100644
---- a/generators/comicbook/CMakeLists.txt
-+++ b/generators/comicbook/CMakeLists.txt
-@@ -29,12 +29,9 @@ else()
- endif()
-
- ########### autotests ###############
--
--add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
--ecm_add_test(autotests/comicbooktest.cpp
-- TEST_NAME "comicbooktest"
-- LINK_LIBRARIES Qt6::Test KF6::CoreAddons okularcore okular_comicbook
--)
-+if(BUILD_TESTING)
-+ add_subdirectory(autotests)
-+endif()
-
- ########### install files ###############
- install( PROGRAMS okularApplication_comicbook.desktop org.kde.mobile.okular_comicbook.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
-diff --git a/generators/comicbook/autotests/CMakeLists.txt b/generators/comicbook/autotests/CMakeLists.txt
-new file mode 100644
-index 000000000..6426105e4
---- /dev/null
-+++ b/generators/comicbook/autotests/CMakeLists.txt
-@@ -0,0 +1,5 @@
-+add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/../" )
-+ecm_add_test(comicbooktest.cpp
-+ TEST_NAME "comicbooktest"
-+ LINK_LIBRARIES Qt6::Test KF6::CoreAddons okularcore okular_comicbook
-+)
---
-2.44.0
-
diff --git a/kde-apps/okular/files/okular-24.11.80-tests.patch b/kde-apps/okular/files/okular-24.11.80-tests.patch
new file mode 100644
index 0000000000..937cff87dc
--- /dev/null
+++ b/kde-apps/okular/files/okular-24.11.80-tests.patch
@@ -0,0 +1,83 @@
+From 2e0f29193a74081362fffa22765d84b633996fee Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Mon, 18 Nov 2024 22:48:47 +0100
+Subject: [PATCH] generators: Conditionalise tests behind BUILD_TESTING
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ generators/comicbook/CMakeLists.txt | 12 +++++++-----
+ generators/epub/CMakeLists.txt | 13 +++++++------
+ generators/poppler/CMakeLists.txt | 10 ++++++----
+ 3 files changed, 20 insertions(+), 15 deletions(-)
+
+diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
+index 53075836d..0daf94121 100644
+--- a/generators/comicbook/CMakeLists.txt
++++ b/generators/comicbook/CMakeLists.txt
+@@ -30,11 +30,13 @@ endif()
+
+ ########### autotests ###############
+
+-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
+-ecm_add_test(autotests/comicbooktest.cpp
+- TEST_NAME "comicbooktest"
+- LINK_LIBRARIES Qt6::Test KF6::CoreAddons okularcore okular_comicbook
+-)
++if(BUILD_TESTING)
++ add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
++ ecm_add_test(autotests/comicbooktest.cpp
++ TEST_NAME "comicbooktest"
++ LINK_LIBRARIES Qt6::Test KF6::CoreAddons okularcore okular_comicbook
++ )
++endif()
+
+ ########### install files ###############
+ install( PROGRAMS okularApplication_comicbook.desktop org.kde.mobile.okular_comicbook.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
+diff --git a/generators/epub/CMakeLists.txt b/generators/epub/CMakeLists.txt
+index 5f45820c0..ab4e43b0d 100644
+--- a/generators/epub/CMakeLists.txt
++++ b/generators/epub/CMakeLists.txt
+@@ -19,12 +19,13 @@ target_link_libraries(okularGenerator_epub okularcore ${EPUB_LIBRARIES} KF6::I18
+
+ ########### autotests ###############
+
+-add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
+-ecm_add_test(autotests/epubgeneratortest.cpp
+- TEST_NAME "epubgeneratortest"
+- LINK_LIBRARIES Qt6::Test KF6::CoreAddons okularcore
+-)
+-
++if(BUILD_TESTING)
++ add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
++ ecm_add_test(autotests/epubgeneratortest.cpp
++ TEST_NAME "epubgeneratortest"
++ LINK_LIBRARIES Qt6::Test KF6::CoreAddons okularcore
++ )
++endif()
+
+ ########### install files ###############
+ install( PROGRAMS okularApplication_epub.desktop org.kde.mobile.okular_epub.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
+diff --git a/generators/poppler/CMakeLists.txt b/generators/poppler/CMakeLists.txt
+index a7ec0bc51..cb18f4e81 100644
+--- a/generators/poppler/CMakeLists.txt
++++ b/generators/poppler/CMakeLists.txt
+@@ -32,10 +32,12 @@ target_link_libraries(okularGenerator_poppler okularcore KF6::I18n KF6::Completi
+
+ ########### autotests ###############
+
+-ecm_add_test(autotests/testimagescaling.cpp
+- TEST_NAME "imageScalingTest"
+- LINK_LIBRARIES Qt6::Test Qt6::Gui
+-)
++if(BUILD_TESTING)
++ ecm_add_test(autotests/testimagescaling.cpp
++ TEST_NAME "imageScalingTest"
++ LINK_LIBRARIES Qt6::Test Qt6::Gui
++ )
++endif()
+
+ ########### install files ###############
+ install( PROGRAMS okularApplication_pdf.desktop org.kde.mobile.okular_pdf.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
+--
+2.47.0
+
diff --git a/kde-apps/okular/okular-24.11.80.ebuild b/kde-apps/okular/okular-24.11.80.ebuild
index 4cb878e283..a25e464c69 100644
--- a/kde-apps/okular/okular-24.11.80.ebuild
+++ b/kde-apps/okular/okular-24.11.80.ebuild
@@ -63,9 +63,9 @@ RDEPEND="${DEPEND}
"
PATCHES=(
- "${FILESDIR}/${PN}-24.04.80-tests.patch" # bug 734138
- "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry
+ "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # downstream; avoid same-name entry
"${FILESDIR}/${PN}-23.08.5-implicit-vasprintf.patch" # bug 922345; pending upstream
+ "${FILESDIR}/${P}-tests.patch" # git master; bug 734138
)
src_configure() {
diff --git a/kde-apps/okular/okular-24.12.49.9999.ebuild b/kde-apps/okular/okular-24.12.49.9999.ebuild
index 3b2294f0f1..025198dde1 100644
--- a/kde-apps/okular/okular-24.12.49.9999.ebuild
+++ b/kde-apps/okular/okular-24.12.49.9999.ebuild
@@ -63,9 +63,9 @@ RDEPEND="${DEPEND}
"
PATCHES=(
- "${FILESDIR}/${PN}-24.04.80-tests.patch" # bug 734138
- "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry
+ "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # downstream; avoid same-name entry
"${FILESDIR}/${PN}-23.08.5-implicit-vasprintf.patch" # bug 922345; pending upstream
+ "${FILESDIR}/${PN}-24.11.80-tests.patch" # git master; bug 734138
)
src_configure() {
diff --git a/kde-apps/okular/okular-9999.ebuild b/kde-apps/okular/okular-9999.ebuild
index 3b2294f0f1..49e43b4cc1 100644
--- a/kde-apps/okular/okular-9999.ebuild
+++ b/kde-apps/okular/okular-9999.ebuild
@@ -63,8 +63,7 @@ RDEPEND="${DEPEND}
"
PATCHES=(
- "${FILESDIR}/${PN}-24.04.80-tests.patch" # bug 734138
- "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry
+ "${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # downstream; avoid same-name entry
"${FILESDIR}/${PN}-23.08.5-implicit-vasprintf.patch" # bug 922345; pending upstream
)