diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 104 | ||||
-rw-r--r-- | pycompile.patch | 13 |
3 files changed, 75 insertions, 59 deletions
@@ -1,7 +1,7 @@ pkgbase = med-openmpi - pkgdesc = Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - code-aster exchange module linked to hdf5 - pkgver = 4.0.0 - pkgrel = 4 + pkgdesc = Generic pre- and post-processing platform for numerical simulation (openmpi version) + pkgver = 4.1.0 + pkgrel = 2 url = https://www.salome-platform.org/downloads arch = x86_64 license = LGPL @@ -12,12 +12,11 @@ pkgbase = med-openmpi depends = hdf5-openmpi depends = tk depends = python - source = http://files.salome-platform.org/Salome/other/med-4.0.0.tar.gz - source = https://gist.githubusercontent.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47/raw/7482f9a42fdd277f5f9cf0167ea7a3381032ca7a/hdf5-1.12.patch - source = pycompile.patch - sha256sums = a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004 + options = debug + source = http://files.salome-platform.org/Salome/other/med-4.1.0.tar.gz + source = hdf5-1.12.patch::https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch?id=350ea3e89d0e87e35a3a4b5f2ce92b55aae9d226 + sha256sums = 847db5d6fbc9ce6924cb4aea86362812c9a5ef6b9684377e4dd6879627651fce sha256sums = 82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206 - sha256sums = fec659efc391376eeb73c2e749d98ae504a178dde2d2e9d7b81d26537a043300 pkgname = med-openmpi provides = med @@ -25,6 +24,6 @@ pkgname = med-openmpi replaces = med pkgname = med-openmpi-docs + pkgdesc = Generic pre- and post-processing platform for numerical simulation (openmpi version) (Documentation) arch = any depends = - @@ -1,68 +1,98 @@ -# Maintainer: nim65s -# Former Maintainer: Joey Dumont <joey.dumont@gmail.com> -# Contributor: simonp -# Contributor: Martin Ortbauer <mortbauer@gmail.com> +# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com> # Original: Michele Mocciola <mickele> # Contributor: Brice Méalier <mealier_brice@yahoo.fr> -# Modified by: César Vecchio <cesar UNDERSTRIKE vecchio AT yahoo DOT com> +# Contributor: César Vecchio <cesar UNDERSTRIKE vecchio AT yahoo DOT com> # Contributor: valandil +# Contributor: nim65s +# Contributor: Joey Dumont <joey.dumont@gmail.com> +# Contributor: simonp +# Contributor: Martin Ortbauer <mortbauer@gmail.com> _pkgname='med' -pkgname=('med-openmpi' 'med-openmpi-docs') -pkgver=4.0.0 -pkgrel=4 -pkgdesc="Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - code-aster exchange module linked to hdf5" +pkgname=('med-openmpi' + 'med-openmpi-docs' + ) +pkgver=4.1.0 +pkgrel=2 +pkgdesc="Generic pre- and post-processing platform for numerical simulation (openmpi version)" url="https://www.salome-platform.org/downloads" license=('LGPL') -depends=('hdf5-openmpi' 'tk' 'python') -makedepends=('gcc-fortran' 'swig' 'openmpi' 'cmake') +depends=('hdf5-openmpi' + 'tk' + 'python' + ) +makedepends=('gcc-fortran' + 'swig' + 'openmpi' + 'cmake' + ) arch=('x86_64') source=("http://files.salome-platform.org/Salome/other/${_pkgname}-${pkgver}.tar.gz" - "https://gist.githubusercontent.com/jedbrown/527ef81ff59a0dccf833da40fdd15a47/raw/7482f9a42fdd277f5f9cf0167ea7a3381032ca7a/hdf5-1.12.patch" - "pycompile.patch") -sha256sums=('a474e90b5882ce69c5e9f66f6359c53b8b73eb448c5f631fa96e8cd2c14df004' - '82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206' - 'fec659efc391376eeb73c2e749d98ae504a178dde2d2e9d7b81d26537a043300') + 'hdf5-1.12.patch::https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch?id=350ea3e89d0e87e35a3a4b5f2ce92b55aae9d226' + ) +sha256sums=('847db5d6fbc9ce6924cb4aea86362812c9a5ef6b9684377e4dd6879627651fce' + '82d28b6ae2ee6ceb3c6de9acb861a49741e2e759c7c556217f7d284216788206' + ) +options=('debug') prepare() { - cd ${_pkgname}-${pkgver} - patch -p1 -i "$srcdir/hdf5-1.12.patch" - patch -p1 -i "$srcdir/pycompile.patch" + patch -d "${_pkgname}-${pkgver}" -p1 -i "${srcdir}/hdf5-1.12.patch" + sed 's/if H5_VERS_MINOR > 10/if 0/g' -i "${_pkgname}-${pkgver}/src/ci/MEDfileCompatibility.c" + # set libdir as cmake install path instead of share + sed 's|share/cmake|lib${LIB_SUFFIX}/cmake|g' -i "${_pkgname}-${pkgver}/CMakeLists.txt" } build() { - cd ${_pkgname}-${pkgver} - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \ - -DMEDFILE_USE_MPI=ON -DMEDFILE_BUILD_PYTHON=ON -DMEDFILE_BUILD_TESTS=OFF . - make + CXX="mpicxx" \ + CC="mpicc" \ + FC="mpif90" \ + F9X="mpif90" \ + CFLAGS+=" -DH5_USE_18_API" \ + cmake -S "${_pkgname}-${pkgver}" -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DMEDFILE_USE_MPI=ON \ + -DMEDFILE_BUILD_PYTHON=ON \ + -DMEDFILE_BUILD_TESTS=ON \ + -DMEDFILE_INSTALL_DOC=ON \ + -DCMAKE_SKIP_RPATH=ON + + cmake --build build } -# I got 37 tests failed out of 91… -#check() { - #cd "$pkgname-$pkgver" - #make test -#} +check() { + cd build + LD_LIBRARY_PATH="${srcdir}/build/src" \ + ctest -E '._Python' --output-on-failure # exclude python test due circular dependency(?) +} package_med-openmpi() { provides=('med') conflicts=('med') replaces=('med') - cd ${_pkgname}-${pkgver} - make DESTDIR=${pkgdir} install + DESTDIR="${pkgdir}" cmake --build build --target install - rm -rf $pkgdir/usr/share/doc + # remove docs + rm -rf "${pkgdir}/usr/share" + # remove testsuit + rm -fr "${pkgdir}/usr/bin/"test* + # create missing symlinks (see install output) + (cd "${pkgdir}/usr/bin" + ln -sf mdump4 mdump + ln -sf xmdump4 xmdump + ) } package_med-openmpi-docs() { + pkgdesc+=" (Documentation)" arch=('any') depends=() - cd ${_pkgname}-${pkgver} - make DESTDIR=${pkgdir} install + DESTDIR="${pkgdir}" cmake --build build --target install - rm -rf $pkgdir/usr/share/cmake - rm -rf $pkgdir/usr/lib - rm -rf $pkgdir/usr/include - rm -rf $pkgdir/usr/bin + # remove headers, binaries and libraries + rm -rf "${pkgdir}/usr/include" + rm -rf "${pkgdir}/usr/bin" + rm -rf "${pkgdir}/usr/lib" } diff --git a/pycompile.patch b/pycompile.patch deleted file mode 100644 index 464ff91db984..000000000000 --- a/pycompile.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/cmake_files/medMacros.cmake b/config/cmake_files/medMacros.cmake -index 7c82cec..f6ca6d0 100644 ---- a/config/cmake_files/medMacros.cmake -+++ b/config/cmake_files/medMacros.cmake -@@ -457,7 +457,7 @@ MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC) - GET_FILENAME_COMPONENT(inputname ${input} NAME) - INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}) - INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")") -- INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")") -+ INSTALL(CODE "SET(CMD \"import py_compile, os ; py_compile.compile(os.environ.get('DESTDIR', '') + '/' + '${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}', dfile='${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")") - INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")") - INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")") - ENDFOREACH(input ${PYFILE2COMPINST}) |