backports/libmedc: new aport
This commit is contained in:
parent
892393bbb1
commit
fd0479b93a
3 changed files with 148 additions and 0 deletions
43
backports/libmedc/APKBUILD
Normal file
43
backports/libmedc/APKBUILD
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
|
||||||
|
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
|
||||||
|
pkgname=libmedc
|
||||||
|
pkgver=4.1.1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Open source library for numerical simulation"
|
||||||
|
url="https://www.salome-platform.org/"
|
||||||
|
arch="all !armv7"
|
||||||
|
license="GPL-3.0-or-later"
|
||||||
|
makedepends="cmake hdf5-dev swig python3-dev samurai"
|
||||||
|
options="!check" #test suite is nonfunctional with python bindings
|
||||||
|
subpackages="$pkgname-dev $pkgname-doc $pkgname-python-pyc $pkgname-python:_py"
|
||||||
|
source="
|
||||||
|
https://files.salome-platform.org/Salome/other/med-$pkgver.tar.gz
|
||||||
|
hdf5.patch
|
||||||
|
cmake-config-dir.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/med-${pkgver}_SRC"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cmake -B build -G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=None \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DMEDFILE_BUILD_TESTS=OFF \
|
||||||
|
-DMEDFILE_BUILD_PYTHON=ON
|
||||||
|
cmake --build build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
DESTDIR="$pkgdir" cmake --install build
|
||||||
|
}
|
||||||
|
|
||||||
|
_py() {
|
||||||
|
pkgdesc="Python bindings for libmedc"
|
||||||
|
depends="python3"
|
||||||
|
amove usr/lib/python3*
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
8917e7ecfe30e1259b0927c8e1c3d6efd86ed2386813f6d90217bd95589199478e587f0815031ab65cacf7901a30b77a6307414f9073caffe6e7f013e710d768 med-4.1.1.tar.gz
|
||||||
|
68d9291e73a68d674081314028c0fce7bbd4a7b78b93b7e5078117ce62f2d07318bc33ec95091ce677148ec3926c1ce653d0760c34e74b29257a7be59210f040 hdf5.patch
|
||||||
|
8d0f58cd67d205fbacaff0e6da76e2ee5473457b478ede13a551ebe5853c0716c7406b74c3792e1ace33a34d352fccca8dd2940f063a7c060a12529d060a991a cmake-config-dir.patch
|
||||||
|
"
|
11
backports/libmedc/cmake-config-dir.patch
Normal file
11
backports/libmedc/cmake-config-dir.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -101,7 +101,7 @@
|
||||||
|
IF(WIN32 AND NOT CYGWIN)
|
||||||
|
SET(INSTALL_CMAKE_CONFIG_DIR cmake)
|
||||||
|
ELSE()
|
||||||
|
- SET(INSTALL_CMAKE_CONFIG_DIR share/cmake/medfile-${MED_STR_VERSION})
|
||||||
|
+ SET(INSTALL_CMAKE_CONFIG_DIR lib${LIB_SUFFIX}/cmake/medfile-${MED_STR_VERSION})
|
||||||
|
ENDIF()
|
||||||
|
SET(INSTALL_INCLUDE_DIR include)
|
||||||
|
|
94
backports/libmedc/hdf5.patch
Normal file
94
backports/libmedc/hdf5.patch
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
Originally from https://gist.github.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47
|
||||||
|
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 > 14
|
||||||
|
#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/_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 > 14
|
||||||
|
#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 > 14
|
||||||
|
#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/_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 > 14
|
||||||
|
#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 > 14
|
||||||
|
#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 > 14
|
||||||
|
#error "Don't forget to change the compatibility version of the library !"
|
||||||
|
#endif
|
||||||
|
if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18 ) ) {
|
Loading…
Reference in a new issue