[packages/hdf5_hl_region] - adjusted for hdf5 1.14; release 2
qboosh
qboosh at pld-linux.org
Sat Dec 14 22:14:21 CET 2024
commit 5e8db0bc2e04b4d40d249a0743fcf19db8bf3fd4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Dec 14 22:10:07 2024 +0100
- adjusted for hdf5 1.14; release 2
hdf5_hl_region-fortran-check.patch | 5 +-
hdf5_hl_region-shared.patch | 19 +--
hdf5_hl_region-update.patch | 259 +++++++++++++++++++++++++++++++++++++
hdf5_hl_region.spec | 24 ++--
4 files changed, 285 insertions(+), 22 deletions(-)
---
diff --git a/hdf5_hl_region.spec b/hdf5_hl_region.spec
index 36ace9b..5c4ed8b 100644
--- a/hdf5_hl_region.spec
+++ b/hdf5_hl_region.spec
@@ -1,13 +1,13 @@
#
# Conditional build:
%bcond_without fortran # Fortran API
-%bcond_without tests # perform "make tests"
+%bcond_without tests # unit tests
#
Summary: High-Level Library for handling HDF5 object and region references
Summary(pl.UTF-8): Wysokopoziomowa biblioteka do obsługi odniesień do obiektów i regionów HDF5
Name: hdf5_hl_region
Version: 1.1.5
-Release: 1
+Release: 2
License: BSD-like, changed sources must be marked
Group: Libraries
Source0: https://gamma.hdfgroup.org/ftp/pub/outgoing/JPSS/HL_JPSS/hdf5_HL_REGION-%{version}.tar
@@ -15,11 +15,12 @@ Source0: https://gamma.hdfgroup.org/ftp/pub/outgoing/JPSS/HL_JPSS/hdf5_HL_REGION
Patch0: %{name}-shared.patch
Patch1: %{name}-destdir.patch
Patch2: %{name}-fortran-check.patch
+Patch3: %{name}-update.patch
URL: http://portal.hdfgroup.org/display/support/Joint+Polar+Satellite+System+-+JPSS
-BuildRequires: hdf5-devel
-%{?with_fortran:BuildRequires: hdf5-fortran-devel}
-%{?with_tests:BuildRequires: hdf5-progs}
-BuildRequires: libtool
+BuildRequires: hdf5-devel >= 1.14
+%{?with_fortran:BuildRequires: hdf5-fortran-devel >= 1.14}
+%{?with_tests:BuildRequires: hdf5-progs >= 1.14}
+BuildRequires: libtool >= 2:1.5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -45,7 +46,7 @@ Summary: Header files for HDF5 HL_REGION library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki HDF5 HL_REGION
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: hdf5-devel
+Requires: hdf5-devel >= 1.14
%description devel
Header files for HDF5 HL_REGION library.
@@ -116,15 +117,16 @@ Statyczna biblioteka HDF5 HL_REGION dla Fortranu.
%prep
%setup -q -n hdf5_HL_REGION-%{version}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
+%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
%build
%{__make} -j1 \
CC="%{__cc}" \
FC="%{_target_alias}-gfortran" \
- CCFLAGS="%{rpmcflags}" \
+ CCFLAGS="%{rpmcflags} -DH5_HAVE_C99_FUNC=1" \
FCFLAGS="%{rpmcflags}" \
HDF5_INSTALL_DIR=/usr \
HDF5_USE_SHLIB=yes \
diff --git a/hdf5_hl_region-fortran-check.patch b/hdf5_hl_region-fortran-check.patch
index c5ba133..8098d89 100644
--- a/hdf5_hl_region-fortran-check.patch
+++ b/hdf5_hl_region-fortran-check.patch
@@ -9,9 +9,10 @@
# check to make sure hdf5 was built with --enable-fortran2003 (needed for versions prior to 1.10)
- CHCK_HDF5VER:= $(strip $(shell $(FC) -showconfig | grep -i "HDF5 Version:" | sed 's/^.* //g'))
-+ CHCK_HDF5VER:= $(strip $(shell $(H5FC) -showconfig | grep -i "HDF5 Version:" | sed 's/^.* //g'))
- ifeq "$(shell expr $(CHCK_HDF5VER) \<1.9)" "1"
+- ifeq "$(shell expr $(CHCK_HDF5VER) \<1.9)" "1"
- CHCK_H5FC2003:= $(strip $(shell $(FC) -showconfig | grep -i 2003))
++ CHCK_HDF5VER:= $(strip $(shell $(H5FC) -showconfig | grep -i "HDF5 Version:" | sed 's/^.* //g'))
++ ifeq "0" "1"
+ CHCK_H5FC2003:= $(strip $(shell $(H5FC) -showconfig | grep -i 2003))
ifneq ("$(CHCK_H5FC2003)","Fortran 2003 Compiler: yes")
$(error "CONFIGURE ERROR: HDF5 library must be built with the --enable-fortran2003 option")
diff --git a/hdf5_hl_region-shared.patch b/hdf5_hl_region-shared.patch
index 2744a74..996dff4 100644
--- a/hdf5_hl_region-shared.patch
+++ b/hdf5_hl_region-shared.patch
@@ -58,8 +58,8 @@
tests:
./test_bitfield; ./test_regref_hyper
---- hdf5_HL_REGION-1.1.1/examples/Makefile.orig 2011-12-20 21:39:38.000000000 +0100
-+++ hdf5_HL_REGION-1.1.1/examples/Makefile 2013-03-03 17:59:12.908732842 +0100
+--- hdf5_HL_REGION-1.1.5/examples/Makefile.orig 2016-07-19 16:32:33.000000000 +0200
++++ hdf5_HL_REGION-1.1.5/examples/Makefile 2024-12-14 16:15:44.200665735 +0100
@@ -14,7 +14,8 @@
##############################################################################
@@ -70,8 +70,8 @@
INCLUDES = -I../src
# compiler
-@@ -24,28 +25,28 @@
- all: ex_bitfield ex_lite_copy_region ex_lite_read_region ex_regref_copy_references ex_regref_create ex_regref_read ex_ref_to_all ex_GMGTO
+@@ -26,28 +27,28 @@ TMP_HDF5_FILES = $(addsuffix .h5, $(EXEC
+ all: $(EXEC)
ex_bitfield: ex_bitfield.c
- $(CC) ex_bitfield.c -o ex_bitfield $(LIBS) $(INCLUDES)
@@ -155,9 +155,9 @@
clean:
\rm -f $(OBJ_C) $(OBJ_F90) $(OUT) *.mod
---- hdf5_HL_REGION-1.1.1/fortran/examples/Makefile.orig 2011-12-20 21:39:38.000000000 +0100
-+++ hdf5_HL_REGION-1.1.1/fortran/examples/Makefile 2013-03-03 18:07:22.965378941 +0100
-@@ -13,8 +13,8 @@
+--- hdf5_HL_REGION-1.1.5/fortran/examples/Makefile.orig 2024-12-14 16:16:22.943789179 +0100
++++ hdf5_HL_REGION-1.1.5/fortran/examples/Makefile 2024-12-14 16:17:26.760110123 +0100
+@@ -13,9 +13,9 @@
#
##############################################################################
@@ -169,7 +169,8 @@
+INCLUDES = -I../src -I../../src -I/usr/include
# compiler
-@@ -25,25 +25,25 @@
+ FC = $(HDF5_INSTALL_DIR)/bin/h5fc
+@@ -26,25 +26,25 @@ TMP_HDF5_FILES = $(addsuffix .h5, $(EXEC
all: $(EXEC)
ex_lite_read_region: ex_lite_read_region.f90
@@ -200,8 +201,8 @@
- $(FC) ex_ref_to_all.f90 -o ex_ref_to_all $(LIBS) $(INCLUDES)
+ $(LIBTOOL) --mode=link --tag=F77 $(FC) ex_ref_to_all.f90 -o ex_ref_to_all $(LIBS) $(INCLUDES)
-
tests:
+ ./test.sh
--- hdf5_HL_REGION-1.1.3/fortran/test/Makefile.orig 2015-01-28 21:24:12.416951770 +0100
+++ hdf5_HL_REGION-1.1.3/fortran/test/Makefile 2015-01-28 21:35:49.700255840 +0100
@@ -14,9 +14,10 @@
diff --git a/hdf5_hl_region-update.patch b/hdf5_hl_region-update.patch
new file mode 100644
index 0000000..7bf711b
--- /dev/null
+++ b/hdf5_hl_region-update.patch
@@ -0,0 +1,259 @@
+--- hdf5_HL_REGION-1.1.5/src/hl_region_H5LR.c.orig 2016-06-20 23:28:59.000000000 +0200
++++ hdf5_HL_REGION-1.1.5/src/hl_region_H5LR.c 2024-12-14 18:46:07.798447376 +0100
+@@ -200,7 +200,7 @@ op_func_L(hid_t loc_id, const char *name
+ * The name of the object is passed to this function by
+ * the Library.
+ */
+- status = H5Oget_info_by_name(loc_id, name, &infobuf, H5P_DEFAULT);
++ status = H5Oget_info_by_name3(loc_id, name, &infobuf, H5O_INFO_ALL, H5P_DEFAULT);
+ if(status < 0) return -1;
+
+ return op_func(loc_id, name, &infobuf, operator_data);
+@@ -626,12 +626,12 @@ H5LRmake_dataset(hid_t loc_id, const cha
+ */
+
+ for(i=0; i<buf_size; i++) {
+- dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref[i]);
++ dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref + i);
+ if(dset_ref < 0)
+ H5E_THROW(H5E_NOTFOUND, "H5LR: Failed to open object referenced")
+
+ /* Retrieve the dataspace with the specified region selected */
+- space_ref = H5Rget_region (dset_ref, H5R_DATASET_REGION, ref[i]);
++ space_ref = H5Rget_region (dset_ref, H5R_DATASET_REGION, ref + i);
+ if(space_ref < 0)
+ H5E_THROW(H5E_CANTGET, "H5LR: Retrieving dataspace referenced failed")
+
+@@ -760,12 +760,12 @@ H5LRmake_dataset(hid_t loc_id, const cha
+ /* loop over the region references to write data into new data set */
+ icnt = 0;
+ for(i=0; i<buf_size; i++) {
+- dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref[i]);
++ dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref + i);
+ if(dset_ref < 0)
+ H5E_THROW(H5E_NOTFOUND, "H5LR: Failed to open object referenced")
+
+ /* Retrieve the dataspace with the specified region selected */
+- space_ref = H5Rget_region(dset_ref, H5R_DATASET_REGION, ref[i]);
++ space_ref = H5Rget_region(dset_ref, H5R_DATASET_REGION, ref + i);
+ if(space_ref < 0)
+ H5E_THROW(H5E_CANTGET, "H5LR: Retrieving dataspace referenced failed")
+
+@@ -1784,12 +1784,12 @@ H5LRmake_dataset_FORTRAN(hid_t loc_id, c
+ */
+
+ for(i=0; i<buf_size; i++) {
+- dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref[i]);
++ dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref + i);
+ if(dset_ref < 0)
+ H5E_THROW(H5E_NOTFOUND, "H5LR: Failed to open object referenced")
+
+ /* Retrieve the dataspace with the specified region selected */
+- space_ref = H5Rget_region (dset_ref, H5R_DATASET_REGION, ref[i]);
++ space_ref = H5Rget_region (dset_ref, H5R_DATASET_REGION, ref + i);
+ if(space_ref < 0)
+ H5E_THROW(H5E_CANTGET, "H5LR: Retrieving dataspace referenced failed")
+
+@@ -1920,12 +1920,12 @@ H5LRmake_dataset_FORTRAN(hid_t loc_id, c
+ /* loop over the region references to write data into new data set */
+ icnt = 0;
+ for(i=0; i<buf_size; i++) {
+- dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref[i]);
++ dset_ref = H5Rdereference_(loc_id_ref[i], H5R_DATASET_REGION, ref + i);
+ if(dset_ref < 0)
+ H5E_THROW(H5E_NOTFOUND, "H5LR: Failed to open object referenced")
+
+ /* Retrieve the dataspace with the specified region selected */
+- space_ref = H5Rget_region(dset_ref, H5R_DATASET_REGION, ref[i]);
++ space_ref = H5Rget_region(dset_ref, H5R_DATASET_REGION, ref + i);
+ if(space_ref < 0)
+ H5E_THROW(H5E_CANTGET, "H5LR: Retrieving dataspace referenced failed")
+
+--- hdf5_HL_REGION-1.1.5/examples/ex_regref_copy_references.c.orig 2016-06-20 23:29:02.000000000 +0200
++++ hdf5_HL_REGION-1.1.5/examples/ex_regref_copy_references.c 2024-12-14 19:08:39.307792288 +0100
+@@ -149,7 +149,7 @@ int main(void)
+ printf("DATA POINTED TO BY NEW REGION REFERENCE");
+ /* print the data pointed to by the new region reference */
+ status = H5LRread_region(file_id,
+- (const hdset_reg_ref_t*)ref_new,
++ &ref_new,
+ H5T_NATIVE_INT,
+ &numelem_size,
+ rdata2);
+--- hdf5_HL_REGION-1.1.5/examples/ex_regref_read.c.orig 2016-06-20 23:29:02.000000000 +0200
++++ hdf5_HL_REGION-1.1.5/examples/ex_regref_read.c 2024-12-14 19:21:42.750214683 +0100
+@@ -133,7 +133,7 @@ int main(void)
+ /* Obtain information about the data associated with the region reference */
+
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[0],
++ ref,
+ &nlength,
+ NULL,
+ &rank_out,
+@@ -151,7 +151,7 @@ int main(void)
+
+ /* Get region refererce information, hyperslab coordinates returned in buf */
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[0],
++ ref,
+ &nlength,
+ name,
+ &rank_out,
+@@ -183,7 +183,7 @@ int main(void)
+
+ /* Read a region of the data using a region reference and print it. */
+
+- status = H5LRread_region(file_id,(const hdset_reg_ref_t*)ref[0],
++ status = H5LRread_region(file_id,ref,
+ dtype,
+ &numelem,
+ rdata[0]);
+--- hdf5_HL_REGION-1.1.5/examples/ex_GMGTO.c.orig 2016-06-20 23:29:03.000000000 +0200
++++ hdf5_HL_REGION-1.1.5/examples/ex_GMGTO.c 2024-12-14 21:08:17.208906260 +0100
+@@ -146,7 +146,7 @@ static herr_t op_func_L (hid_t loc_id, c
+ * The name of the object is passed to this function by
+ * the Library.
+ */
+- status = H5Oget_info_by_name (loc_id, name, &infobuf, H5P_DEFAULT);
++ status = H5Oget_info_by_name3 (loc_id, name, &infobuf, H5O_INFO_ALL, H5P_DEFAULT);
+ if(status < 0) return -1;
+
+ return op_func (loc_id, name, &infobuf, operator_data);
+@@ -342,7 +342,7 @@ static int test_reading( const char *fil
+ /* Obtain information about the data associated with the region reference */
+ file_id = H5Fopen(filename_out, H5F_ACC_RDWR, H5P_DEFAULT);
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[0],
++ ref,
+ &nlength,
+ NULL,
+ &rank_out,
+@@ -362,7 +362,7 @@ static int test_reading( const char *fil
+
+ /* Get region refererce information, hyperslab coordinates returned in buf */
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[0],
++ ref,
+ &nlength,
+ name,
+ &rank_out,
+@@ -399,7 +399,7 @@ static int test_reading( const char *fil
+ /* Firts, find the appropriate memory type to read in */
+ mtype = H5Tget_native_type(dtype, H5T_DIR_ASCEND);
+
+- status = H5LRread_region(file_id,(const hdset_reg_ref_t*)&ref[0],
++ status = H5LRread_region(file_id,ref,
+ mtype,
+ &numelem,
+ rdata[0]);
+@@ -429,7 +429,7 @@ static int test_reading( const char *fil
+
+ file_id_array[0] = file_id;
+
+- status = H5LRmake_dataset(file_id, "/All_Data/copy/Latitude", H5T_NATIVE_FLOAT, 1, file_id_array, ( const hdset_reg_ref_t *)ref[0]);
++ status = H5LRmake_dataset(file_id, "/All_Data/copy/Latitude", H5T_NATIVE_FLOAT, 1, file_id_array, ref);
+
+ if(status<0) goto out;
+
+--- hdf5_HL_REGION-1.1.5/test/test_regref_hyper.c.orig 2016-06-20 23:28:59.000000000 +0200
++++ hdf5_HL_REGION-1.1.5/test/test_regref_hyper.c 2024-12-14 21:36:49.346297482 +0100
+@@ -179,7 +179,7 @@ static herr_t op_func_L (hid_t loc_id, c
+ * The name of the object is passed to this function by
+ * the Library.
+ */
+- status = H5Oget_info_by_name (loc_id, name, &infobuf, H5P_DEFAULT);
++ status = H5Oget_info_by_name3 (loc_id, name, &infobuf, H5O_INFO_ALL, H5P_DEFAULT);
+ if(status < 0) return -1;
+
+ return op_func (loc_id, name, &infobuf, operator_data);
+@@ -390,7 +390,7 @@ static int test_regref_hyper( void )
+
+ /* 1D element section region reference infomation */
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[0],
++ (const hdset_reg_ref_t*)&ref[0],
+ &nlength,
+ NULL,
+ &rank_out[0],
+@@ -419,7 +419,7 @@ static int test_regref_hyper( void )
+ TESTING("H5LRget_region_info with NULL entries, 3D dataset");
+ /* 3D hyperslab section region reference infomation*/
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[3],
++ (const hdset_reg_ref_t*)&ref[3],
+ &nlength,
+ NULL,
+ &rank_out[2],
+@@ -445,7 +445,7 @@ static int test_regref_hyper( void )
+ rank_out[1] =0;
+ /* 2D hyperslab section region reference infomation*/
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[1],
++ (const hdset_reg_ref_t*)&ref[1],
+ &nlength,
+ NULL,
+ &rank_out[1],
+@@ -487,7 +487,7 @@ static int test_regref_hyper( void )
+ /* Function should fail if name length is not provided */
+ H5E_BEGIN_TRY {
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[1],
++ (const hdset_reg_ref_t*)&ref[1],
+ NULL,
+ known_name,
+ NULL,
+@@ -509,7 +509,7 @@ static int test_regref_hyper( void )
+ /* Get region reference information */
+ TESTING("H5LRget_region_info, 2D dataset");
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[1],
++ (const hdset_reg_ref_t*)&ref[1],
+ &nlength,
+ name,
+ &rank_out[1],
+@@ -554,7 +554,7 @@ static int test_regref_hyper( void )
+ /* Get region reference information */
+
+ status = H5LRget_region_info(file_id,
+- (const hdset_reg_ref_t*)ref[3],
++ (const hdset_reg_ref_t*)&ref[3],
+ &nlength,
+ name,
+ &rank_out[2],
+@@ -584,7 +584,7 @@ static int test_regref_hyper( void )
+ TESTING("H5LRget_region, 2D dataset");
+ /* Read a region of the 2D data using a region reference */
+ if ( H5LRread_region(file_id,
+- (const hdset_reg_ref_t*)ref[1],
++ (const hdset_reg_ref_t*)&ref[1],
+ H5T_NATIVE_INT,
+ &numelem_size,
+ NULL) < 0) goto out;
+@@ -596,7 +596,7 @@ static int test_regref_hyper( void )
+ data_out = (int *)malloc( numelem_size * sizeof(int));
+
+ if ( H5LRread_region(file_id,
+- (const hdset_reg_ref_t*)ref[1],
++ (const hdset_reg_ref_t*)&ref[1],
+ H5T_NATIVE_INT,
+ &numelem_size,
+ data_out) < 0) goto out;
+@@ -715,7 +715,7 @@ static int test_regref_hyper( void )
+
+ /* check the data pointed to by the new region reference */
+ status = H5LRread_region(file_id,
+- (const hdset_reg_ref_t*)ref_new,
++ (const hdset_reg_ref_t*)&ref_new,
+ H5T_NATIVE_INT,
+ &numelem_size,
+ data_out2);
+@@ -783,7 +783,7 @@ static int test_regref_hyper( void )
+ kk = 0;
+ for (i_size_t=0; i_size_t < num_elem; i_size_t++) {
+ status = H5LRread_region(file_id,
+- (const hdset_reg_ref_t*)ref6[i_size_t],
++ (const hdset_reg_ref_t*)&ref6[i_size_t],
+ H5T_NATIVE_INT,
+ &numelem_size,
+ data_out2);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hdf5_hl_region.git/commitdiff/5e8db0bc2e04b4d40d249a0743fcf19db8bf3fd4
More information about the pld-cvs-commit
mailing list