summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog34
-rw-r--r--debian/control32
-rw-r--r--debian/copyright43
-rw-r--r--debian/hera-utils.install1
-rw-r--r--debian/libhera-dev.install2
-rw-r--r--debian/patches/0001-Use-system-catch2.patch114
-rw-r--r--debian/patches/0002-Use-system-PHAT.patch55
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules30
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/control7
-rwxr-xr-xdebian/tests/upstream-bottleneck.sh19
-rwxr-xr-xdebian/tests/upstream-wasserstein.sh17
-rw-r--r--debian/upstream/metadata19
-rw-r--r--debian/watch4
15 files changed, 380 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..2a80dae
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,34 @@
+hera (0~git20210508+dfsg-1) unstable; urgency=medium
+
+ * New upstream, based on commit
+ 2ed9afc052bee7956f6abb195947de1f80cb9d91.
+ - Refresh patch.
+ * Correct upstream metadata.
+ * Drop unneccessary version bounds.
+ * Actually depend on PHAT.
+ - Add patch to use the system PHAT version instead of DFSG-deleted
+ bundled copy.
+ * Run build-time tests from the correct directory.
+
+ -- Gard Spreemann <gspr@nonempty.org> Sat, 14 Aug 2021 18:42:03 +0200
+
+hera (0~git20200602+dfsg-3) unstable; urgency=medium
+
+ * Add upstream metadata file with paper references.
+ * Move git to Salsa.
+ * Standards-version 4.5.1. No changes needed.
+
+ -- Gard Spreemann <gspr@nonempty.org> Fri, 22 Jan 2021 19:11:10 +0100
+
+hera (0~git20200602+dfsg-2) unstable; urgency=medium
+
+ * Add tests.
+
+ -- Gard Spreemann <gspr@nonempty.org> Sat, 06 Jun 2020 16:39:33 +0200
+
+hera (0~git20200602+dfsg-1) unstable; urgency=medium
+
+ * Initial commit, based on upstream commit
+ b73ed1face2c609958556e6f2b7704bbd8aaa263. (Closes: #961784)
+
+ -- Gard Spreemann <gspr@nonempty.org> Tue, 02 Jun 2020 20:40:30 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..aa6d206
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,32 @@
+Source: hera
+Maintainer: Gard Spreemann <gspr@nonempty.org>
+Section: math
+Priority: optional
+Standards-Version: 4.5.1
+Build-Depends: catch2,
+ cmake,
+ debhelper-compat (= 13),
+ libboost-dev,
+ libphat-dev
+Rules-Requires-Root: no
+Homepage: https://github.com/anigmetov/hera/
+Vcs-Browser: https://salsa.debian.org/gspr/hera
+Vcs-Git: https://salsa.debian.org/gspr/hera.git -b debian/sid
+
+Package: libhera-dev
+Section: libdevel
+Architecture: all
+Multi-Arch: foreign
+Depends: libboost-dev, libphat-dev, ${misc:Depends}
+Description: Library for efficient bottleneck and Wasserstein distances
+ A header-only C++ library for efficient computation of bottleneck and
+ Wasserstein distances between persistence diagrams.
+
+Package: hera-utils
+Section: math
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Utilities built from the Hera library
+ Some simple utilities for efficient bottleneck and Wasserstein
+ distances between persistence diagrams built from the Hera library
+ (see libhera-dev).
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..e8ad71f
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,43 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: hera
+Files-Excluded: bottleneck/include/catch matching/include/catch wasserstein/include/catch matching/include/phat
+Source: https://github.com/anigmetov/hera
+Comment: Deleted upstream bundling of catch and PHAT for DFSG repack.
+License: BSD-3-clause
+
+Files: *
+Copyright: 2015-2021 M. Kerber, D. Morozov, A. Nigmetov
+License: BSD-3-clause
+
+Files: debian/*
+Copyright: 2020-2021 Gard Spreemann <gspr@nonempty.org>
+License: BSD-3-clause
+
+License: BSD-3-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.
+ .
+ 3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ 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
+ HOLDER 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. \ No newline at end of file
diff --git a/debian/hera-utils.install b/debian/hera-utils.install
new file mode 100644
index 0000000..1e881ed
--- /dev/null
+++ b/debian/hera-utils.install
@@ -0,0 +1 @@
+usr/bin \ No newline at end of file
diff --git a/debian/libhera-dev.install b/debian/libhera-dev.install
new file mode 100644
index 0000000..a0ad680
--- /dev/null
+++ b/debian/libhera-dev.install
@@ -0,0 +1,2 @@
+bottleneck/include/* /usr/include/hera/bottleneck/
+wasserstein/include/* /usr/include/hera/wasserstein/
diff --git a/debian/patches/0001-Use-system-catch2.patch b/debian/patches/0001-Use-system-catch2.patch
new file mode 100644
index 0000000..536b23c
--- /dev/null
+++ b/debian/patches/0001-Use-system-catch2.patch
@@ -0,0 +1,114 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Wed, 3 Jun 2020 09:32:19 +0200
+Subject: Use system catch2.
+
+---
+ bottleneck/tests/test_hera_bottleneck.cpp | 2 +-
+ bottleneck/tests/tests_main.cpp | 2 +-
+ matching/tests/test_bifiltration.cpp | 2 +-
+ matching/tests/test_common.cpp | 2 +-
+ matching/tests/test_matching_distance.cpp | 2 +-
+ matching/tests/test_module.cpp | 2 +-
+ matching/tests/tests_main.cpp | 2 +-
+ wasserstein/tests/test_hera_wasserstein.cpp | 2 +-
+ wasserstein/tests/test_hera_wasserstein_pure_geom.cpp | 2 +-
+ wasserstein/tests/tests_main.cpp | 2 +-
+ 10 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/bottleneck/tests/test_hera_bottleneck.cpp b/bottleneck/tests/test_hera_bottleneck.cpp
+index c74e800..b97fe6f 100644
+--- a/bottleneck/tests/test_hera_bottleneck.cpp
++++ b/bottleneck/tests/test_hera_bottleneck.cpp
+@@ -1,4 +1,4 @@
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <sstream>
+ #include <iostream>
+diff --git a/bottleneck/tests/tests_main.cpp b/bottleneck/tests/tests_main.cpp
+index d24407e..1f558c8 100644
+--- a/bottleneck/tests/tests_main.cpp
++++ b/bottleneck/tests/tests_main.cpp
+@@ -1,3 +1,3 @@
+ #define LOG_AUCTION
+ #define CATCH_CONFIG_MAIN
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+diff --git a/matching/tests/test_bifiltration.cpp b/matching/tests/test_bifiltration.cpp
+index 742dab8..f63e231 100644
+--- a/matching/tests/test_bifiltration.cpp
++++ b/matching/tests/test_bifiltration.cpp
+@@ -1,4 +1,4 @@
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <sstream>
+ #include <iostream>
+diff --git a/matching/tests/test_common.cpp b/matching/tests/test_common.cpp
+index 9079a56..d390585 100644
+--- a/matching/tests/test_common.cpp
++++ b/matching/tests/test_common.cpp
+@@ -1,4 +1,4 @@
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <sstream>
+ #include <iostream>
+diff --git a/matching/tests/test_matching_distance.cpp b/matching/tests/test_matching_distance.cpp
+index 115c8d9..08c59c0 100644
+--- a/matching/tests/test_matching_distance.cpp
++++ b/matching/tests/test_matching_distance.cpp
+@@ -1,4 +1,4 @@
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <sstream>
+ #include <iostream>
+diff --git a/matching/tests/test_module.cpp b/matching/tests/test_module.cpp
+index bae1f78..3dbe5b1 100644
+--- a/matching/tests/test_module.cpp
++++ b/matching/tests/test_module.cpp
+@@ -1,4 +1,4 @@
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <sstream>
+ #include <iostream>
+diff --git a/matching/tests/tests_main.cpp b/matching/tests/tests_main.cpp
+index 1c77b13..4ed06df 100644
+--- a/matching/tests/tests_main.cpp
++++ b/matching/tests/tests_main.cpp
+@@ -1,2 +1,2 @@
+ #define CATCH_CONFIG_MAIN
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+diff --git a/wasserstein/tests/test_hera_wasserstein.cpp b/wasserstein/tests/test_hera_wasserstein.cpp
+index 6f5de3b..83a781a 100644
+--- a/wasserstein/tests/test_hera_wasserstein.cpp
++++ b/wasserstein/tests/test_hera_wasserstein.cpp
+@@ -1,5 +1,5 @@
+ #define LOG_AUCTION
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <sstream>
+ #include <iostream>
+diff --git a/wasserstein/tests/test_hera_wasserstein_pure_geom.cpp b/wasserstein/tests/test_hera_wasserstein_pure_geom.cpp
+index 9603ceb..3110c4c 100644
+--- a/wasserstein/tests/test_hera_wasserstein_pure_geom.cpp
++++ b/wasserstein/tests/test_hera_wasserstein_pure_geom.cpp
+@@ -1,4 +1,4 @@
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <sstream>
+ #include <iostream>
+diff --git a/wasserstein/tests/tests_main.cpp b/wasserstein/tests/tests_main.cpp
+index d24407e..1f558c8 100644
+--- a/wasserstein/tests/tests_main.cpp
++++ b/wasserstein/tests/tests_main.cpp
+@@ -1,3 +1,3 @@
+ #define LOG_AUCTION
+ #define CATCH_CONFIG_MAIN
+-#include "catch/catch.hpp"
++#include <catch2/catch.hpp>
diff --git a/debian/patches/0002-Use-system-PHAT.patch b/debian/patches/0002-Use-system-PHAT.patch
new file mode 100644
index 0000000..b99adc6
--- /dev/null
+++ b/debian/patches/0002-Use-system-PHAT.patch
@@ -0,0 +1,55 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Sat, 14 Aug 2021 19:05:48 +0200
+Subject: Use system PHAT
+
+---
+ matching/include/bifiltration.h | 4 ++--
+ matching/include/common_util.h | 2 +-
+ matching/include/persistence_module.h | 6 +++---
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/matching/include/bifiltration.h b/matching/include/bifiltration.h
+index 5b188d4..25b3bff 100644
+--- a/matching/include/bifiltration.h
++++ b/matching/include/bifiltration.h
+@@ -12,8 +12,8 @@
+ #include "box.h"
+ #include "simplex.h"
+ #include "dual_point.h"
+-#include "phat/boundary_matrix.h"
+-#include "phat/compute_persistence_pairs.h"
++#include <phat/boundary_matrix.h>
++#include <phat/compute_persistence_pairs.h>
+
+ #include "common_util.h"
+
+diff --git a/matching/include/common_util.h b/matching/include/common_util.h
+index 20a151a..61476a5 100644
+--- a/matching/include/common_util.h
++++ b/matching/include/common_util.h
+@@ -12,7 +12,7 @@
+ #include <functional>
+
+ #include "common_defs.h"
+-#include "phat/helpers/misc.h"
++#include <phat/helpers/misc.h>
+
+ namespace md {
+
+diff --git a/matching/include/persistence_module.h b/matching/include/persistence_module.h
+index 4df2148..80ff3c1 100644
+--- a/matching/include/persistence_module.h
++++ b/matching/include/persistence_module.h
+@@ -9,9 +9,9 @@
+ #include <algorithm>
+ #include <unordered_set>
+
+-#include "phat/boundary_matrix.h"
+-#include "phat/compute_persistence_pairs.h"
+-#include "phat/algorithms/standard_reduction.h"
++#include <phat/boundary_matrix.h>
++#include <phat/compute_persistence_pairs.h>
++#include <phat/algorithms/standard_reduction.h>
+
+ #include "common_util.h"
+ #include "dual_point.h"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..78f2fb4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Use-system-catch2.patch
+0002-Use-system-PHAT.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..30c7235
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+%:
+ dh $@
+
+override_dh_clean:
+# dh_clean nukes an upstream file.
+ dh_clean -X.bak
+
+override_dh_auto_clean:
+ dh_auto_clean --builddirectory=build-bottleneck --sourcedirectory=bottleneck
+ dh_auto_clean --builddirectory=build-wasserstein --sourcedirectory=wasserstein
+
+override_dh_auto_configure:
+ dh_auto_configure --builddirectory=build-bottleneck --sourcedirectory=bottleneck
+ dh_auto_configure --builddirectory=build-wasserstein --sourcedirectory=wasserstein
+
+override_dh_auto_build:
+ dh_auto_build --builddirectory=build-bottleneck --sourcedirectory=bottleneck
+ dh_auto_build --builddirectory=build-wasserstein --sourcedirectory=wasserstein
+
+execute_before_dh_install:
+ install -D build-bottleneck/bottleneck_dist debian/tmp/usr/bin/hera-bottleneck
+ install -D build-wasserstein/wasserstein_dist debian/tmp/usr/bin/hera-wasserstein
+ install -D build-wasserstein/wasserstein_dist_dipha debian/tmp/usr/bin/hera-wasserstein-dipha
+
+override_dh_auto_test:
+ cd wasserstein/tests/data && ../../../build-wasserstein/wasserstein_test
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/control b/debian/tests/control
new file mode 100644
index 0000000..159f48c
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,7 @@
+Tests: upstream-bottleneck.sh
+Depends: build-essential, catch2, libhera-dev
+Restrictions: allow-stderr
+
+Tests: upstream-wasserstein.sh
+Depends: build-essential, catch2, libhera-dev
+Restrictions: allow-stderr \ No newline at end of file
diff --git a/debian/tests/upstream-bottleneck.sh b/debian/tests/upstream-bottleneck.sh
new file mode 100755
index 0000000..a11a13b
--- /dev/null
+++ b/debian/tests/upstream-bottleneck.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+set -u
+
+tmpdir=$AUTOPKGTEST_TMP/bottleneck
+
+mkdir -p $tmpdir
+cp -R $PWD/bottleneck/tests/* $tmpdir
+
+cd $tmpdir
+ln -s /usr/include/catch2 catch
+
+set -x
+g++ -O2 -I/usr/include/hera/bottleneck -o test tests_main.cpp test_hera_bottleneck.cpp
+./test
+cd data
+../test
+
diff --git a/debian/tests/upstream-wasserstein.sh b/debian/tests/upstream-wasserstein.sh
new file mode 100755
index 0000000..070e5c6
--- /dev/null
+++ b/debian/tests/upstream-wasserstein.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+set -u
+
+tmpdir=$AUTOPKGTEST_TMP/wasserstein
+
+mkdir -p $tmpdir
+cp -R $PWD/wasserstein/tests/* $tmpdir
+
+cd $tmpdir
+ln -s /usr/include/catch2 catch
+
+set -x
+g++ -O2 -I/usr/include/hera/wasserstein -o test tests_main.cpp test_hera_wasserstein.cpp test_hera_wasserstein_pure_geom.cpp
+cd data
+../test
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..76b11d6
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,19 @@
+Cite-As: >
+ Michael Kerber, Dmitriy Morozov, and Arnur Nigmetov,
+ "Geometry Helps to Compare Persistence Diagrams.",
+ Journal of Experimental Algorithmics, vol. 22, 2017, pp. 1--20.
+Reference:
+ Title: "Geometry helps to compare persistence diagrams"
+ Author: Kerber, Michael and Morozov, Dmitriy and Nigmetov, Arnur
+ Journal: Journal of Experimental Algorithmics (JEA)
+ Volume: 22
+ Pages: 1--20
+ Year: 2017
+ Publisher: ACM New York, NY, USA
+Reference:
+ Title: "Efficient Approximation of the Matching Distance for 2-parameter persistence"
+ Author: Kerber, Michael and Nigmetov, Arnur
+ Year: 2020
+ Type: inproceedings
+ Journal: SoCG 2020
+
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..61c78cb
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*@ARCHIVE_EXT@)%@PACKAGE@-$1%, repacksuffix=+dfsg, dversionmangle=auto" \
+ https://github.com/anigmetov/hera/tags \
+ (?:.*?/)?v?@ANY_VERSION@@ARCHIVE_EXT@ \ No newline at end of file