Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions projects/hdfgroup.org/HDF5/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
distributable:
url: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{{version.marketing}}/hdf5-{{version}}/src/hdf5-{{version}}-2.tar.bz2
strip-components: 2

versions:
- 1.14.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the versions. On the page https://support.hdfgroup.org/ftp/HDF5/releases/, there is no list of all versions, only folders with {{version.marketing}}. And the latest version has an additional -2 in the file name (1.14.1-2.tar.bz2), while the others don't (1.14.0.tar.bz2, 1.13.3.tar.bz2).

There is only one version available on GitHub (hdf5-1_14_1-2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, they don't make it easy. Might be the best we can do for now.


dependencies:
gnu.org/gcc: '*'
dkrz.de/libaec: '*'
linux:
zlib.net: '*'

runtime:
env:
HDF5_ROOT: '{{prefix}}'

build:
dependencies:
tea.xyz/gx/make: '*'
gnu.org/autoconf: '*'
gnu.org/automake: '*'
gnu.org/libtool: '*'

script:
- autoreconf --force --install --verbose
- ./configure $ARGS
- make --jobs {{hw.concurrency}} install
- sed -i'' -e 's|prefix="{{prefix}}"|prefix="${HDF5_ROOT}"|g' {{prefix}}/bin/h5cc {{prefix}}/bin/h5c++ {{prefix}}/bin/h5fc

env:
HDF5_ROOT: '{{prefix}}'
ARGS:
- --prefix="$HDF5_ROOT"
- --disable-dependency-tracking
- --disable-silent-rules
- --enable-build-mode=production
- --enable-fortran
- --enable-cxx
- --with-szlib={{deps.dkrz.de/libaec.prefix}}
linux:
ARGS:
- --with-zlib={{deps.zlib.net.prefix}}

provides:
- bin/h5c++
- bin/h5cc
- bin/h5clear
- bin/h5copy
- bin/h5debug
- bin/h5delete
- bin/h5diff
- bin/h5dump
- bin/h5fc
- bin/h5format_convert
- bin/h5import
- bin/h5jam
- bin/h5ls
- bin/h5mkgrp
- bin/h5perf_serial
- bin/h5redeploy
- bin/h5repack
- bin/h5repart
- bin/h5stat
- bin/h5unjam
- bin/h5watch

test:
- h5cc test.c
- ./a.out | grep {{version}}
- h5fc test.f90
- ./a.out | grep {{version}}
6 changes: 6 additions & 0 deletions projects/hdfgroup.org/HDF5/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>
#include "hdf5.h"
int main() {
printf("%d.%d.%d\\n", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE);
return 0;
}
25 changes: 25 additions & 0 deletions projects/hdfgroup.org/HDF5/test.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use hdf5
integer(hid_t) :: f, dspace, dset
integer(hsize_t), dimension(2) :: dims = [2, 2]
integer :: error = 0, major, minor, rel

call h5open_f (error)
if (error /= 0) call abort
call h5fcreate_f ("test.h5", H5F_ACC_TRUNC_F, f, error)
if (error /= 0) call abort
call h5screate_simple_f (2, dims, dspace, error)
if (error /= 0) call abort
call h5dcreate_f (f, "data", H5T_NATIVE_INTEGER, dspace, dset, error)
if (error /= 0) call abort
call h5dclose_f (dset, error)
if (error /= 0) call abort
call h5sclose_f (dspace, error)
if (error /= 0) call abort
call h5fclose_f (f, error)
if (error /= 0) call abort
call h5close_f (error)
if (error /= 0) call abort
CALL h5get_libversion_f (major, minor, rel, error)
if (error /= 0) call abort
write (*,"(I0,'.',I0,'.',I0)") major, minor, rel
end