hdfgroup.org/HDF5 (#2314)

* hdfgroup.org/HDF5

* --libdir

* maybe --enable-shared=no

* sed

* HDF5_ROOT & additional test

* sed

* maybe sed -i ''

* modified:   projects/hdfgroup.org/HDF5/package.yml

* sed
This commit is contained in:
Andrew 2023-06-28 22:52:55 +03:00 committed by GitHub
parent c9d90972b3
commit 0b3aae1a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 103 additions and 0 deletions

View file

@ -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
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}}

View file

@ -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;
}

View file

@ -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