Hello community,

here is the log from the commit of package matio for openSUSE:Factory checked 
in at 2018-10-04 19:03:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/matio (Old)
 and      /work/SRC/openSUSE:Factory/.matio.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "matio"

Thu Oct  4 19:03:35 2018 rev:19 rq:639960 version:1.5.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/matio/matio.changes      2018-09-25 
11:56:07.841138730 +0200
+++ /work/SRC/openSUSE:Factory/.matio.new/matio.changes 2018-10-04 
19:03:46.263059563 +0200
@@ -1,0 +2,7 @@
+Tue Oct  2 19:45:32 UTC 2018 - Stefan BrĂ¼ns <[email protected]>
+
+- Force writing of backwards compatible files with HDF5 1.10.x
+  0001-Write-backwards-compatible-Mat7.3-files.patch
+  (gh#tbeu/matio#93).
+
+-------------------------------------------------------------------
@@ -6,0 +14,5 @@
+
+-------------------------------------------------------------------
+Thu Apr 12 11:29:44 UTC 2018 - [email protected]
+
+- enforce hdf5 1.8 to ensure that files can still be exchanged

New:
----
  0001-Write-backwards-compatible-Mat7.3-files.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ matio.spec ++++++
--- /var/tmp/diff_new_pack.TqN7GZ/_old  2018-10-04 19:03:47.939057794 +0200
+++ /var/tmp/diff_new_pack.TqN7GZ/_new  2018-10-04 19:03:47.983057747 +0200
@@ -12,29 +12,31 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
-Name:           matio
 %define libname lib%{name}
+%define major   4
+Name:           matio
 Version:        1.5.12
 Release:        0
-%define major   4
 Summary:        Library for reading and writing MATLAB MAT files
 License:        BSD-2-Clause
 Group:          Productivity/Scientific/Other
-Url:            http://sourceforge.net/projects/matio
+URL:            http://sourceforge.net/projects/matio
 Source0:        http://downloads.sourceforge.net/matio/%{name}-%{version}.7z
-BuildRequires:  hdf5-devel >= 1.8
-%if 0%{suse_version} <= 1500
+# PATCH-FIX-OPENSUSE gh#tbeu/matio#93 
0001-Write-backwards-compatible-Mat7.3-files.patch
+Patch0:         0001-Write-backwards-compatible-Mat7.3-files.patch
+# We need hdf5 1.10.2 to allow creation of files backwards compatible with 
hdf5 1.8
+BuildRequires:  hdf5-devel >= 1.10.2
+BuildRequires:  pkgconfig
+BuildRequires:  zlib-devel >= 1.2.3
+%if 0%{?suse_version} <= 1500
 BuildRequires:  p7zip
 %else
 BuildRequires:  p7zip-full
 %endif
-BuildRequires:  pkgconfig
-BuildRequires:  zlib-devel >= 1.2.3
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 matio is an open-source library for reading and writing MATLAB MAT files.
@@ -79,6 +81,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 chmod +x configure
 
 %build

++++++ 0001-Write-backwards-compatible-Mat7.3-files.patch ++++++
>From 6cb9145d2782f680625b705c21c290019fdf7766 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Tue, 2 Oct 2018 21:41:36 +0200
Subject: [PATCH] Write backwards compatible Mat7.3 files

When Matio uses HDF5 1.10.x, it may create files using features only
supported with newer versions.
Limiting the version range for compatibility was added in HDF5 1.10.2.
For details, see
https://www.hdfgroup.org/2018/04/why-should-i-care-about-the-hdf5-1-10-2-release/
---
 src/mat.c   | 11 +++++++++--
 src/mat73.c | 11 ++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/mat.c b/src/mat.c
index 3446213..dcd0ded 100644
--- a/src/mat.c
+++ b/src/mat.c
@@ -408,8 +408,15 @@ Mat_Open(const char *matname,int mode)
 
         if ( (mode & 0x01) == MAT_ACC_RDONLY )
             *(hid_t*)mat->fp=H5Fopen(mat->filename,H5F_ACC_RDONLY,H5P_DEFAULT);
-        else if ( (mode & 0x01) == MAT_ACC_RDWR )
-            *(hid_t*)mat->fp=H5Fopen(mat->filename,H5F_ACC_RDWR,H5P_DEFAULT);
+        else if ( (mode & 0x01) == MAT_ACC_RDWR ) {
+            hid_t plist_ap;
+            plist_ap = H5Pcreate(H5P_FILE_ACCESS);
+#if defined(H5F_LIBVER_V18)
+            H5Pset_libver_bounds(plist_ap,H5F_LIBVER_EARLIEST,H5F_LIBVER_V18);
+#endif
+            *(hid_t*)mat->fp=H5Fopen(mat->filename,H5F_ACC_RDWR,plist_ap);
+            H5Pclose(plist_ap);
+        }
 
         if ( -1 < *(hid_t*)mat->fp ) {
             H5G_info_t group_info;
diff --git a/src/mat73.c b/src/mat73.c
index 81b31fd..f5c17f0 100644
--- a/src/mat73.c
+++ b/src/mat73.c
@@ -2200,11 +2200,15 @@ Mat_Create73(const char *matname,const char *hdr_str)
     mat_t *mat = NULL;
     size_t err;
     time_t t;
-    hid_t plist_id,fid;
+    hid_t plist_id,fid,plist_ap;
 
     plist_id = H5Pcreate(H5P_FILE_CREATE);
     H5Pset_userblock(plist_id,512);
-    fid = H5Fcreate(matname,H5F_ACC_TRUNC,plist_id,H5P_DEFAULT);
+    plist_ap = H5Pcreate(H5P_FILE_ACCESS);
+#if defined(H5F_LIBVER_V18)
+    H5Pset_libver_bounds(plist_ap,H5F_LIBVER_EARLIEST,H5F_LIBVER_V18);
+#endif
+    fid = H5Fcreate(matname,H5F_ACC_TRUNC,plist_id,plist_ap);
     H5Fclose(fid);
     H5Pclose(plist_id);
 
@@ -2263,7 +2267,8 @@ Mat_Create73(const char *matname,const char *hdr_str)
 
     fclose(fp);
 
-    fid = H5Fopen(matname,H5F_ACC_RDWR,H5P_DEFAULT);
+    fid = H5Fopen(matname,H5F_ACC_RDWR,plist_ap);
+    H5Pclose(plist_ap);
 
     mat->fp = malloc(sizeof(hid_t));
     *(hid_t*)mat->fp = fid;
-- 
2.19.0



Reply via email to