mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
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:
parent
c9d90972b3
commit
0b3aae1a82
3 changed files with 103 additions and 0 deletions
72
projects/hdfgroup.org/HDF5/package.yml
Normal file
72
projects/hdfgroup.org/HDF5/package.yml
Normal 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}}
|
6
projects/hdfgroup.org/HDF5/test.c
Normal file
6
projects/hdfgroup.org/HDF5/test.c
Normal 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;
|
||||||
|
}
|
25
projects/hdfgroup.org/HDF5/test.f90
Normal file
25
projects/hdfgroup.org/HDF5/test.f90
Normal 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
|
Loading…
Reference in a new issue