[neon/neon-packaging/immer/Neon/release] debian: Import from debian

Scarlett Moore null at kde.org
Mon Sep 18 18:33:13 BST 2023


Git commit e3248184d77b7ddc86fce01d5ccb3f458e048184 by Scarlett Moore.
Committed on 18/09/2023 at 19:32.
Pushed by scarlettmoore into branch 'Neon/release'.

Import from debian

A  +1    -0    debian/.gitattributes
A  +22   -0    debian/changelog
A  +29   -0    debian/control
A  +121  -0    debian/copyright
A  +1    -0    debian/libimmer-dev.examples
A  +53   -0    debian/patches/disable-32bit-checks.diff
A  +100  -0    debian/patches/doctest-SIGSTKSZ.diff
A  +3    -0    debian/patches/series
A  +96   -0    debian/patches/upstream_Fix-includes.patch
A  +19   -0    debian/rules
A  +6    -0    debian/salsa-ci.yml
A  +1    -0    debian/source/format
A  +29   -0    debian/tests/CMakeLists.txt
A  +14   -0    debian/tests/build-examples
A  +3    -0    debian/tests/control
A  +5    -0    debian/upstream/metadata
A  +5    -0    debian/watch

https://invent.kde.org/neon/neon-packaging/immer/-/commit/e3248184d77b7ddc86fce01d5ccb3f458e048184

diff --git a/debian/.gitattributes b/debian/.gitattributes
new file mode 100644
index 0000000..6a03163
--- /dev/null
+++ b/debian/.gitattributes
@@ -0,0 +1 @@
+changelog merge=dpkg-mergechangelogs
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..561c03f
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,22 @@
+immer (0.8.0+dfsg-3) UNRELEASED; urgency=medium
+
+  [ Pino Toscano ]
+  * Change the 'build-examples' autopkgtest to use the upstream CMakeLists.txt
+    of the examples.
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sun, 20 Aug 2023 07:54:04 +0200
+
+immer (0.8.0+dfsg-2) unstable; urgency=medium
+
+  * Upload to unstable.
+  * doctest-SIGSTKSZ.diff: mention https://github.com/arximboldi/immer/pull/266
+    that fixes the problem in future versions.
+  * Fix a typo in copyright.
+
+ -- Pino Toscano <pino at debian.org>  Fri, 18 Aug 2023 05:00:58 +0200
+
+immer (0.8.0+dfsg-1) experimental; urgency=medium
+
+  * Initial packaging.
+
+ -- Pino Toscano <pino at debian.org>  Fri, 28 Jul 2023 12:11:36 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1e7d0eb
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: immer
+Section: libs
+Priority: optional
+Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>
+Uploaders: Pino Toscano <pino at debian.org>,
+Build-Depends: cmake (>= 3.5.1~),
+               debhelper-compat (= 13),
+               libboost-dev (>= 1.56~),
+               libfmt-dev <!nocheck>,
+               libgc-dev,
+               pkg-config,
+Standards-Version: 4.6.2
+Rules-Requires-Root: no
+Homepage: https://github.com/arximboldi/immer
+Vcs-Browser: https://salsa.debian.org/qt-kde-team/3rdparty/immer
+Vcs-Git: https://salsa.debian.org/qt-kde-team/3rdparty/immer.git
+
+Package: libimmer-dev
+Architecture: any
+Multi-Arch: same
+Section: libdevel
+Depends: ${misc:Depends},
+         libgc-dev,
+Description: persistent and immutable data structures -- development files
+ immer is a library of persistent and immutable data structures written in C++.
+ These enable whole new kinds of architectures for interactive and concurrent
+ programs of striking simplicity, correctness, and performance.
+ .
+ This package contains the development files.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..8a6b5d0
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,121 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: immer
+Source: https://github.com/arximboldi/immer
+Files-Excluded:
+ extra/js/lib
+ tools/include/nonius.h++
+Comment:
+ - the 'extra/js/lib' subdirectory is removed, as some of the JavaScript files
+   there are minified versions; since we are not using any of them, remove all
+   of them
+ - the 'tools/include/nonius.h++' file is removed, as it embeds a minified
+   JavaScript library (plotly.js)
+
+Files: *
+Copyright: 2010-2014, Louis Delacroix
+           2016-2018, Juan Pedro Bolivar Puente
+License: BSL-1.0
+
+Files: cmake/FindBoehmGC.cmake
+Copyright: 2010-2015, Takashi Kato <ktakashi at ymail.com>
+License: BSD-2-clause
+
+Files: cmake/FindGuile.cmake
+Copyright: 2016, Edelcides Gonçalves <eatg75 |0x40| gmail>
+License: ISC
+
+Files: tools/include/doctest.h
+Copyright: 2016-2017, Viktor Kirilov
+License: Expat
+
+Files: tools/include/catch.hpp
+Copyright: 2021, Two Blue Cubes Ltd. All rights reserved.
+License: BSL-1.0
+
+Files: debian/*
+Copyright: 2023, Pino Toscano <pino at debian.org>
+License: BSL-1.0
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: BSL-1.0
+ Boost Software License - Version 1.0 - August 17th, 2003
+ .
+ Permission is hereby granted, free of charge, to any person or organization
+ obtaining a copy of the software and accompanying documentation covered by
+ this license (the "Software") to use, reproduce, display, distribute,
+ execute, and transmit the Software, and to prepare derivative works of the
+ Software, and to permit third-parties to whom the Software is furnished to
+ do so, all subject to the following:
+ .
+ The copyright notices in the Software and this entire statement, including
+ the above license grant, this restriction and the following disclaimer,
+ must be included in all copies of the Software, in whole or in part, and
+ all derivative works of the Software, unless such copies or derivative
+ works are solely in the form of machine-executable object code generated by
+ a source language processor.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: ISC
+ Permission to use, copy, modify, and/or distribute this software for
+ any purpose with or without fee is hereby granted, provided that the
+ above copyright notice and this permission notice appear in all
+ copies.
+ .
+ *THE SOFTWARE IS PROVIDED* **AS IS** *AND ISC DISCLAIMS ALL
+ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE
+ LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE*.
diff --git a/debian/libimmer-dev.examples b/debian/libimmer-dev.examples
new file mode 100644
index 0000000..0bbe99e
--- /dev/null
+++ b/debian/libimmer-dev.examples
@@ -0,0 +1 @@
+example/*
diff --git a/debian/patches/disable-32bit-checks.diff b/debian/patches/disable-32bit-checks.diff
new file mode 100644
index 0000000..974311c
--- /dev/null
+++ b/debian/patches/disable-32bit-checks.diff
@@ -0,0 +1,53 @@
+Author: Pino Toscano <pino at debian.org>
+Description: Disable checks that overflow 32bit sizes/capacity
+ Some of the checks will create huge data structures that do not fit into
+ 32bit sizes; skip them for now.
+Last-Update: 2023-07-28
+Forwarded: not-needed
+
+--- a/test/flex_vector/fuzzed-0.cpp
++++ b/test/flex_vector/fuzzed-0.cpp
+@@ -164,6 +164,7 @@ TEST_CASE("bug: concatenate too big vect
+         var4      = var4 + var4;
+         var4      = var4 + var4;
+         var4      = var4 + var4;
++#ifdef __LP64__
+         var4      = var4 + var4;
+         var4      = var4 + var4;
+         var4      = var4 + var4;
+@@ -172,9 +173,11 @@ TEST_CASE("bug: concatenate too big vect
+         var4      = var4 + var4;
+         var4      = var4 + var4;
+         var4      = var4.push_back(42);
++#endif
+     }
+ 
+ #ifndef IMMER_DISABLE_FUZZER_DUE_TO_GCC_BUG
++#ifdef __LP64__
+     // Assertion `!p->relaxed()' failed
+     SECTION("")
+     {
+@@ -377,4 +380,5 @@ TEST_CASE("bug: concatenate too big vect
+         CHECK(run_input(input, sizeof(input)) == 0);
+     }
+ #endif
++#endif
+ }
+--- a/test/oss-fuzz/flex-vector-gc-0.cpp
++++ b/test/oss-fuzz/flex-vector-gc-0.cpp
+@@ -1362,6 +1362,7 @@ TEST_CASE("https://bugs.chromium.org/p/o
+         t0.push_back(13);
+         t0.take(18);
+         t1 = v0.transient();
++#ifdef __LP64__
+         v2 = v2 + v2;
+         v0 = t0.persistent();
+         t0 = v0.transient();
+@@ -1737,6 +1738,7 @@ TEST_CASE("https://bugs.chromium.org/p/o
+         t0.append(v1.transient());
+         t0.take(7);
+         t0.append(t1);
++#endif
+     }
+ 
+     SECTION("fuzzer")
diff --git a/debian/patches/doctest-SIGSTKSZ.diff b/debian/patches/doctest-SIGSTKSZ.diff
new file mode 100644
index 0000000..6132ae4
--- /dev/null
+++ b/debian/patches/doctest-SIGSTKSZ.diff
@@ -0,0 +1,100 @@
+Author: Pino Toscano <pino at debian.org>
+Description: Avoid using SIGSTKSZ as constant in the embedded doctest.h
+ SIGSTKSZ is no more a constant since glibc 2.34 [1], and the old doctest copy
+ does not handle that; patch it in a similar way of how doctest was fixed
+ upstream [2].
+ .
+ The real issue here is the very old copy of doctest.h (updated last in 2017);
+ the next upstream release will drop the usage of doctest:
+ https://github.com/arximboldi/immer/pull/266
+ .
+ [1] https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html
+ [2] https://github.com/doctest/doctest/issues/473
+ [3] https://github.com/doctest/doctest/commit/099d5414e97244ec44cf46b14cd176b3a3dc52e3
+Last-Update: 2023-07-27
+Forwarded: not-needed
+
+diff --git a/tools/include/doctest.h b/tools/include/doctest.h
+index 695c271..a665ec9 100644
+--- a/tools/include/doctest.h
++++ b/tools/include/doctest.h
+@@ -4365,7 +4365,9 @@ namespace detail
+     void reportFatal(const std::string&) {}
+     struct FatalConditionHandler
+     {
+-        void reset() {}
++        static void reset() {}
++        static void allocateAltStackMem() {}
++        static void freeAltStackMem() {}
+     };
+ #else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH
+ 
+@@ -4410,6 +4412,9 @@ namespace detail
+             return EXCEPTION_CONTINUE_SEARCH;
+         }
+ 
++        static void allocateAltStackMem() {}
++        static void freeAltStackMem() {}
++
+         FatalConditionHandler() {
+             isSet = true;
+             // 32k seems enough for doctest to handle stack overflow,
+@@ -4463,7 +4468,8 @@ namespace detail
+         static bool             isSet;
+         static struct sigaction oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)];
+         static stack_t          oldSigStack;
+-        static char             altStackMem[SIGSTKSZ];
++        static size_t           altStackSize;
++        static char*            altStackMem;
+ 
+         static void handleSignal(int sig) {
+             std::string name = "<unknown signal>";
+@@ -4479,11 +4485,19 @@ namespace detail
+             raise(sig);
+         }
+ 
++        static void allocateAltStackMem() {
++            altStackMem = new char[altStackSize];
++        }
++
++        static void freeAltStackMem() {
++            delete[] altStackMem;
++        }
++
+         FatalConditionHandler() {
+             isSet = true;
+             stack_t sigStack;
+             sigStack.ss_sp    = altStackMem;
+-            sigStack.ss_size  = SIGSTKSZ;
++            sigStack.ss_size  = altStackSize;
+             sigStack.ss_flags = 0;
+             sigaltstack(&sigStack, &oldSigStack);
+             struct sigaction sa = {0};
+@@ -4513,7 +4527,8 @@ namespace detail
+     struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)] =
+             {};
+     stack_t FatalConditionHandler::oldSigStack           = {};
+-    char    FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
++    size_t           FatalConditionHandler::altStackSize = 4 * SIGSTKSZ;
++    char*            FatalConditionHandler::altStackMem = nullptr;
+ 
+ #endif // DOCTEST_PLATFORM_WINDOWS
+ #endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH
+@@ -5437,6 +5452,8 @@ int Context::run() {
+         return EXIT_SUCCESS;
+     }
+ 
++    FatalConditionHandler::allocateAltStackMem();
++
+     printVersion();
+     DOCTEST_PRINTF_COLORED("[doctest] ", Color::Cyan);
+     std::printf("run with \"--help\" for options\n");
+@@ -5662,6 +5679,8 @@ int Context::run() {
+         }
+     }
+ 
++    FatalConditionHandler::freeAltStackMem();
++
+     printSummary();
+ 
+     contextState = 0;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0f53bc7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+upstream_Fix-includes.patch
+doctest-SIGSTKSZ.diff
+disable-32bit-checks.diff
diff --git a/debian/patches/upstream_Fix-includes.patch b/debian/patches/upstream_Fix-includes.patch
new file mode 100644
index 0000000..8b46677
--- /dev/null
+++ b/debian/patches/upstream_Fix-includes.patch
@@ -0,0 +1,96 @@
+From 1b66f4ad2a8cb0190f436f03a64b76a3aca5fdad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov at gnu.org>
+Date: Tue, 16 May 2023 12:52:54 +0200
+Subject: [PATCH] Fix includes
+
+https://issues.guix.gnu.org/issue/63330
+---
+ test/oss-fuzz/flex-vector-0.cpp    | 2 +-
+ test/oss-fuzz/flex-vector-bo-0.cpp | 2 +-
+ test/oss-fuzz/flex-vector-gc-0.cpp | 2 +-
+ test/oss-fuzz/map-st-2.cpp         | 2 +-
+ test/oss-fuzz/map-st-str-0.cpp     | 2 +-
+ test/oss-fuzz/set-gc-1.cpp         | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/oss-fuzz/flex-vector-0.cpp b/test/oss-fuzz/flex-vector-0.cpp
+index f29eeb9..c5a8d18 100644
+--- a/test/oss-fuzz/flex-vector-0.cpp
++++ b/test/oss-fuzz/flex-vector-0.cpp
+@@ -17,7 +17,7 @@
+ #define IMMER_FUZZED_TRACE_ENABLE 0
+ 
+ #if IMMER_FUZZED_TRACE_ENABLE
+-#include <fmt/printf.h>
++#include <fmt/ostream.h>
+ #define IMMER_FUZZED_TRACE(...) fmt::print(std::cerr, __VA_ARGS__)
+ #else
+ #define IMMER_FUZZED_TRACE(...)
+diff --git a/test/oss-fuzz/flex-vector-bo-0.cpp b/test/oss-fuzz/flex-vector-bo-0.cpp
+index b821734..6dc7be4 100644
+--- a/test/oss-fuzz/flex-vector-bo-0.cpp
++++ b/test/oss-fuzz/flex-vector-bo-0.cpp
+@@ -17,7 +17,7 @@
+ #define IMMER_FUZZED_TRACE_ENABLE 1
+ 
+ #if IMMER_FUZZED_TRACE_ENABLE
+-#include <fmt/printf.h>
++#include <fmt/ostream.h>
+ #define IMMER_FUZZED_TRACE(...) fmt::print(std::cerr, __VA_ARGS__)
+ #else
+ #define IMMER_FUZZED_TRACE(...)
+diff --git a/test/oss-fuzz/flex-vector-gc-0.cpp b/test/oss-fuzz/flex-vector-gc-0.cpp
+index 75dd1ae..1a669c1 100644
+--- a/test/oss-fuzz/flex-vector-gc-0.cpp
++++ b/test/oss-fuzz/flex-vector-gc-0.cpp
+@@ -18,7 +18,7 @@
+ #define IMMER_FUZZED_TRACE_ENABLE 0
+ 
+ #if IMMER_FUZZED_TRACE_ENABLE
+-#include <fmt/printf.h>
++#include <fmt/ostream.h>
+ #define IMMER_FUZZED_TRACE(...) fmt::print(std::cerr, __VA_ARGS__)
+ #else
+ #define IMMER_FUZZED_TRACE(...)
+diff --git a/test/oss-fuzz/map-st-2.cpp b/test/oss-fuzz/map-st-2.cpp
+index 61c8a85..af022e7 100644
+--- a/test/oss-fuzz/map-st-2.cpp
++++ b/test/oss-fuzz/map-st-2.cpp
+@@ -19,7 +19,7 @@
+ #define IMMER_FUZZED_TRACE_ENABLE 0
+ 
+ #if IMMER_FUZZED_TRACE_ENABLE
+-#include <fmt/printf.h>
++#include <fmt/ostream.h>
+ #define IMMER_FUZZED_TRACE(...) fmt::print(std::cerr, __VA_ARGS__)
+ #else
+ #define IMMER_FUZZED_TRACE(...)
+diff --git a/test/oss-fuzz/map-st-str-0.cpp b/test/oss-fuzz/map-st-str-0.cpp
+index 1aee376..3e85308 100644
+--- a/test/oss-fuzz/map-st-str-0.cpp
++++ b/test/oss-fuzz/map-st-str-0.cpp
+@@ -21,7 +21,7 @@
+ #define IMMER_FUZZED_TRACE_ENABLE 1
+ 
+ #if IMMER_FUZZED_TRACE_ENABLE
+-#include <fmt/printf.h>
++#include <fmt/ostream.h>
+ #define IMMER_FUZZED_TRACE(...) fmt::print(std::cerr, __VA_ARGS__)
+ #else
+ #define IMMER_FUZZED_TRACE(...)
+diff --git a/test/oss-fuzz/set-gc-1.cpp b/test/oss-fuzz/set-gc-1.cpp
+index 19b318e..daee36b 100644
+--- a/test/oss-fuzz/set-gc-1.cpp
++++ b/test/oss-fuzz/set-gc-1.cpp
+@@ -21,7 +21,7 @@
+ #define IMMER_FUZZED_TRACE_ENABLE 0
+ 
+ #if IMMER_FUZZED_TRACE_ENABLE
+-#include <fmt/printf.h>
++#include <fmt/ostream.h>
+ #define IMMER_FUZZED_TRACE(...) fmt::print(std::cerr, __VA_ARGS__)
+ #else
+ #define IMMER_FUZZED_TRACE(...)
+-- 
+2.40.1
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..3df20e3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,19 @@
+#!/usr/bin/make -f
+
+# https://github.com/arximboldi/immer/issues/223
+export DEB_CXXFLAGS_MAINT_APPEND = -Wno-array-bounds
+
+%:
+	dh $@ --buildsystem=cmake
+
+override_dh_auto_configure:
+	dh_auto_configure --buildsystem=cmake -- \
+	  -DDISABLE_WERROR=ON \
+	  -Dimmer_BUILD_EXAMPLES=OFF \
+	  -Dimmer_BUILD_DOCS=OFF \
+	  -Dimmer_BUILD_EXTRAS=OFF
+
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+execute_after_dh_auto_build:
+	dh_auto_build -- tests
+endif
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
new file mode 100644
index 0000000..31e31c9
--- /dev/null
+++ b/debian/salsa-ci.yml
@@ -0,0 +1,6 @@
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+variables:
+  SALSA_CI_DISABLE_MISSING_BREAKS: 'no'
+  SALSA_CI_DISABLE_RC_BUGS: 'no'
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/CMakeLists.txt b/debian/tests/CMakeLists.txt
new file mode 100644
index 0000000..e53c4a9
--- /dev/null
+++ b/debian/tests/CMakeLists.txt
@@ -0,0 +1,29 @@
+cmake_minimum_required(VERSION 3.20)
+project(immer-tests)
+
+enable_testing()
+
+find_package(Immer REQUIRED)
+# alias used by the examples
+add_library(immer-dev ALIAS immer)
+
+# used internally by the CMakeLists.txt of the examples
+function(immer_target_name_for outvar_target outvar_output path)
+  cmake_path(GET path PARENT_PATH directory)
+  cmake_path(GET path STEM filename)
+  cmake_path(GET directory FILENAME directory_name)
+  set(${outvar_target} "${directory_name}-${filename}" PARENT_SCOPE)
+  set(${outvar_output} "${directory_name}-${filename}" PARENT_SCOPE)
+endfunction()
+
+add_custom_target(check)
+set(examples_that_need_libgc
+  vector-gc
+)
+
+add_subdirectory(examples)
+
+foreach(_target IN LISTS examples_that_need_libgc)
+  target_link_libraries(${_target} PRIVATE gc)
+  target_compile_definitions(${_target} PRIVATE IMMER_HAS_LIBGC=1)
+endforeach()
diff --git a/debian/tests/build-examples b/debian/tests/build-examples
new file mode 100755
index 0000000..d847446
--- /dev/null
+++ b/debian/tests/build-examples
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -e
+set -x
+
+SRCDIR=$(dirname $(realpath $0))
+
+cd $AUTOPKGTEST_TMP
+cp "$SRCDIR/CMakeLists.txt" .
+ln -s /usr/share/doc/libimmer-dev/examples .
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON ..
+make examples
+ctest -V
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..0f38ae5
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: build-examples
+Depends: build-essential, cmake, libimmer-dev
+Restrictions: allow-stderr
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..1bfb9f5
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+---
+Bug-Database: https://github.com/arximboldi/immer/issues
+Bug-Submit: https://github.com/arximboldi/immer/issues/new
+Repository: https://github.com/arximboldi/immer.git
+Repository-Browse: https://github.com/arximboldi/immer
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..dab9688
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,5 @@
+version=4
+
+opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE at -$1.tar.gz%, repacksuffix=+dfsg, dversionmangle=auto" \
+https://github.com/arximboldi/immer/tags \
+(?:.*?/)?v?(\d[\d.]*)\.tar\.gz


More information about the Neon-commits mailing list