From a9e82b2cc87a525980f24c36b7b7cfe7069dd7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Wed, 13 Mar 2024 19:16:17 +0100 Subject: [PATCH] sundials: disable MPI in all environments --- mingw-w64-sundials/PKGBUILD | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/mingw-w64-sundials/PKGBUILD b/mingw-w64-sundials/PKGBUILD index 9aede44ddb..d87973fe17 100644 --- a/mingw-w64-sundials/PKGBUILD +++ b/mingw-w64-sundials/PKGBUILD @@ -1,5 +1,15 @@ # Maintainer: Gene Harvey +_enable_mpi=no + +if [[ ${CARCH} != x86_64 ]]; then + # There are currently no msmpi libraries for Windows on ARM. + # See: https://github.com/microsoft/Microsoft-MPI/issues/66 + # So even if it were enabled for other targets above, don't build the features + # that require msmpi for ARM targets. + _enable_mpi=no +fi + _realname=sundials pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" @@ -21,12 +31,12 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-openblas" "${MINGW_PACKAGE_PREFIX}-omp" "${MINGW_PACKAGE_PREFIX}-suitesparse" - $([[ ${CARCH} != x86_64 ]] || echo \ + $([[ "$_enable_mpi" == "yes" ]] && echo \ "${MINGW_PACKAGE_PREFIX}-petsc" \ "${MINGW_PACKAGE_PREFIX}-superlu_dist")) makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" - $([[ ${CARCH} != x86_64 ]] || echo "${MINGW_PACKAGE_PREFIX}-msmpi")) + $([[ "$_enable_mpi" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-msmpi")) optdepends=("${MINGW_PACKAGE_PREFIX}-python: for running examples") source=(https://github.com/LLNL/sundials/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz '0002-sundials-missing-export.patch' @@ -68,15 +78,13 @@ build() { export FFLAGS="-Qunused-arguments" fi - if [[ ${CARCH} != x86_64 ]]; then - # There are currently no msmpi libraries for Windows on ARM. - # See: https://github.com/microsoft/Microsoft-MPI/issues/66 - # Dont' build the features that require msmpi. + if [[ "$_enable_mpi" != "yes" ]]; then _extra_config+=("-DENABLE_MPI=OFF" "-DENABLE_PETSC=OFF" "-DENABLE_SUPERLUDIST=OFF") else - _extra_config+=("-DBUILD_NVECTOR_MPIMANYVECTOR=ON" + _extra_config+=("-DBUILD_NVECTOR_MANYVECTOR=ON" + "-DBUILD_NVECTOR_MPIMANYVECTOR=ON" "-DBUILD_NVECTOR_MPIPLUSX=ON" "-DBUILD_NVECTOR_PARALLEL=ON" "-DENABLE_MPI=ON" @@ -102,7 +110,6 @@ build() { -D BUILD_IDA=ON \ -D BUILD_IDAS=ON \ -D BUILD_KINSOL=ON \ - -D BUILD_NVECTOR_MANYVECTOR=ON \ -D BUILD_NVECTOR_OPENMP=ON \ -D BUILD_NVECTOR_PTHREADS=ON \ -D BUILD_SHARED_LIBS=ON \