diffstat for h5z-zfp-1.1.1 h5z-zfp-1.1.1

 changelog            |   10 ++++++++++
 patches/pr_168.patch |   37 +++++++++++++++++++++++++++++++++++++
 patches/series       |    1 +
 3 files changed, 48 insertions(+)

diff -Nru h5z-zfp-1.1.1/debian/changelog h5z-zfp-1.1.1/debian/changelog
--- h5z-zfp-1.1.1/debian/changelog	2024-01-19 14:27:49.000000000 +0200
+++ h5z-zfp-1.1.1/debian/changelog	2026-08-09 15:59:41.000000000 +0300
@@ -1,3 +1,13 @@
+h5z-zfp (1.1.1-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Gilles Filippini ]
+  * Upstream patch pr_168.patch to fix FTBFS against HDF5 2.1.0 (closes:
+    #1139312)
+
+ -- Adrian Bunk <bunk@debian.org>  Sun, 09 Aug 2026 15:59:41 +0300
+
 h5z-zfp (1.1.1-2) unstable; urgency=medium
 
   * d/t/control: No need to rebuild, rely on the testbed
diff -Nru h5z-zfp-1.1.1/debian/patches/pr_168.patch h5z-zfp-1.1.1/debian/patches/pr_168.patch
--- h5z-zfp-1.1.1/debian/patches/pr_168.patch	1970-01-01 02:00:00.000000000 +0200
+++ h5z-zfp-1.1.1/debian/patches/pr_168.patch	2026-08-09 15:59:36.000000000 +0300
@@ -0,0 +1,37 @@
+From ee03142d1d1cb4097553c19c450497d5683eba6e Mon Sep 17 00:00:00 2001
+From: Scot Breitenfeld <brtnfld@hdfgroup.org>
+Date: Fri, 12 Jun 2026 08:36:34 -0500
+Subject: [PATCH] Fix test_error chunk offset detection for HDF5 2.1.0 (#167)
+
+Use H5Dget_chunk_info_by_coord (HDF5 1.12+) to dynamically find the
+chunk's file offset instead of the hardcoded value 3496.  HDF5 2.1.0
+changed internal file layout so the chunk no longer lives at that
+address, causing the raw-byte corruption to miss the ZFP stream and
+yielding only 652 differing values instead of the expected 1408.
+---
+ test/test_error.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/test/test_error.c b/test/test_error.c
+index d358fc2..d4a1305 100644
+--- a/test/test_error.c
++++ b/test/test_error.c
+@@ -148,8 +148,17 @@ int main(int argc, char **argv)
+     cpid = setup_filter(1, chunk, zfpmode, rate, acc, prec, minbits, maxbits, maxprec, minexp);
+     if (0 > (dsid = H5Dcreate(fid, "corrupted_data", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, cpid, H5P_DEFAULT))) SET_ERROR(H5Dcreate);
+     if (0 > H5Dwrite(dsid, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)) SET_ERROR(H5Dwrite);
+-    off = 3496; // H5Dget_offset(dsid);
++#if H5_VERSION_GE(1,10,5)
++    {
++        hsize_t coord[1] = {0};
++        unsigned filter_mask;
++        /* H5Dget_offset returns HADDR_UNDEF for chunked datasets; use chunk info API instead */
++        if (0 > H5Dget_chunk_info_by_coord(dsid, coord, &filter_mask, &off, &siz)) SET_ERROR(H5Dget_chunk_info_by_coord);
++    }
++#else
++    off = 3496;
+     siz = H5Dget_storage_size(dsid);
++#endif
+     if (0 > H5Dclose(dsid)) SET_ERROR(H5Dclose);
+     if (0 > H5Pclose(cpid)) SET_ERROR(H5Pclose);
+ 
diff -Nru h5z-zfp-1.1.1/debian/patches/series h5z-zfp-1.1.1/debian/patches/series
--- h5z-zfp-1.1.1/debian/patches/series	1970-01-01 02:00:00.000000000 +0200
+++ h5z-zfp-1.1.1/debian/patches/series	2026-08-09 15:59:36.000000000 +0300
@@ -0,0 +1 @@
+pr_168.patch
