trilinos: Update to 16.1 and enable aarch64 builds (#23977)

This commit is contained in:
Hernan Martinez
2025-04-14 22:33:06 -06:00
committed by GitHub
parent 5b123e1d3e
commit e4cbba922e
2 changed files with 34 additions and 8 deletions

View File

@@ -0,0 +1,12 @@
diff -bur Trilinos-trilinos-release-16-1-0-o/packages/kokkos/cmake/kokkos_arch.cmake Trilinos-trilinos-release-16-1-0/packages/kokkos/cmake/kokkos_arch.cmake
--- Trilinos-trilinos-release-16-1-0-o/packages/kokkos/cmake/kokkos_arch.cmake 2025-04-14 19:34:12.003632100 -0600
+++ Trilinos-trilinos-release-16-1-0/packages/kokkos/cmake/kokkos_arch.cmake 2025-04-14 19:45:45.121723900 -0600
@@ -691,7 +691,7 @@
endif()
# Clang needs mcx16 option enabled for Windows atomic functions
-if(CMAKE_CXX_COMPILER_ID STREQUAL Clang AND WIN32)
+if(CMAKE_CXX_COMPILER_ID STREQUAL Clang AND WIN32 AND (NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")))
compiler_specific_options(Clang -mcx16)
endif()

View File

@@ -8,12 +8,12 @@
_realname=trilinos
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=16.0.0
pkgver=16.1.0
_pkgver=${pkgver//./-}
pkgrel=4
pkgrel=1
pkgdesc='Algorithms for the solution of large-scale scientific problems" (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="http://trilinos.org"
msys2_repository_url="https://github.com/trilinos/Trilinos"
license=('spdx:BSD-3-Clause AND LGPL-2.1-or-later')
@@ -23,7 +23,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-netcdf"
"${MINGW_PACKAGE_PREFIX}-matio"
"${MINGW_PACKAGE_PREFIX}-hdf5"
"${MINGW_PACKAGE_PREFIX}-msmpi")
$([[ ${CARCH} == aarch64 ]] || echo "${MINGW_PACKAGE_PREFIX}-msmpi"))
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
@@ -36,16 +36,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
optdepends=("${MINGW_PACKAGE_PREFIX}-seacas")
provides=("${MINGW_PACKAGE_PREFIX}-kokkos")
source=("https://github.com/${_realname}/Trilinos/archive/${_realname}-release-${_pkgver}.tar.gz"
"https://github.com/trilinos/Trilinos/commit/b7a7a71d9ab66970e082474775952348b5a0eea4.patch")
sha256sums=('46bfc40419ed2aa2db38c144fb8e61d4aa8170eaa654a88d833ba6b92903f309'
'68eac70c267007fe50e23e9a988848a9801f11498296d574fb000d6ecf9f3d6d')
"001-aarch64-clang.patch")
sha256sums=('e9651c88f581049457036cfc01b527a9d3903c257338eeeab942befd7452f23a'
'4aa0ec733709ba9dc9f7425efb2fec5ae975c2be99601e06c5a82ef9933218ee')
noextract=(${_realname}-release-${_pkgver}.tar.gz)
apply_patch_with_msg() {
for _fname in "$@"
do
msg2 "Applying ${_fname}"
patch -Nbp1 -i "${srcdir}"/${_fname}
done
}
prepare(){
tar -xzf ${_realname}-release-${_pkgver}.tar.gz || true
cd "Trilinos-${_realname}-release-${_pkgver}"
patch -Np1 -i ../b7a7a71d9ab66970e082474775952348b5a0eea4.patch
apply_patch_with_msg \
001-aarch64-clang.patch
}
build() {
@@ -60,6 +70,10 @@ build() {
extra_config+=("-DCMAKE_Fortran_FLAGS='$FCFLAGS -fallow-argument-mismatch'")
fi
if [[ "${CARCH}" == "aarch64" ]]; then
extra_config+=("-DKokkos_ARCH_ARMV81=ON")
fi
#Static Build
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"