Control: tags 1064018 + patch

Dear Maintainer,

Attached is a debdiff patch which fixes #1064018.

Questions/comments welcome.

Thanks,

-- 
Plasma
diff -Nru libcbor-0.10.2/debian/changelog libcbor-0.10.2/debian/changelog
--- libcbor-0.10.2/debian/changelog	2023-10-05 01:47:27.000000000 -0500
+++ libcbor-0.10.2/debian/changelog	2024-02-12 23:12:22.000000000 -0600
@@ -1,3 +1,16 @@
+libcbor (0.10.2-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * d/p/Fix-non-standard-testing.patch:
+    Enable testing by default and toggle testing based on
+    BUILD_TESTING CMake variable. (Closes: 1064018)
+  * d/control: Build-Depend-Arch on debhelper (>= 13.12~) when <nocheck>
+    build profile is active because the BUILD_TESTING CMake variable is
+    automatically set to OFF for nocheck builds starting with
+    debhelper 13.12.
+
+ -- Plasma (David Paul) <davidp...@librem.one>  Thu, 15 Feb 2024 20:46:41 -0600
+
 libcbor (0.10.2-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru libcbor-0.10.2/debian/control libcbor-0.10.2/debian/control
--- libcbor-0.10.2/debian/control	2023-10-05 01:47:27.000000000 -0500
+++ libcbor-0.10.2/debian/control	2024-02-12 23:11:57.000000000 -0600
@@ -3,6 +3,7 @@
 Maintainer: Vincent Bernat <ber...@debian.org>
 Build-Depends: debhelper-compat (= 13),
 Build-Depends-Arch: cmake,
+                    debhelper (>= 13.12~) <nocheck>,
                     libcmocka-dev <!nocheck>,
 Build-Depends-Indep: dh-sequence-sphinxdoc,
                      doxygen,
--- libcbor-0.10.2/debian/patches/Fix-non-standard-testing.patch	1969-12-31 18:00:00.000000000 -0600
+++ libcbor-0.10.2/debian/patches/Fix-non-standard-testing.patch	2024-02-12 23:12:22.000000000 -0600
@@ -0,0 +1,52 @@
+Description: Use idiomatic CMake to control testsuite execution.
+ Rather than creating and relying upon a WITH_TESTS variable in the top-level
+ CMakeLists.txt file, instead make use of the BUILD_TESTING variable defined
+ by the included CTest module. Also remove the enable_testing() command
+ invocation in CMakeLists.txt and instead rely on the one in the CTest module
+ which gets run whenever the BUILD_TESTING variable is not set to OFF.
+Author: Plasma (David Paul) <davidp...@librem.one>
+Bug-Debian: https://bugs.debian.org/1064018
+Forwarded: no
+Last-Update: 2024-02-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: libcbor-0.10.2/CMakeLists.txt
+===================================================================
+--- libcbor-0.10.2.orig/CMakeLists.txt
++++ libcbor-0.10.2/CMakeLists.txt
+@@ -29,11 +29,6 @@ option(CBOR_PRETTY_PRINTER "Include a pr
+ set(CBOR_BUFFER_GROWTH "2" CACHE STRING "Factor for buffer growth & shrinking")
+ set(CBOR_MAX_STACK_SIZE "2048" CACHE STRING "maximum size for decoding context stack")
+ 
+-option(WITH_TESTS "[TEST] Build unit tests (requires CMocka)" OFF)
+-if(WITH_TESTS)
+-    add_definitions(-DWITH_TESTS)
+-endif(WITH_TESTS)
+-
+ option(WITH_EXAMPLES "Build examples" ON)
+ 
+ option(HUGE_FUZZ "[TEST] Fuzz through 8GB of data in the test. Do not use with memory instrumentation!" OFF)
+@@ -97,8 +92,6 @@ else()
+     add_definitions(-DEIGHT_BYTE_SIZE_T)
+ endif()
+ 
+-enable_testing()
+-
+ set(CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
+ set(MEMORYCHECK_COMMAND_OPTIONS "--tool=memcheck --track-origins=yes --leak-check=full --error-exitcode=1")
+ 
+@@ -168,12 +161,12 @@ if(use_lto)
+     set_property(DIRECTORY src PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
+ endif(use_lto)
+ 
+-if (WITH_TESTS)
++if (BUILD_TESTING)
+     add_subdirectory(test)
+     if(use_lto)
+         set_property(DIRECTORY test PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
+     endif(use_lto)
+-endif (WITH_TESTS)
++endif (BUILD_TESTING)
+ 
+ if (WITH_EXAMPLES)
+     add_subdirectory(examples)
--- libcbor-0.10.2/debian/patches/series	1969-12-31 18:00:00.000000000 -0600
+++ libcbor-0.10.2/debian/patches/series	2024-02-11 16:49:18.000000000 -0600
@@ -0,0 +1 @@
+Fix-non-standard-testing.patch

Reply via email to