summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLars Bilke <lars.bilke@ufz.de>2026-05-26 12:10:31 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-05-29 16:36:18 +0100
commitfa5a46958fc173d72b98e89aae807c0d7f86d6b4 (patch)
treed0929ae5eba26cb19add1f50f4fbecb046963148 /gnu/packages
parente87c221cd250ba1bf8486221eafd5653e4445063 (diff)
gnu: Add xdmf.
* gnu/packages/math.scm (xdmf): New variable. * gnu/packages/patches/xdmf-3.0.0-hdf5.patch: Patch for xdmf. * gnu/local.mk: Register patch. Relates-to: guix/guix!8841 Change-Id: I0606eaf8f6524f3efe71b442405438e4df070ff7 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/maths.scm32
-rw-r--r--gnu/packages/patches/xdmf-3.0.0-hdf5.patch45
2 files changed, 77 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1cb54b1d7b6..875e6209be3 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -11732,3 +11732,35 @@ use the library and researchers to make new capabilities available under a
11732common interface. 11732common interface.
11733") 11733")
11734 (license license:bsd-3))) 11734 (license license:bsd-3)))
11735
11736(define-public xdmf
11737 (package
11738 (name "xdmf")
11739 ;; Project does not publish releases / tags
11740 (properties '((commit . "04a84bab0eb1568e0f1a27c8fb60c6931efda003")
11741 (revision . "0")))
11742 (version (git-version "3.0.0"
11743 (assoc-ref properties 'revision)
11744 (assoc-ref properties 'commit)))
11745 (source
11746 (origin
11747 (method git-fetch)
11748 (uri (git-reference
11749 (url "https://gitlab.kitware.com/xdmf/xdmf")
11750 (commit (assoc-ref properties 'commit))))
11751 (file-name (git-file-name name version))
11752 (patches
11753 (search-patches "xdmf-3.0.0-hdf5.patch"))
11754 (sha256
11755 (base32 "06k4vibkvgxlzkn06x470aq5q18p7yhql8awrpdz3czys3z8i288"))))
11756 (build-system cmake-build-system)
11757 (arguments
11758 (list #:tests? #f)) ;has no tests
11759 (inputs
11760 (list boost hdf5 libxml2))
11761 (home-page "https://www.xdmf.org/index.html")
11762 (synopsis "XDMF library")
11763 (description
11764 "This package provides the eXtensible Data Model and Format (XDMF) C++
11765library.")
11766 (license license:bsd-4)))
diff --git a/gnu/packages/patches/xdmf-3.0.0-hdf5.patch b/gnu/packages/patches/xdmf-3.0.0-hdf5.patch
new file mode 100644
index 00000000000..98138f250bb
--- /dev/null
+++ b/gnu/packages/patches/xdmf-3.0.0-hdf5.patch
@@ -0,0 +1,45 @@
1From 92a851f1acb87ad5367eb62f9b97785bedb700bb Mon Sep 17 00:00:00 2001
2From: Dmitri Naumov <github@naumov.de>
3Date: Thu, 28 Oct 2021 22:34:00 +0200
4Subject: [PATCH] Detect if hid_t is defined in new versions of HDF5
5
6In HDF5 development the header file guards were changed,
7namely the leading underscore was removed. This lead to
8a redefinition of the hid_t type, which is int64_t.
9
10The change happened in commit
11https://github.com/HDFGroup/hdf5/commit/c17b4b93d680340af2b3f2c026f2c03c3baeb33ahttps://github.com/HDFGroup/hdf5/commit/c17b4b93d680340af2b3f2c026f2c03c3baeb33a
12and is published in HDF5 version hdf5-1_13_0-rc6.
13---
14 core/XdmfHDF5Controller.hpp | 2 +-
15 core/XdmfHDF5Writer.hpp | 2 +-
16 2 files changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/core/XdmfHDF5Controller.hpp b/core/XdmfHDF5Controller.hpp
19index c5c15d0a..b52bab3f 100644
20--- a/core/XdmfHDF5Controller.hpp
21+++ b/core/XdmfHDF5Controller.hpp
22@@ -30,7 +30,7 @@
23
24 // So that hdf5 does not need to be included in the header files
25 // It would add a dependancy to programs that use Xdmf
26-#ifndef _H5Ipublic_H
27+#if !defined(_H5Ipublic_H) && !defined(H5Ipublic_H)
28 #ifndef XDMF_HID_T
29 #define XDMF_HID_T
30 typedef int hid_t;
31diff --git a/core/XdmfHDF5Writer.hpp b/core/XdmfHDF5Writer.hpp
32index cfbec6f4..6f8cfd4f 100644
33--- a/core/XdmfHDF5Writer.hpp
34+++ b/core/XdmfHDF5Writer.hpp
35@@ -31,7 +31,7 @@
36
37 // So that hdf5 does not need to be included in the header files
38 // It would add a dependancy to programs that use Xdmf
39-#ifndef _H5Ipublic_H
40+#if !defined(_H5Ipublic_H) && !defined(H5Ipublic_H)
41 #ifndef XDMF_HID_T
42 #define XDMF_HID_T
43 typedef int hid_t;
44--
45GitLab