[neon/extras/ktechlab] debian: not build a test-only static libraries w/ testing is disabled
Pino Toscano
null at kde.org
Thu Sep 8 15:56:01 BST 2022
Git commit d98703291b19de4bc187bb490d452eefe97d2eb2 by Pino Toscano.
Committed on 02/11/2020 at 12:15.
Pushed by jriddell into branch 'master'.
not build a test-only static libraries w/ testing is disabled
backport upstream commit f3a754ddcbc8a086ca48920bd33e96082cef699c
M +3 -0 debian/changelog
M +1 -0 debian/patches/series
A +51 -0 debian/patches/upstream_cmake-build-test_ktechlab-only-if-testing-is-enabled.patch
https://invent.kde.org/neon/extras/ktechlab/commit/d98703291b19de4bc187bb490d452eefe97d2eb2
diff --git a/debian/changelog b/debian/changelog
index 268200e..7449164 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ ktechlab (0.50.0-2) UNRELEASED; urgency=medium
the selection of files as properties; patch
upstream_Fix-selecting-files-as-properties.patch.
* Update copyright.
+ * Backport upstream commit f3a754ddcbc8a086ca48920bd33e96082cef699c to not
+ build a test-only static libraries when testing is disabled; patch
+ upstream_cmake-build-test_ktechlab-only-if-testing-is-enabled.patch.
-- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org> Thu, 29 Oct 2020 21:49:14 +0100
diff --git a/debian/patches/series b/debian/patches/series
index 8d82e81..db58132 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
upstream_process-chain-keep-temporary-files-live-longer.patch
upstream_Fix-selecting-files-as-properties.patch
+upstream_cmake-build-test_ktechlab-only-if-testing-is-enabled.patch
diff --git a/debian/patches/upstream_cmake-build-test_ktechlab-only-if-testing-is-enabled.patch b/debian/patches/upstream_cmake-build-test_ktechlab-only-if-testing-is-enabled.patch
new file mode 100644
index 0000000..a5f5683
--- /dev/null
+++ b/debian/patches/upstream_cmake-build-test_ktechlab-only-if-testing-is-enabled.patch
@@ -0,0 +1,51 @@
+From f3a754ddcbc8a086ca48920bd33e96082cef699c Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino at kde.org>
+Date: Mon, 2 Nov 2020 13:10:45 +0100
+Subject: [PATCH] cmake: build test_ktechlab only if testing is enabled
+
+The test_ktechlab static library basically builds almost all the
+ktechlab sources, resulting in a "double build" in case testing is
+enabled. Considering that is used only by test binaries built only
+when testing is enabled, then limit its build accordingly.
+---
+ src/CMakeLists.txt | 28 ++++++++++++++++------------
+ 1 file changed, 16 insertions(+), 12 deletions(-)
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -379,19 +379,23 @@ install(TARGETS ktechlab ${INSTALL_TARGE
+
+ # for helping testing
+
+-add_library(test_ktechlab STATIC ${ktechlab_SRCS})
++if(BUILD_TESTING)
+
+-target_link_libraries(test_ktechlab
+- KF5::TextEditor
+- KF5::IconThemes
+- KF5::Parts
+- KF5::KHtml
+- KF5::WidgetsAddons
+- KF5::WindowSystem
+-
+- Qt5::Widgets
+- Qt5::PrintSupport
+-)
++ add_library(test_ktechlab STATIC ${ktechlab_SRCS})
++
++ target_link_libraries(test_ktechlab
++ KF5::TextEditor
++ KF5::IconThemes
++ KF5::Parts
++ KF5::KHtml
++ KF5::WidgetsAddons
++ KF5::WindowSystem
++
++ Qt5::Widgets
++ Qt5::PrintSupport
++ )
++
++endif()
+
+ ########### install files ###############
+
More information about the Neon-commits
mailing list