projects/aports·blob master · refs

96 lines · 1.9 KiB

1# Contributor: Jakub Jirutka <[email protected]>
2# Maintainer: Jakub Jirutka <[email protected]>
3pkgname=arpack
4_pkgname=$pkgname-ng
5pkgver=3.9.1
6pkgrel=0
7pkgdesc="Collection of Fortran77 subroutines designed to solve large scale eigenvalue problems"
8url="https://github.com/opencollab/arpack-ng"
9arch="all"
10license="BSD-3-Clause"
11depends_dev="openblas-dev>=0.3.0"
12makedepends="
13 $depends_dev
14 autoconf
15 automake
16 gfortran
17 libtool
18 "
19subpackages="$pkgname-dev $pkgname-doc"
20source="https://github.com/opencollab/$_pkgname/archive/$pkgver/arpack-$pkgver.tar.gz"
21builddir="$srcdir/$_pkgname-$pkgver"
22
23# Tests hang on ppc64le when running via abuild, don't know why.
24case "$CARCH" in
25 ppc64le) options="!check";;
26esac
27
28_ilp64=no
29_builddir64="$builddir-64"
30if [ "$CARCH" = "x86_64" ]; then
31 subpackages="$subpackages $pkgname-ilp64"
32 _ilp64=yes
33fi
34
35prepare() {
36 default_prepare
37
38 ./bootstrap
39 cp -ar "$builddir" "$_builddir64"
40}
41
42build() {
43 export FFLAGS="$FFLAGS -fallow-argument-mismatch -ffixed-line-length-132"
44
45 _build
46
47 if [ "$_ilp64" = yes ]; then
48 msg "Building with ILP64..."
49
50 cd "$builddir-64"
51 _build LIBSUFFIX=64_ \
52 SYMBOLSUFFIX=_64 \
53 INTERFACE64=1 \
54 --with-blas=openblas64_ \
55 --with-lapack=openblas64_
56 fi
57}
58
59_build() {
60 ./configure \
61 --build=$CBUILD \
62 --host=$CHOST \
63 --prefix=/usr \
64 --enable-shared \
65 --enable-static \
66 --enable-icb \
67 "$@"
68 make
69}
70
71check() {
72 make check
73}
74
75package() {
76 if [ "$_ilp64" = yes ]; then
77 make -C "$_builddir64" DESTDIR="$pkgdir" install
78 fi
79
80 make DESTDIR="$pkgdir" install
81
82 install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
83
84 install -d "$pkgdir"/usr/share/doc/$pkgname
85 mv DOCUMENTS/* "$pkgdir"/usr/share/doc/$pkgname/
86}
87
88ilp64() {
89 pkgdesc="$pkgdesc (ILP64)"
90
91 amove usr/lib/libarpack64_*
92}
93
94sha512sums="
951ca590a8c4f75aa74402f9bd62e63851039687f4cb11afa8acb05fce1f22a512bff5fd1709ea85fdbea90b344fbbc01e3944c770b5ddc4d1aabc98ac334f78d2 arpack-3.9.1.tar.gz
96"