From a8d474b568b9cfb6d2f6c856250f6c602ca7539a Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Feb 07 2022 02:24:19 +0000 Subject: Add patch to fix build with gfortran-12 --- diff --git a/hdf5-gfortran12.patch b/hdf5-gfortran12.patch new file mode 100644 index 0000000..97fc276 --- /dev/null +++ b/hdf5-gfortran12.patch @@ -0,0 +1,37 @@ +commit 3ea6f8c17228d2629e419563138a6180bc4a5a6a +Author: Orion Poplawski +Date: Sun Jan 30 15:21:08 2022 -0700 + + Mark minusone as a PARAMETER in tH5A_1_8.F90. + +diff --git a/fortran/test/tH5A_1_8.F90 b/fortran/test/tH5A_1_8.F90 +index 4e02c58a39..c2f8e9984a 100644 +--- a/fortran/test/tH5A_1_8.F90 ++++ b/fortran/test/tH5A_1_8.F90 +@@ -776,7 +776,7 @@ SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error) + + INTEGER :: Input1 + INTEGER(HSIZE_T) :: hzero = 0_HSIZE_T +- INTEGER :: minusone = -1 ++ INTEGER, PARAMETER :: minusone = -1 + INTEGER(HSIZE_T) :: htmp + + data_dims = 0 +@@ -1427,7 +1427,7 @@ SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error) + INTEGER :: u ! Local index variable + INTEGER :: Input1 + INTEGER(HSIZE_T) :: hzero = 0_HSIZE_T +- INTEGER :: minusone = -1 ++ INTEGER, PARAMETER :: minusone = -1 + + data_dims = 0 + +@@ -2268,7 +2268,7 @@ SUBROUTINE test_attr_corder_create_basic( fcpl, fapl, total_error ) + INTEGER :: error + + INTEGER :: crt_order_flags +- INTEGER :: minusone = -1 ++ INTEGER, PARAMETER :: minusone = -1 + + ! Output message about test being performed + ! WRITE(*,*) " - Testing Basic Code for Attributes with Creation Order Info" diff --git a/hdf5.spec b/hdf5.spec index c80ece2..c45e63b 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -9,7 +9,7 @@ # You need to recompile all users of HDF5 for each version change Name: hdf5 Version: 1.12.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A general purpose library and file format for storing scientific data License: BSD URL: https://portal.hdfgroup.org/display/HDF5/HDF5 @@ -23,6 +23,9 @@ Source1: h5comp # For man pages Source2: http://ftp.us.debian.org/debian/pool/main/h/hdf5/hdf5_1.12.0+repack-1~exp2.debian.tar.xz Patch0: hdf5-LD_LIBRARY_PATH.patch +# Fix fortran build with gcc 12 +# https://github.com/HDFGroup/hdf5/pull/1412 +Patch1: hdf5-gfortran12.patch # Fix java build Patch3: hdf5-build.patch # Remove Fedora build flags from h5cc/h5c++/h5fc @@ -504,6 +507,9 @@ fi %changelog +* Mon Feb 07 2022 Orion Poplawski - 1.12.1-4 +- Add patch to fix build with gfortran-12 + * Sat Feb 05 2022 Jiri Vanek - 1.12.1-3 - Rebuilt for java-17-openjdk as system jdk