summaryrefslogtreecommitdiff
path: root/debian/patches/0005-Support-Hera-1.0.patch
blob: de783cb48648ed6e921fecb2e6178c59a7ca5a65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From: Gard Spreemann <gspr@nonempty.org>
Date: Fri, 20 Jan 2023 17:02:04 +0100
Subject: Support Hera 1.0

Upstream GUDHI now expects Hera's headers to be organized as in Hera
2.0. This patch restores the old behavior until Hera 2.0 is available
in Debian.
---
 src/Nerve_GIC/include/gudhi/GIC.h        | 4 ++--
 src/cmake/modules/GUDHI_submodules.cmake | 2 +-
 src/python/gudhi/hera/bottleneck.cc      | 2 +-
 src/python/gudhi/hera/wasserstein.cc     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h
index 047fba6..560f7d6 100644
--- a/src/Nerve_GIC/include/gudhi/GIC.h
+++ b/src/Nerve_GIC/include/gudhi/GIC.h
@@ -20,9 +20,9 @@
 #if __has_include(<CGAL/version.h>)
 # define GUDHI_GIC_USE_CGAL 1
 # include <gudhi/Bottleneck.h>
-#elif __has_include(<hera/bottleneck.h>)
+#elif __has_include(<bottleneck.h>)
 # define GUDHI_GIC_USE_HERA 1
-# include <hera/bottleneck.h>
+# include <bottleneck.h>
 #endif
 
 #include <gudhi/Debug_utils.h>
diff --git a/src/cmake/modules/GUDHI_submodules.cmake b/src/cmake/modules/GUDHI_submodules.cmake
index 9ede852..cec9390 100644
--- a/src/cmake/modules/GUDHI_submodules.cmake
+++ b/src/cmake/modules/GUDHI_submodules.cmake
@@ -2,4 +2,4 @@
 set(HERA_INTERNAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/hera/include)
 set(HERA_INCLUDE_DIR ${HERA_INTERNAL_INCLUDE_DIR} CACHE PATH "Directory where one can find hera/{wasserstein.h,bottleneck.h}")
 # since everything is cleanly under include/hera/, there is no harm always including it
-include_directories(${HERA_INCLUDE_DIR})
+include_directories(${HERA_INCLUDE_DIR}/bottleneck ${HERA_INCLUDE_DIR}/wasserstein)
diff --git a/src/python/gudhi/hera/bottleneck.cc b/src/python/gudhi/hera/bottleneck.cc
index ec461f7..0cb562c 100644
--- a/src/python/gudhi/hera/bottleneck.cc
+++ b/src/python/gudhi/hera/bottleneck.cc
@@ -16,7 +16,7 @@
 using py::ssize_t;
 #endif
 
-#include <hera/bottleneck.h> // Hera
+#include <bottleneck.h> // Hera
 
 double bottleneck_distance(Dgm d1, Dgm d2, double delta)
 {
diff --git a/src/python/gudhi/hera/wasserstein.cc b/src/python/gudhi/hera/wasserstein.cc
index 3516352..e1bb1d7 100644
--- a/src/python/gudhi/hera/wasserstein.cc
+++ b/src/python/gudhi/hera/wasserstein.cc
@@ -16,7 +16,7 @@
 using py::ssize_t;
 #endif
 
-#include <hera/wasserstein.h> // Hera
+#include <wasserstein.h> // Hera
 
 double wasserstein_distance(
     Dgm d1, Dgm d2,