aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-misc/salome-med/files')
-rw-r--r--sci-misc/salome-med/files/salome-med-3.2.6-hdf5-1.6.7.patch367
1 files changed, 367 insertions, 0 deletions
diff --git a/sci-misc/salome-med/files/salome-med-3.2.6-hdf5-1.6.7.patch b/sci-misc/salome-med/files/salome-med-3.2.6-hdf5-1.6.7.patch
new file mode 100644
index 000000000..7342af130
--- /dev/null
+++ b/sci-misc/salome-med/files/salome-med-3.2.6-hdf5-1.6.7.patch
@@ -0,0 +1,367 @@
+diff -aur src3.2.6.old/MED_SRC_3.2.6/src/MEDMEM/MEDMEM_medimport_src.cxx src3.2.6/MED_SRC_3.2.6/src/MEDMEM/MEDMEM_medimport_src.cxx
+--- src3.2.6.old/MED_SRC_3.2.6/src/MEDMEM/MEDMEM_medimport_src.cxx 2008-07-25 09:16:10.000000000 +0200
++++ src3.2.6/MED_SRC_3.2.6/src/MEDMEM/MEDMEM_medimport_src.cxx 2008-10-15 12:03:32.000000000 +0200
+@@ -258,12 +258,22 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+
+@@ -291,13 +301,23 @@
+ }
+ }
+
+-#ifdef HDF_NEW_API
++#ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+
+@@ -378,9 +398,16 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hssize_t **) pfldsk ) ) <0)
+ return -1;
+ #endif
+@@ -418,11 +445,21 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0)
+- return -1;
++ return -1;
++#else
++ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
+ #else
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+diff -aur src3.2.6.old/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumEcrire.cxx src3.2.6/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumEcrire.cxx
+--- src3.2.6.old/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumEcrire.cxx 2008-07-25 09:16:10.000000000 +0200
++++ src3.2.6/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumEcrire.cxx 2008-10-15 12:03:08.000000000 +0200
+@@ -205,27 +205,37 @@
+ { /* switch pflmod pout FULL_INTERLACE*/
+ case MED_GLOBALE :
+
+- /* Creation d'un data space mémoire de dimension 1, de longeur size, et de longeur maxi size */
+- if ( (memspace = H5Screate_simple (1, size, NULL)) <0)
+- return -1;
++ /* Creation d'un data space mémoire de dimension 1, de longeur size, et de longeur maxi size */
++ if ( (memspace = H5Screate_simple (1, size, NULL)) <0)
++ return -1;
++
++ for (dim=firstdim; dim < lastdim; dim++) {
++
++ for (i=0; i < psize; i++) /* i balaye les élements du profil */
++ for (j=0; j < ngauss; j++) {
++ index = i*ngauss+j + (dim-firstdim)*(psize*ngauss);
++ pflmem[index] = (pfltab[i]-1)*ngauss*nbdim + j*nbdim+dim;
++ pfldsk[index] = dim*count[0] + (pfltab[i]-1)*ngauss+j;
++ }
++ }
++
++ #ifdef HDF_NEW_API
+
+- for (dim=firstdim; dim < lastdim; dim++) {
+-
+- for (i=0; i < psize; i++) /* i balaye les élements du profil */
+- for (j=0; j < ngauss; j++) {
+- index = i*ngauss+j + (dim-firstdim)*(psize*ngauss);
+- pflmem[index] = (pfltab[i]-1)*ngauss*nbdim + j*nbdim+dim;
+- pfldsk[index] = dim*count[0] + (pfltab[i]-1)*ngauss+j;
+- }
+- }
+-
+-#ifdef HDF_NEW_API
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+
+@@ -255,12 +265,22 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(memspace,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+
+@@ -326,39 +346,46 @@
+ pfldsk = (med_size *) malloc(sizeof(med_size)*pcount[0]);
+ #else
+ pfldsk = (med_ssize *) malloc(sizeof(med_ssize)*pcount[0]);
+-#endif
++ #endif
+
+- switch(pflmod)
+- { /*switch plfmod pour NO_INTERLACE */
+- case MED_GLOBALE :
+-
+- for (dim=firstdim; dim < lastdim; dim++) {
+-
+- for (i=0; i < psize; i++) /* i balaye le nbre d'élements du profil */
+- for (j=0; j < ngauss; j++) {
+- index = i*ngauss+j + (dim-firstdim)*(psize*ngauss);
+- pfldsk[index] = dim*count[0]+(pfltab[i]-1)*ngauss+j;
+- }
+- }
+-
++ switch(pflmod)
++ { /*switch plfmod pour NO_INTERLACE */
++ case MED_GLOBALE :
++
++ for (dim=firstdim; dim < lastdim; dim++) {
++
++ for (i=0; i < psize; i++) /* i balaye le nbre d'élements du profil */
++ for (j=0; j < ngauss; j++) {
++ index = i*ngauss+j + (dim-firstdim)*(psize*ngauss);
++ pfldsk[index] = dim*count[0]+(pfltab[i]-1)*ngauss+j;
++ }
++ }
++
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hssize_t **) pfldsk ) ) <0)
+ return -1;
+ #endif
+-
++
+ if ((ret = H5Dwrite(dataset,type_hdf,dataspace,dataspace,H5P_DEFAULT, val)) < 0)
+ return -1;
+-
++
+ break;
+-
++
+ case MED_COMPACT :
+-
+- /* Creation d'un data space mémoire de dimension 1, de la longeur du profil */
+- /* La dimension utilisée est ici nbdim, même pour un profil compact on suppose */
+- /* que l'utilisateur a toutes les coordonées stockées, même si il en demande qu'une */
++
++ /* Creation d'un data space mémoire de dimension 1, de la longeur du profil */
++ /* La dimension utilisée est ici nbdim, même pour un profil compact on suppose */
++ /* que l'utilisateur a toutes les coordonées stockées, même si il en demande qu'une */
+
+ if ( (memspace = H5Screate_simple (1, pflsize, NULL)) <0)
+ return -1;
+@@ -368,26 +395,36 @@
+ #else
+ pflmem = (med_ssize *) malloc (sizeof(med_ssize)*pcount[0]);
+ #endif
+-
++
+ /* Le profil COMPACT est contigüe, mais il est possible que l'on selectionne uniquemenent une dimension*/
+-
++
+ for (dim=firstdim; dim < lastdim; dim++) {
+-
++
+ for (i=0; i < psize; i++) /* i balaye le nbre d'élements du profil */
+ for (j=0; j < ngauss; j++) {
+ index = i*ngauss+j + (dim-firstdim)*(psize*ngauss);
+- pflmem[index] = dim*(psize*ngauss) + (pfltab[i]-1)*ngauss+j;
++ pflmem[index] = dim*(psize*ngauss) + (pfltab[i]-1)*ngauss+j;
+ pfldsk[index] = dim*count[0] + (pfltab[i]-1)*ngauss+j;
+ }
+ }
+-
++
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET,pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET,pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET,pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+
+diff -aur src3.2.6.old/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumLire.cxx src3.2.6/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumLire.cxx
+--- src3.2.6.old/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumLire.cxx 2008-07-25 09:16:10.000000000 +0200
++++ src3.2.6/MED_SRC_3.2.6/src/MEDWrapper/V2_1/Core/MEDdatasetNumLire.cxx 2008-10-15 12:01:30.000000000 +0200
+@@ -204,12 +204,22 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+
+@@ -239,11 +249,21 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t **) pfldsk ) ) <0)
++ return -1;
++#else
++ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
+ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET, pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
+ #else
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;
+@@ -325,9 +345,16 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0)
+ return -1;
+ #else
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
++#else
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hssize_t **) pfldsk ) ) <0)
+ return -1;
+ #endif
+@@ -369,11 +396,21 @@
+ }
+
+ #ifdef HDF_NEW_API
++
++#if H5_VERS_RELEASE < 7
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t **) pflmem ) ) <0)
+ return -1;
+
+ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t **) pfldsk ) ) <0)
+- return -1;
++ return -1;
++#else
++ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hsize_t *) pflmem ) ) <0)
++ return -1;
++
++ if ( (ret = H5Sselect_elements(dataspace,H5S_SELECT_SET,pcount[0], (const hsize_t *) pfldsk ) ) <0)
++ return -1;
++#endif
++
+ #else
+ if ( (ret = H5Sselect_elements(memspace ,H5S_SELECT_SET, pcount[0], (const hssize_t **) pflmem ) ) <0)
+ return -1;