[scilab] 17/29: Refresh patch for the hdf5 1.10 api

Julien Puydt julien.puydt at laposte.net
Wed Nov 22 17:19:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository scilab.

commit ee9f5a27adeee59008e4ac3e31a7e0a096469c41
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Wed Nov 15 20:52:06 2017 +0100

    Refresh patch for the hdf5 1.10 api
---
 debian/changelog                   |   1 +
 debian/patches/hdf5-1.10-api.patch | 157 +++++++++++++++++++++++--------------
 2 files changed, 97 insertions(+), 61 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f91ac32..6505d07 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,7 @@ scilab (6.0.0-1) UNRELEASED; urgency=medium
     - Drop patch to adapt the batik api to 1.8 : we have 1.9.
     - Refresh patch to add the ppc64el arch.
     - Refresh patch for the jogl2 api. 
+    - Refresh patch for the hdf5 1.10 api. 
 
  -- Julien Puydt <julien.puydt at laposte.net>  Tue, 14 Nov 2017 16:46:25 +0100
 
diff --git a/debian/patches/hdf5-1.10-api.patch b/debian/patches/hdf5-1.10-api.patch
index e467b6c..0cf9b99 100644
--- a/debian/patches/hdf5-1.10-api.patch
+++ b/debian/patches/hdf5-1.10-api.patch
@@ -1,8 +1,10 @@
-Index: scilab-5.5.2/m4/hdf5.m4
-===================================================================
---- scilab-5.5.2.orig/m4/hdf5.m4
-+++ scilab-5.5.2/m4/hdf5.m4
-@@ -65,6 +65,11 @@ if test "x$with_hdf5_library" != "xyes";
+Description: update the api used to v1.10
+Author: Gilles Filippini
+Forwarded: no
+
+--- a/m4/hdf5.m4
++++ b/m4/hdf5.m4
+@@ -68,6 +68,11 @@
              [AC_MSG_ERROR([libhdf5 or libhdf5_hl: library missing. (Cannot find symbol H5Fopen) in $with_hdf5_library. Check if libhdf5 is installed and if the version is correct])],
              [-lz]
              )
@@ -14,7 +16,7 @@ Index: scilab-5.5.2/m4/hdf5.m4
  else
      if $WITH_DEVTOOLS; then # Scilab thirparties
          HDF5_LIBS="-L$DEVTOOLS_LIBDIR -lhdf5 -lhdf5_hl"
-@@ -93,6 +98,7 @@ LIBS="$save_LIBS"
+@@ -96,6 +101,7 @@
  
  AC_SUBST(HDF5_LIBS)
  AC_SUBST(HDF5_CFLAGS)
@@ -22,34 +24,9 @@ Index: scilab-5.5.2/m4/hdf5.m4
  
  AC_DEFINE([WITH_HDF5], [], [With the HDF5 library])
  
-Index: scilab-5.5.2/modules/hdf5/Makefile.am
-===================================================================
---- scilab-5.5.2.orig/modules/hdf5/Makefile.am
-+++ scilab-5.5.2/modules/hdf5/Makefile.am
-@@ -86,6 +86,8 @@ FORCE_HDF_1.8_API =  -DH5Dopen_vers=2 -D
-  -DH5Gcreate_vers=2 -DH5Gopen_vers=2 -DH5Tget_array_dims_vers=2 \
-  -DH5Acreate_vers=2 -DNO_DEPRECATED_SYMBOLS
- 
-+FORCE_HDF_1.10_API = @FORCE_HDF_1_10_API@
-+
- libscihdf5_la_CPPFLAGS = -I$(srcdir)/includes/ \
- 				-I$(srcdir)/src/c/ \
- 				-I$(srcdir)/src/cpp/ \
-@@ -98,7 +100,8 @@ libscihdf5_la_CPPFLAGS = -I$(srcdir)/inc
- 				$(JAVA_JNI_INCLUDE) \
- 				$(HDF5_CFLAGS) \
- 				$(AM_CPPFLAGS) \
--				$(FORCE_HDF_1.8_API)
-+				$(FORCE_HDF_1.8_API) \
-+				$(FORCE_HDF_1.10_API)
- 
- 
- 
-Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
-===================================================================
---- scilab-5.5.2.orig/modules/hdf5/src/c/h5_readDataFromFile.c
-+++ scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
-@@ -716,7 +716,11 @@ int readCommonPolyMatrix(int _iDatasetId
+--- a/modules/hdf5/src/c/h5_readDataFromFile.c
++++ b/modules/hdf5/src/c/h5_readDataFromFile.c
+@@ -742,7 +742,11 @@
          /*
           * Open the referenced object, get its name and type.
           */
@@ -62,7 +39,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
          if (_iComplex)
          {
              status = readComplexPoly(obj, &_piNbCoef[i], &_pdblReal[i], &_pdblImg[i]);
-@@ -950,7 +954,11 @@ int readCommonSparseComplexMatrix(int _i
+@@ -976,7 +980,11 @@
      }
  
      //read Row data
@@ -75,7 +52,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
      status = readInteger32Matrix(obj, _piNbItemRow);
      if (status < 0)
      {
-@@ -958,7 +966,11 @@ int readCommonSparseComplexMatrix(int _i
+@@ -984,7 +992,11 @@
      }
  
      //read cols data
@@ -88,7 +65,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
      status = readInteger32Matrix(obj, _piColPos);
      if (status < 0)
      {
-@@ -966,7 +978,11 @@ int readCommonSparseComplexMatrix(int _i
+@@ -992,7 +1004,11 @@
      }
  
      //read sparse data
@@ -101,7 +78,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
  
      if (_iComplex)
      {
-@@ -1017,7 +1033,11 @@ int readBooleanSparseMatrix(int _iDatase
+@@ -1043,7 +1059,11 @@
      }
  
      //read Row data
@@ -114,7 +91,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
      status = readInteger32Matrix(obj, _piNbItemRow);
      if (status < 0)
      {
-@@ -1027,7 +1047,11 @@ int readBooleanSparseMatrix(int _iDatase
+@@ -1053,7 +1073,11 @@
      if (_iNbItem != 0)
      {
          //read cols data
@@ -127,7 +104,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
          status = readInteger32Matrix(obj, _piColPos);
          if (status < 0)
          {
-@@ -1132,7 +1156,11 @@ int getListItemDataset(int _iDatasetId,
+@@ -1154,7 +1178,11 @@
  {
      hobj_ref_t poRef = ((hobj_ref_t *) _piItemRef)[_iItemPos];
  
@@ -140,11 +117,9 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
  
      if (*_piItemDataset == 0)
      {
-Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
-===================================================================
---- scilab-5.5.2.orig/modules/hdf5/src/c/h5_readDataFromFile_v1.c
-+++ scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
-@@ -471,7 +471,11 @@ int readDoubleMatrix_v1(int _iDatasetId,
+--- a/modules/hdf5/src/c/h5_readDataFromFile_v1.c
++++ b/modules/hdf5/src/c/h5_readDataFromFile_v1.c
+@@ -474,7 +474,11 @@
          }
  
          //Open the referenced object, get its name and type.
@@ -157,7 +132,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
          readDouble_v1(obj, _iRows, _iCols, _pdblData);
      }
  
-@@ -498,14 +502,22 @@ int readDoubleComplexMatrix_v1(int _iDat
+@@ -501,14 +505,22 @@
      }
  
      //Open the referenced object, get its name and type.
@@ -182,7 +157,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
      status = readDouble_v1(obj, _iRows, _iCols, _pdblImg);
      if (status < 0)
      {
-@@ -831,7 +843,11 @@ int readCommonPolyMatrix_v1(int _iDatase
+@@ -834,7 +846,11 @@
          /*
          * Open the referenced object, get its name and type.
          */
@@ -195,7 +170,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
          if (_iComplex)
          {
              status = readComplexPoly_v1(obj, &_piNbCoef[i], &_pdblReal[i], &_pdblImg[i]);
-@@ -1066,7 +1082,11 @@ int readCommonSparseComplexMatrix_v1(int
+@@ -1069,7 +1085,11 @@
      }
  
      //read Row data
@@ -208,7 +183,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
      status = readInteger32Matrix_v1(obj, 1, _iRows, _piNbItemRow);
      if (status < 0)
      {
-@@ -1074,7 +1094,11 @@ int readCommonSparseComplexMatrix_v1(int
+@@ -1077,7 +1097,11 @@
      }
  
      //read cols data
@@ -221,7 +196,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
      status = readInteger32Matrix_v1(obj, 1, _iNbItem, _piColPos);
      if (status < 0)
      {
-@@ -1082,7 +1106,11 @@ int readCommonSparseComplexMatrix_v1(int
+@@ -1085,7 +1109,11 @@
      }
  
      //read sparse data
@@ -234,7 +209,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
  
      if (_iComplex)
      {
-@@ -1128,7 +1156,11 @@ int readBooleanSparseMatrix_v1(int _iDat
+@@ -1131,7 +1159,11 @@
      }
  
      //read Row data
@@ -247,7 +222,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
      status = readInteger32Matrix_v1(obj, 1, _iRows, _piNbItemRow);
      if (status < 0)
      {
-@@ -1136,7 +1168,11 @@ int readBooleanSparseMatrix_v1(int _iDat
+@@ -1139,7 +1171,11 @@
      }
  
      //read cols data
@@ -260,7 +235,7 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
      status = readInteger32Matrix_v1(obj, 1, _iNbItem, _piColPos);
      if (status < 0)
      {
-@@ -1235,7 +1271,11 @@ int getListItemDataset_v1(int _iDatasetI
+@@ -1234,7 +1270,11 @@
  {
      hobj_ref_t poRef = ((hobj_ref_t *) _piItemRef)[_iItemPos];
  
@@ -273,11 +248,9 @@ Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
  
      if (*_piItemDataset == 0)
      {
-Index: scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
-===================================================================
---- scilab-5.5.2.orig/modules/hdf5/src/cpp/H5ReferenceData.cpp
-+++ scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
-@@ -39,7 +39,11 @@ const char ** H5ReferenceData::getRefere
+--- a/modules/hdf5/src/cpp/H5ReferenceData.cpp
++++ b/modules/hdf5/src/cpp/H5ReferenceData.cpp
+@@ -42,7 +42,11 @@
      for (int i = 0; i < totalSize; i++)
      {
          void * ref = &(((void **)cdata)[i]);
@@ -290,7 +263,7 @@ Index: scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
          H5O_info_t info;
          H5Oget_info(obj, &info);
          H5Oclose(obj);
-@@ -81,7 +85,11 @@ H5Object & H5ReferenceData::getData(cons
+@@ -84,7 +88,11 @@
  
      file = getFile().getH5Id();
      ref = &(((void **)cdata)[0]);
@@ -303,7 +276,7 @@ Index: scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
      if (obj < 0)
      {
          throw H5Exception(__LINE__, __FILE__, _("Cannot open object at the given position."));
-@@ -123,7 +131,11 @@ H5Object ** H5ReferenceData::getReferenc
+@@ -126,7 +134,11 @@
      for (int i = 0; i < totalSize; i++)
      {
          void * ref = &(((void **)cdata)[i]);
@@ -316,7 +289,7 @@ Index: scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
          objs[i] = &H5Object::getObject(getParent(), obj);
      }
  
-@@ -178,7 +190,11 @@ void H5ReferenceData::printData(std::ost
+@@ -181,7 +193,11 @@
      char * cdata = static_cast<char *>(data) + offset + pos * (stride ? stride : dataSize);
      void ** ref = &(((void **)cdata)[0]);
      hid_t file = getFile().getH5Id();
@@ -329,3 +302,65 @@ Index: scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
      if (obj < 0)
      {
          os << "NULL";
+--- a/modules/hdf5/Makefile.am
++++ b/modules/hdf5/Makefile.am
+@@ -104,6 +104,8 @@
+     -DH5Tget_array_dims_vers=2 \
+     -DH5Acreate_vers=2 -DNO_DEPRECATED_SYMBOLS
+ 
++FORCE_HDF_1.10_API = @FORCE_HDF_1_10_API@
++
+ libscihdf5_la_CPPFLAGS = \
+     -I$(srcdir)/includes/ \
+     -I$(srcdir)/src/c/ \
+@@ -132,7 +134,8 @@
+     $(JAVA_JNI_INCLUDE) \
+     $(HDF5_CFLAGS) \
+     $(AM_CPPFLAGS) \
+-    $(FORCE_HDF_1.8_API)
++    $(FORCE_HDF_1.8_API) \
++    $(FORCE_HDF_1.10_API)
+ 
+ 
+ 
+--- a/modules/hdf5/sci_gateway/cpp/sci_hdf5_load_v3.cpp
++++ b/modules/hdf5/sci_gateway/cpp/sci_hdf5_load_v3.cpp
+@@ -648,7 +648,11 @@
+         //import field
+         for (int j = 0; j < refcount; ++j)
+         {
+-            int data = H5Rdereference(refs, H5R_OBJECT, &vrefs[j]);
++            int data = H5Rdereference(refs,
++#if H5_VERSION_GE(1,10,0)
++                                      H5P_DATASET_ACCESS_DEFAULT,
++#endif
++                                      H5R_OBJECT, &vrefs[j]);
+             if (data < 0)
+             {
+                 freeStringMatrix(dfield, fields.data());
+--- a/modules/hdf5/src/c/h5_writeDataToFile.c
++++ b/modules/hdf5/src/c/h5_writeDataToFile.c
+@@ -2166,7 +2166,7 @@
+     return dset;
+ }
+ 
+-hid_t writeDoubleComplexMatrix6(int parent, const char* name, int dims, int* pdims, double* real, double* img)
++HDF5_SCILAB_IMPEXP writeDoubleComplexMatrix6(int parent, const char* name, int dims, int* pdims, double* real, double* img)
+ {
+     hid_t space = 0;
+     hid_t dset = 0;
+--- a/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
++++ b/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
+@@ -735,7 +735,11 @@
+             //import field
+             for (int j = 0; j < refcount; ++j)
+             {
+-                int data = H5Rdereference(refs, H5R_OBJECT, &vrefs[j]);
++                int data = H5Rdereference(refs,
++#if H5_VERSION_GE(1,10,0)
++                                          H5P_DATASET_ACCESS_DEFAULT,
++#endif
++                                          H5R_OBJECT, &vrefs[j]);
+                 if (data < 0)
+                 {
+                     return false;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/scilab.git



More information about the debian-science-commits mailing list