summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorThomas Danckaert <thomas.danckaert@gmail.com>2016-09-28 10:34:58 +0200
committerLudovic Courtès <ludo@gnu.org>2016-10-12 23:35:43 +0200
commitbecbbefc9b13c409178e06a048ed1b4fadc5b0fb (patch)
treec1ce4f8646cdaca822d0d5e70d085d570abfda55 /gnu/packages/maths.scm
parent69e7322fdccaf28aad644ffaf9dedb7f21327f49 (diff)
gnu: Add hdf4
* gnu/packages/maths.scm (hdf4, hdf4-alt): New variables. * gnu/packages/patches/hdf4-reproducibility.patch: New file. * gnu/packages/patches/hdf4-shared-fortran.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patches. Co-Authored-By: Jeremy Robst <jpro@bas.ac.uk> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm59
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d5e82bb4fa..07934e3114 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -445,6 +445,65 @@ computations.")
(home-page "https://github.com/OkoSanto/GCTP")
(license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html
+(define-public hdf4
+ (package
+ (name "hdf4")
+ (version "4.2.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF"
+ version "/src/hdf-" version ".tar.bz2"))
+ (sha256
+ (base32 "16yr50j845zlfx20skmw3y75ww77akk9gg0affjqkg66ih5r03mv"))
+ (patches (search-patches "hdf4-reproducibility.patch"
+ "hdf4-shared-fortran.patch"))))
+
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("bison" ,bison)
+ ("flex" ,flex)))
+ (inputs
+ `(("zlib" ,zlib)
+ ("libjpeg" ,libjpeg)))
+ (arguments
+ `(#:parallel-tests? #f
+ #:configure-flags '("--enable-shared")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patchbuild
+ (lambda _
+ (substitute*
+ '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in")
+ (("/bin/rm") "rm")
+ (("/bin/mkdir") "mkdir"))
+ (substitute* (find-files "." "^Makefile\\.in$")
+ (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \
+-R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "")
+ (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \
+-R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \
+-R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") "")))))))
+ (home-page "https://www.hdfgroup.org/products/hdf4/")
+ (synopsis
+ "Library and multi-object file format for storing and managing data")
+ (description "HDF4 is a library and multi-object file format for storing
+and managing data between machines. HDF4 is an older hierarchical data format,
+incompatible with HDF5.")
+ (license
+ (license:non-copyleft
+ "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING"))))
+
+(define-public hdf4-alt
+ (package
+ (inherit hdf4)
+ (name "hdf4-alt")
+ (arguments
+ (substitute-keyword-arguments (package-arguments hdf4)
+ ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags))))
+ (synopsis
+ "HDF4 without netCDF API, can be combined with the regular netCDF library")))
+
(define-public hdf5
(package
(name "hdf5")