blob: 759f9cd93b5cc5c2fd3ad6436284b7d52e7b16b4 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: Tom K <tomk@runbox.com>
# Contributor: Aaron Ali <t0nedef@causal.ca>
# Contributor: McNoggins <gagnon88 AT gmail DOT com>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
pkgname=mpb
pkgver=1.11.1
pkgrel=1
pkgdesc="A program for computing the band structures and electromagnetic modes"
arch=('i686' 'x86_64')
url="https://mpb.readthedocs.io"
license=('GPL')
depends=('lapack' 'hdf5' 'fftw' 'libctl' 'guile')
makedepends=('gcc-fortran')
source=(https://github.com/NanoComp/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('dc55b081c56079727dac92d309f8e4ea84ca6eea9122ec24b7955f8c258608e1')
prepare() {
cp -r $pkgname-$pkgver $pkgname-inv
cp -r $pkgname-$pkgver $pkgname-mpi
cp -r $pkgname-$pkgver $pkgname-inv-mpi
}
build() {
# configure includes two options for working with GNU Fortran and HDF5 v1.8.x
cd "$pkgname-$pkgver"
./configure \
F77="gfortran" \
CPPFLAGS="-DH5_USE_16_API=1" \
--prefix=/usr \
--enable-shared \
--mandir=/usr/share/man
make
# configure inversion symmetry binaries (run at least 2x as fast)
cd ../$pkgname-inv
./configure \
F77="gfortran" \
CPPFLAGS="-DH5_USE_16_API=1" \
--prefix=/usr \
--enable-shared \
--with-inv-symmetry \
--mandir=/usr/share/man
make
# configure parallel computation
cd ../$pkgname-mpi
./configure \
F77="gfortran" \
CPPFLAGS="-DH5_USE_16_API=1" \
--prefix=/usr \
--enable-shared \
--with-mpi \
--mandir=/usr/share/man
make
# configure parallel computation
cd ../$pkgname-inv-mpi
./configure \
F77="gfortran" \
CPPFLAGS="-DH5_USE_16_API=1" \
--prefix=/usr \
--enable-shared \
--with-inv-symmetry \
--with-mpi \
--mandir=/usr/share/man
make
}
package() {
cd $pkgname-$pkgver
make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
cd "$srcdir"/$pkgname-inv
make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
cd "$srcdir"/$pkgname-mpi
make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
cd "$srcdir"/$pkgname-inv-mpi
make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
}
|