mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
134 lines
3.4 KiB
Bash
134 lines
3.4 KiB
Bash
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
# Maintainer: David Runge <dvzrv@archlinux.org>
|
|
# Contributor: Anatol Pomozov <anatol dot pomozov at gmail>
|
|
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org
|
|
# - remove make/optdepend on cuda and configure option
|
|
# - remove make/optdepend on hip-runtime-amd and rocm configure option
|
|
# - build for v8 only, 32-bit support dropped in version 5
|
|
|
|
buildarch=8
|
|
|
|
pkgbase=openmpi
|
|
pkgname=(
|
|
openmpi
|
|
openmpi-docs
|
|
)
|
|
pkgver=5.0.2
|
|
pkgrel=6
|
|
pkgdesc='High performance message passing library (MPI)'
|
|
arch=(x86_64)
|
|
url='https://www.open-mpi.org'
|
|
license=('BSD-3-Clause AND LicenseRef-MPICH')
|
|
makedepends=(
|
|
gcc-fortran
|
|
gcc-libs
|
|
glibc
|
|
hwloc
|
|
libevent
|
|
libfabric
|
|
libnl
|
|
openpmix
|
|
prrte
|
|
valgrind
|
|
zlib
|
|
)
|
|
source=(
|
|
https://www.open-mpi.org/software/ompi/v${pkgver%.*}/downloads/$pkgbase-$pkgver.tar.bz2)
|
|
sha256sums=('ee46ad8eeee2c3ff70772160bff877cbf38c330a0bc3b3ddc811648b3396698f')
|
|
b2sums=('ea7a584ab945c8b2fcdd8a3c2510205582606442efaad2058b321ad4c787b2f66f79e86aa4b8b094eba9508fa208f40a4a843b9938d93899eee1948d0299b7b8')
|
|
|
|
_pick() {
|
|
local p="$1" f d; shift
|
|
for f; do
|
|
d="$srcdir/$p/${f#$pkgdir/}"
|
|
mkdir -p "$(dirname "$d")"
|
|
mv "$f" "$d"
|
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
|
done
|
|
}
|
|
|
|
prepare() {
|
|
cd $pkgbase-$pkgver
|
|
# workaround for https://github.com/open-mpi/ompi/issues/12257
|
|
sed -i 's|WRAPPER__FCFLAGS|WRAPPER_FCFLAGS|g' configure
|
|
sed -i 's|WRAPPER_EXTRA_FCFLAGS|WRAPPER_FCFLAGS|g' configure
|
|
sed -i 's|"-I/usr/include",||' opal/tools/wrappers/opal_wrapper.c
|
|
}
|
|
|
|
build() {
|
|
local configure_options=(
|
|
--prefix=/usr
|
|
--enable-builtin-atomics
|
|
--enable-memchecker
|
|
--enable-mpi-fortran=all
|
|
--enable-pretty-print-stacktrace
|
|
--libdir=/usr/lib
|
|
--sysconfdir=/etc/$pkgbase
|
|
--with-hwloc=external
|
|
--with-libevent=external
|
|
--with-pmix=external
|
|
--with-prrte=external
|
|
--with-valgrind
|
|
)
|
|
cd $pkgbase-$pkgver
|
|
|
|
# set environment variables for reproducible build
|
|
# see https://github.com/open-mpi/ompi/blob/main/docs/release-notes/general.rst
|
|
export HOSTNAME=buildhost
|
|
export USER=builduser
|
|
|
|
# TODO: remove ac_cv_func_sem_open=no when there is a glibc release fixing https://sourceware.org/bugzilla/show_bug.cgi?id=30789
|
|
ac_cv_func_sem_open=no ./configure "${configure_options[@]}"
|
|
# prevent excessive overlinking due to libtool
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
make V=1
|
|
}
|
|
|
|
check() {
|
|
make check -C $pkgbase-$pkgver
|
|
}
|
|
|
|
package_openmpi() {
|
|
depends=(
|
|
gcc-libs
|
|
glibc
|
|
hwloc
|
|
libevent libevent_{core,pthreads}-2.1.so
|
|
libfabric
|
|
libnl
|
|
openpmix libpmix.so
|
|
prrte libprrte.so
|
|
zlib
|
|
)
|
|
optdepends=(
|
|
'gcc-fortran: fortran support'
|
|
'openssh: for execution on remote hosts via plm_ssh_agent'
|
|
)
|
|
provides=(
|
|
libmpi.so
|
|
libmpi_mpifh.so
|
|
libmpi_usempi_ignore_tkr.so
|
|
libmpi_usempif08.so
|
|
libopen-pal.so
|
|
liboshmem.so
|
|
)
|
|
backup=(etc/$pkgname/$pkgname-mca-params.conf)
|
|
|
|
make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
|
|
(
|
|
cd "$pkgdir"
|
|
_pick $pkgbase-docs usr/share/doc
|
|
)
|
|
install -Dm 644 $pkgbase-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
|
}
|
|
|
|
package_openmpi-docs() {
|
|
pkgdesc+=" - documentation"
|
|
|
|
mv -v $pkgname/* "$pkgdir"
|
|
install -vDm 644 $pkgbase-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
|
}
|
|
|
|
# vim: ts=2 sw=2 et:
|