[PATCH] gnu: Add netcdf-cxx4 and netcdf-cxx4-parallel-openmpi.

  • Open
  • quality assurance status badge
Details
One participant
  • Lars Bilke
Owner
unassigned
Submitted by
Lars Bilke
Severity
normal
L
L
Lars Bilke wrote 3 days ago
(address . guix-patches@gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
d9c4258d1db0848b509c982babb2fe0a1426ecd8.1735825930.git.lars.bilke@ufz.de
* gnu/packages/maths.scm (netcdf-cxx4): New variable.
* gnu/packages/maths.scm (netcdf-cxx4-parallel-openmpi: New variable.

Change-Id: I9781aa31567b80e20c528abb5e9289bc625bb3eb
---
gnu/packages/maths.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)

Toggle diff (75 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 22e2822c8c..71ea757e0e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2381,6 +2381,66 @@ (define-public netcdf-fortran
(home-page (package-home-page netcdf))
(license (package-license netcdf))))
+(define-public netcdf-cxx4
+ (package
+ (name "netcdf-cxx4")
+ (synopsis "NetCDF C++ interface")
+ (license license:bsd-3)
+ (description "C++ interface for NetCDF.")
+ (home-page "https://github.com/Unidata/netcdf-cxx4")
+ (version "4.3.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Unidata/netcdf-cxx4")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"))))
+ (build-system cmake-build-system)
+ (inputs (list netcdf hdf5))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'configure 'patch-configure
+ (lambda _
+ (substitute* "libnetcdf-cxx.settings.in"
+ ;; Don't record the build-time host, time and gcc path to make the
+ ;; settings file reproducible.
+ (("@CONFIG_DATE@")
+ "Not set (Guix build)")
+ (("@host_cpu@-@host_vendor@-@host_os@")
+ "Linux")
+ (("@CC_VERSION@")
+ "gcc"))
+ ;; The filter tests fail with 'Caught unexpected exception'.
+ (substitute* "cxx4/CMakeLists.txt"
+ (("add_bin_test\\(cxx4 test_filter\\)")
+ ""))
+ (substitute* "examples/CMakeLists.txt"
+ (("add_sh_test\\(examples tst_filter\\)")
+ ""))))
+ (add-after 'install 'clear-reference-to-compiler
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Do not retain a reference to GCC and other build only inputs.
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (string-append out "/bin/ncxx4-config")
+ (("cc=([[:graph:]]+)/bin/gcc")
+ "cc=\"gcc")
+ (("cxx=([[:graph:]]+)/bin/c\\+\\+")
+ "cxx=\"c++"))))))
+ #:configure-flags (list (string-append "-DHDF5_C_LIBRARY_hdf5="
+ (assoc-ref %build-inputs "hdf5")
+ "/lib/libhdf5.so"))))))
+
+(define-public netcdf-cxx4-parallel-openmpi
+ (package
+ (inherit netcdf-cxx4)
+ (name "netcdf-cxx4-parallel-openmpi")
+ (inputs (modify-inputs (package-inputs netcdf-cxx4)
+ (prepend openmpi)
+ (replace "hdf5" hdf5-parallel-openmpi)
+ (replace "netcdf" netcdf-parallel-openmpi)))))
+
(define-public n2p2
(package
(name "n2p2")

base-commit: ab43d883a0a88adbcfd3c3ab8d4c097cd9054b90
--
2.46.1
L
L
Lars Bilke wrote 44 hours ago
[PATCH v2] gnu: Add netcdf-cxx4 and netcdf-cxx4-parallel-openmpi.
(address . 75284@debbugs.gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
5bab815c259ef005cc5ef338dffe397a1d2a981a.1735888888.git.lars.bilke@ufz.de
* gnu/packages/maths.scm (netcdf-cxx4): New variable.
* gnu/packages/maths.scm (netcdf-cxx4-parallel-openmpi: New variable.

Change-Id: I9781aa31567b80e20c528abb5e9289bc625bb3eb
---
gnu/packages/maths.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)

Toggle diff (75 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 22e2822c8c..dee8c0636a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2381,6 +2381,66 @@ (define-public netcdf-fortran
(home-page (package-home-page netcdf))
(license (package-license netcdf))))
+(define-public netcdf-cxx4
+ (package
+ (name "netcdf-cxx4")
+ (version "4.3.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Unidata/netcdf-cxx4")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'configure 'patch-configure
+ (lambda _
+ (substitute* "libnetcdf-cxx.settings.in"
+ ;; Don't record the build-time host, time and gcc path to make the
+ ;; settings file reproducible.
+ (("@CONFIG_DATE@")
+ "Not set (Guix build)")
+ (("@host_cpu@-@host_vendor@-@host_os@")
+ "Linux")
+ (("@CC_VERSION@")
+ "gcc"))
+ ;; The filter tests fail with 'Caught unexpected exception'.
+ (substitute* "cxx4/CMakeLists.txt"
+ (("add_bin_test\\(cxx4 test_filter\\)")
+ ""))
+ (substitute* "examples/CMakeLists.txt"
+ (("add_sh_test\\(examples tst_filter\\)")
+ ""))))
+ (add-after 'install 'clear-reference-to-compiler
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Do not retain a reference to GCC and other build only inputs.
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (string-append out "/bin/ncxx4-config")
+ (("cc=([[:graph:]]+)/bin/gcc")
+ "cc=\"gcc")
+ (("cxx=([[:graph:]]+)/bin/c\\+\\+")
+ "cxx=\"c++"))))))
+ #:configure-flags (list (string-append "-DHDF5_C_LIBRARY_hdf5="
+ (assoc-ref %build-inputs "hdf5")
+ "/lib/libhdf5.so"))))
+ (inputs (list netcdf hdf5))
+ (home-page "https://github.com/Unidata/netcdf-cxx4")
+ (synopsis "NetCDF C++ interface")
+ (description "C++ interface for NetCDF.")
+ (license license:bsd-3)))
+
+(define-public netcdf-cxx4-parallel-openmpi
+ (package
+ (inherit netcdf-cxx4)
+ (name "netcdf-cxx4-parallel-openmpi")
+ (inputs (modify-inputs (package-inputs netcdf-cxx4)
+ (prepend openmpi)
+ (replace "hdf5" hdf5-parallel-openmpi)
+ (replace "netcdf" netcdf-parallel-openmpi)))))
+
(define-public n2p2
(package
(name "n2p2")

base-commit: ab43d883a0a88adbcfd3c3ab8d4c097cd9054b90
--
2.46.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75284@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75284
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch