aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openmpi/APKBUILD
blob: c8c41a051a2aec7a105f22a54d31ee06c394e7bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Daniel Sabogal <dsabogalcc@gmail.com>
pkgname=openmpi
pkgver=2.1.1
pkgrel=0
pkgdesc="Message passing library for high-performance computing"
url="https://www.open-mpi.org/"
arch="all !ppc64le"
license="BSD"
makedepends="perl gfortran hwloc-dev libevent-dev libgomp"
subpackages="$pkgname-dev:_dev $pkgname-doc"
source="https://www.open-mpi.org/software/ompi/v${pkgver%.*}/downloads/$pkgname-$pkgver.tar.bz2
	include-unistd.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc/$pkgname \
		--enable-mpi-fortran=all \
		--enable-mpi-cxx \
		--enable-ipv6 \
		--with-threads=posix \
		--with-hwloc=/usr
	make
}

check() {
	make -C "$builddir" check
}

package() {
	make -C "$builddir" DESTDIR="$pkgdir" install
}

_dev() {
	default_dev

	local bins="mpiCC mpic++ mpicc mpicxx mpif77 mpif90 mpifort
		ortecc opal_wrapper oshcc oshfort shmemcc shmemfort"

	mkdir -p "$subpkgdir"/usr/bin
	local i; for i in $bins; do
		mv "$pkgdir"/usr/bin/$i "$subpkgdir"/usr/bin
	done
}

sha512sums="c11bba6ec815f9c8d32fce3578f8995f6cd694e02fb850d7e6cd3975989bb38fdbef348064264a1de418d0a21411c70ca74347ecff4f27eb5a2f6835019d6bca  openmpi-2.1.1.tar.bz2
5f4720e3d078c4e6938c0c970972c9ab574e37aebc31bebd9fb2a2712020c6bf6b4e366e6a75ed23c4568a8c2b3b3a2fa3b8407edb6ec1629e2c242403edd103  include-unistd.patch"