aboutsummaryrefslogtreecommitdiff
path: root/libraries/med
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2023-01-13 08:13:02 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-01-14 08:50:37 +0700
commitd911f2d256dfb75a95dc5aa2ef615587a0ed5948 (patch)
tree14351bea4b21e6034533bf029e2f6ebed7a7c626 /libraries/med
parentd4182b8aac4bf6e0b4a028503563737dfa063cfb (diff)
libraries/med: Updated for version 4.1.1.
Patch to build with hdf5-1.12.x Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/med')
-rw-r--r--libraries/med/hdf5-1.12.patch189
-rw-r--r--libraries/med/med.SlackBuild51
-rw-r--r--libraries/med/med.info6
3 files changed, 219 insertions, 27 deletions
diff --git a/libraries/med/hdf5-1.12.patch b/libraries/med/hdf5-1.12.patch
new file mode 100644
index 0000000000000..c3470f8570772
--- /dev/null
+++ b/libraries/med/hdf5-1.12.patch
@@ -0,0 +1,189 @@
+diff -rupN med-4.1.0/config/cmake_files/medMacros.cmake med-4.1.0-new/config/cmake_files/medMacros.cmake
+--- med-4.1.0/config/cmake_files/medMacros.cmake 2021-12-03 09:35:30.675827163 +0100
++++ med-4.1.0-new/config/cmake_files/medMacros.cmake 2021-12-03 09:32:31.894994147 +0100
+@@ -447,7 +447,7 @@ MACRO(MED_FIND_HDF5)
+ ##
+ ## Requires 1.10.x version
+ ##
+- IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)
++ IF (HDF5_VERSION VERSION_LESS 1.10.2)
+ MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.")
+ ENDIF()
+ ##
+diff -rupN med-4.1.0/src/ci/MEDfileCompatibility.c med-4.1.0-new/src/ci/MEDfileCompatibility.c
+--- med-4.1.0/src/ci/MEDfileCompatibility.c 2021-12-03 09:35:30.676827162 +0100
++++ med-4.1.0-new/src/ci/MEDfileCompatibility.c 2021-12-03 09:33:26.292942149 +0100
+@@ -71,7 +71,7 @@ MEDfileCompatibility(const char* const f
+ _hversionMMR=10000*_hmajeur+100*_hmineur+_hrelease;
+ /* ISCRUTE(_hversionMMR); */
+ /* ISCRUTE(HDF_VERSION_NUM_REF); */
+- if ( (_hversionMMR >= HDF_VERSION_NUM_REF) && (_hmineur == HDF_VERSION_MINOR_REF) ) *hdfok = MED_TRUE;
++ if (_hversionMMR >= HDF_VERSION_NUM_REF) *hdfok = MED_TRUE;
+
+ /* TODO : Vérifier si la version mineure HDF du fichier est supérieure
+ à la version mineure de la bibliothèque HDF utilisée :
+@@ -113,7 +113,7 @@ MEDfileCompatibility(const char* const f
+ #if MED_NUM_MAJEUR != 4
+ #error "Don't forget to update the test version here when you change the major version of the library !"
+ #endif
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !"
+ #error "Cf. _MEDfileCreate ..."
+ #endif
+diff -rupN med-4.1.0/src/hdfi/_MEDattributeNumWrByName.c med-4.1.0-new/src/hdfi/_MEDattributeNumWrByName.c
+--- med-4.1.0/src/hdfi/_MEDattributeNumWrByName.c 2020-03-11 10:36:37.000000000 +0100
++++ med-4.1.0-new/src/hdfi/_MEDattributeNumWrByName.c 2021-12-03 09:33:08.851958696 +0100
+@@ -68,7 +68,7 @@ med_err _MEDattributeNumWrByName(med_idt
+
+ if ( (_attid=H5Aopen_by_name( pid, path, attname, H5P_DEFAULT, H5P_DEFAULT )) >= 0 ) {
+
+- if ( H5Oget_info( pid, &_oinfo ) <0) {
++ if ( H5Oget_info( pid, &_oinfo, H5O_INFO_ALL ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info");
+ goto ERROR;
+ }
+diff -rupN med-4.1.0/src/hdfi/_MEDattributeNumWr.c med-4.1.0-new/src/hdfi/_MEDattributeNumWr.c
+--- med-4.1.0/src/hdfi/_MEDattributeNumWr.c 2020-03-11 10:36:37.000000000 +0100
++++ med-4.1.0-new/src/hdfi/_MEDattributeNumWr.c 2021-12-03 09:33:11.840955852 +0100
+@@ -77,7 +77,7 @@ med_err _MEDattributeNumWr(med_idt pid,
+
+ if ( (_attid=H5Aopen( pid, attname, H5P_DEFAULT )) >= 0 ) {
+
+- if ( H5Oget_info( pid, &_oinfo ) <0) {
++ if ( H5Oget_info( pid, &_oinfo, H5O_INFO_ALL ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info");
+ goto ERROR;
+ }
+diff -rupN med-4.1.0/src/hdfi/_MEDcheckAttributeStringFunc.c med-4.1.0-new/src/hdfi/_MEDcheckAttributeStringFunc.c
+--- med-4.1.0/src/hdfi/_MEDcheckAttributeStringFunc.c 2020-03-11 10:36:37.000000000 +0100
++++ med-4.1.0-new/src/hdfi/_MEDcheckAttributeStringFunc.c 2021-12-03 09:33:14.266953546 +0100
+@@ -40,7 +40,7 @@ med_err _MEDcheckAttributeStringFunc(med
+ oinfo.type=H5G_LINK;
+ break;
+ case H5L_TYPE_HARD:
+- if ( H5Oget_info_by_name( id, lname, &oinfo, H5P_DEFAULT ) <0) {
++ if ( H5Oget_info_by_name( id, lname, &oinfo, H5O_INFO_ALL, H5P_DEFAULT ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info_by_name");
+ SSCRUTE(lname);
+ }
+diff -rupN med-4.1.0/src/hdfi/_MEDchecknSublinkFunc.c med-4.1.0-new/src/hdfi/_MEDchecknSublinkFunc.c
+--- med-4.1.0/src/hdfi/_MEDchecknSublinkFunc.c 2020-03-11 10:36:36.000000000 +0100
++++ med-4.1.0-new/src/hdfi/_MEDchecknSublinkFunc.c 2021-12-03 09:33:16.487951437 +0100
+@@ -41,7 +41,7 @@ med_err _MEDchecknSublinkFunc(med_idt id
+ oinfo.type=H5G_LINK;
+ break;
+ case H5L_TYPE_HARD:
+- if ( H5Oget_info_by_name( id, lname, &oinfo, H5P_DEFAULT ) <0) {
++ if ( H5Oget_info_by_name( id, lname, &oinfo, H5O_INFO_ALL, H5P_DEFAULT ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info_by_name");
+ SSCRUTE(lname);
+ }
+diff -rupN med-4.1.0/src/hdfi/_MEDdatagroupExist.c med-4.1.0-new/src/hdfi/_MEDdatagroupExist.c
+--- med-4.1.0/src/hdfi/_MEDdatagroupExist.c 2020-03-11 10:36:37.000000000 +0100
++++ med-4.1.0-new/src/hdfi/_MEDdatagroupExist.c 2021-12-03 09:33:18.742949298 +0100
+@@ -45,7 +45,7 @@ med_err _MEDdatagroupExist(const med_idt
+
+ case H5L_TYPE_HARD:
+ *isasoftlink = MED_FALSE;
+- if ( H5Oget_info_by_name( gid, datagroupname, &_oinfo, H5P_DEFAULT ) <0) {
++ if ( H5Oget_info_by_name( gid, datagroupname, &_oinfo, H5O_INFO_ALL, H5P_DEFAULT ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info_by_name");
+ SSCRUTE( datagroupname);
+ }
+diff -rupN med-4.1.0/src/hdfi/_MEDdatasetExist.c med-4.1.0-new/src/hdfi/_MEDdatasetExist.c
+--- med-4.1.0/src/hdfi/_MEDdatasetExist.c 2020-03-11 10:36:37.000000000 +0100
++++ med-4.1.0-new/src/hdfi/_MEDdatasetExist.c 2021-12-03 09:33:24.158944167 +0100
+@@ -47,7 +47,7 @@ med_err _MEDdatasetExist(const med_idt
+
+ case H5L_TYPE_HARD:
+ *isasoftlink = MED_FALSE;
+- if ( H5Oget_info_by_name( gid, datasetname, &_oinfo, H5P_DEFAULT ) <0) {
++ if ( H5Oget_info_by_name( gid, datasetname, &_oinfo, H5O_INFO_ALL, H5P_DEFAULT ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info_by_name");
+ SSCRUTE( datasetname);
+ }
+diff -rupN med-4.1.0/src/hdfi/_MEDfileCreate.c med-4.1.0-new/src/hdfi/_MEDfileCreate.c
+--- med-4.1.0/src/hdfi/_MEDfileCreate.c 2021-12-03 09:35:30.677827161 +0100
++++ med-4.1.0-new/src/hdfi/_MEDfileCreate.c 2021-12-03 09:32:31.894994147 +0100
+@@ -159,7 +159,7 @@ med_idt _MEDfileCreate(const char * cons
+ * En HDF5-1.10.0p1 cela n'a aucun effet !
+ * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+ */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+
+diff -rupN med-4.1.0/src/hdfi/_MEDfileOpen.c med-4.1.0-new/src/hdfi/_MEDfileOpen.c
+--- med-4.1.0/src/hdfi/_MEDfileOpen.c 2021-12-03 09:35:30.677827161 +0100
++++ med-4.1.0-new/src/hdfi/_MEDfileOpen.c 2021-12-03 09:32:31.894994147 +0100
+@@ -72,7 +72,7 @@ med_idt _MEDfileOpen(const char * const
+
+ • The creation order tracking property, H5P_CRT_ORDER_TRACKED, has been set in the group creation property list (see H5Pset_link_creation_order).
+ */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+ /* L'avantage de bloquer le modèle interne HDF5
+diff -rupN med-4.1.0/src/hdfi/_MEDlinkObjs.c med-4.1.0-new/src/hdfi/_MEDlinkObjs.c
+--- med-4.1.0/src/hdfi/_MEDlinkObjs.c 2020-03-11 10:36:37.000000000 +0100
++++ med-4.1.0-new/src/hdfi/_MEDlinkObjs.c 2021-12-03 09:33:21.096947067 +0100
+@@ -62,7 +62,7 @@ med_err _MEDlinkobjs(med_idt id,const ch
+ sur un lien hard
+ Sur un lien soft H5O_TYPE_UNKNOWN
+ */
+- if ( H5Oget_info_by_name( id, lname, &oinfo, H5P_DEFAULT ) <0) {
++ if ( H5Oget_info_by_name( id, lname, &oinfo, H5O_INFO_ALL, H5P_DEFAULT ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info_by_name");
+ SSCRUTE(lname);
+ }
+diff -rupN med-4.1.0/src/hdfi/_MEDmemFileOpen.c med-4.1.0-new/src/hdfi/_MEDmemFileOpen.c
+--- med-4.1.0/src/hdfi/_MEDmemFileOpen.c 2021-12-03 09:35:30.678827160 +0100
++++ med-4.1.0-new/src/hdfi/_MEDmemFileOpen.c 2021-12-03 09:32:31.894994147 +0100
+@@ -434,7 +434,7 @@ med_idt _MEDmemFileOpen(const char * con
+ goto ERROR;
+ }
+
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+ if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18) ) {
+diff -rupN med-4.1.0/src/hdfi/_MEDparFileCreate.c med-4.1.0-new/src/hdfi/_MEDparFileCreate.c
+--- med-4.1.0/src/hdfi/_MEDparFileCreate.c 2021-12-03 09:35:30.678827160 +0100
++++ med-4.1.0-new/src/hdfi/_MEDparFileCreate.c 2021-12-03 09:32:31.894994147 +0100
+@@ -64,7 +64,7 @@ med_idt _MEDparFileCreate(const char * c
+ * En HDF5-1.10.0p1 cela n'a aucun effet !
+ * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+ */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+
+diff -rupN med-4.1.0/src/hdfi/_MEDparFileOpen.c med-4.1.0-new/src/hdfi/_MEDparFileOpen.c
+--- med-4.1.0/src/hdfi/_MEDparFileOpen.c 2021-12-03 09:35:30.679827159 +0100
++++ med-4.1.0-new/src/hdfi/_MEDparFileOpen.c 2021-12-03 09:32:31.894994147 +0100
+@@ -55,7 +55,7 @@ med_idt _MEDparFileOpen(const char * con
+ MED_ERR_(_fid,MED_ERR_INIT,MED_ERR_PROPERTY,MED_ERR_PARALLEL_MSG);
+ goto ERROR;
+ }
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 12
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+ if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18 ) ) {
+diff -rupN med-4.1.0/tools/medimport/2.3.6/_MEDconvertStringDatasets.c med-4.1.0-new/tools/medimport/2.3.6/_MEDconvertStringDatasets.c
+--- med-4.1.0/tools/medimport/2.3.6/_MEDconvertStringDatasets.c 2020-03-11 10:36:40.000000000 +0100
++++ med-4.1.0-new/tools/medimport/2.3.6/_MEDconvertStringDatasets.c 2021-12-03 09:34:42.715870908 +0100
+@@ -52,7 +52,7 @@ med_err _MEDconvertStringDatasets(med_id
+ oinfo.type=(H5O_type_t) H5G_LINK;
+ break;
+ case H5L_TYPE_HARD:
+- if ( H5Oget_info_by_name( id, lname, &oinfo, H5P_DEFAULT ) <0) {
++ if ( H5Oget_info_by_name( id, lname, &oinfo, H5O_INFO_ALL, H5P_DEFAULT ) <0) {
+ MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"H5Oget_info_by_name");
+ SSCRUTE(lname);
+ }
diff --git a/libraries/med/med.SlackBuild b/libraries/med/med.SlackBuild
index 5984342983a5c..f11c9a013bc5b 100644
--- a/libraries/med/med.SlackBuild
+++ b/libraries/med/med.SlackBuild
@@ -25,8 +25,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=med
-VERSION=${VERSION:-4.0.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-4.1.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -69,9 +69,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf ${PRGNAM}-${VERSION}_SRC
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+cd ${PRGNAM}-${VERSION}_SRC
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -79,27 +79,30 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/hdf5-1.12.patch
+sed -i 's/if H5_VERS_MINOR > 10/if 0/g' src/ci/MEDfileCompatibility.c # :o
+
+export CPPFLAGS+=' -DH5_USE_110_API'
+
PYTHON_VERSION=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') \
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-fortran \
- --disable-python \
- --disable-static \
- --build=$ARCH-slackware-linux
-
-# fix directory paths in Makefiles
-# from /usr//lib to /usr/lib64 for 64-bit
-# from /usr// to /usr/
-find -name Makefile -exec sed -i "s/\/usr\/\/lib/\/usr\/lib$LIBDIRSUFFIX/g" {} \;
-find -name Makefile -exec sed -i "s/\/usr\/\//\/usr\//g" {} \;
-
-make
-make install DESTDIR=$PKG
+
+sed -i "s|_install_dir\ lib/python|_install_dir lib$LIBDIRSUFFIX/python|" python/CMakeLists.txt
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMEDFILE_BUILD_PYTHON=ON \
+ -DMEDFILE_BUILD_TESTS=OFF \
+ -DMEDFILE_INSTALL_DOC=OFF \
+ -DLIB_SUFFIX=$LIBDIRSUFFIX \
+ -GNinja ..
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING COPYING.LESSER ChangeLog INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/libraries/med/med.info b/libraries/med/med.info
index 5a29a62774a99..606b5a7d16224 100644
--- a/libraries/med/med.info
+++ b/libraries/med/med.info
@@ -1,8 +1,8 @@
PRGNAM="med"
-VERSION="4.0.0"
+VERSION="4.1.1"
HOMEPAGE="https://www.code-aster.org"
-DOWNLOAD="http://files.salome-platform.org/Salome/other/med-4.0.0.tar.gz"
-MD5SUM="ef903d0dc165fc72818ab264ebb6e8ba"
+DOWNLOAD="http://files.salome-platform.org/Salome/other/med-4.1.1.tar.gz"
+MD5SUM="7f3e223385a762a8690f7735397dfde9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="hdf5"