git: 7e7034a7fa7d - main - biology/ncbi-vdb: Fix build with HDF5 1.12.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 18 Jul 2022 12:51:51 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7e7034a7fa7d3aa61b31394702d0f88ad504bb6c

commit 7e7034a7fa7d3aa61b31394702d0f88ad504bb6c
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-07-18 12:50:17 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-07-18 12:50:17 +0000

    biology/ncbi-vdb: Fix build with HDF5 1.12.0+
---
 biology/ncbi-vdb/files/patch-hdf5 | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/biology/ncbi-vdb/files/patch-hdf5 b/biology/ncbi-vdb/files/patch-hdf5
new file mode 100644
index 000000000000..0566ee28dc25
--- /dev/null
+++ b/biology/ncbi-vdb/files/patch-hdf5
@@ -0,0 +1,30 @@
+--- interfaces/ext/hdf5/H5Opublic.h.orig	2021-03-15 18:16:43 UTC
++++ interfaces/ext/hdf5/H5Opublic.h
+@@ -150,8 +150,13 @@ H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *
+     H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
+ H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id);
+ H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo);
++#if H5_VERSION_GE(1,12,0)
++H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, unsigned fields,
++    hid_t lapl_id);
++#else
+ H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo,
+     hid_t lapl_id);
++#endif
+ H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name,
+     H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo,
+     hid_t lapl_id);
+--- libs/hdf5/hdf5dir.c.orig	2021-03-15 18:16:43 UTC
++++ libs/hdf5/hdf5dir.c
+@@ -292,7 +292,11 @@ rc_t CC HDF5DirVisitUpdate ( HDF5Dir *self, bool recur
+ static uint32_t HDF5DirPathTypeOnBuffer( const HDF5Dir *self, const char *buffer )
+ {
+     H5O_info_t obj_info;
++#if H5_VERSION_GE(1,12,0)
++    herr_t h5e = H5Oget_info_by_name( self->hdf5_handle, buffer, &obj_info, H5O_INFO_BASIC, H5P_DEFAULT );
++#else
+     herr_t h5e = H5Oget_info_by_name( self->hdf5_handle, buffer, &obj_info, H5P_DEFAULT );
++#endif
+     if ( h5e >= 0 )
+     {
+         switch( obj_info.type )