aboutsummaryrefslogtreecommitdiffstats
path: root/community/lapack/APKBUILD
blob: 2d4d94837b7354c074c02423654df519328e0394 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lapack
pkgver=3.8.0
pkgrel=1
pkgdesc="Linear Algebra PACKage"
url="http://www.netlib.org/lapack"
arch="all"
license="custom"
depends=""
makedepends="gfortran cmake"
install=""
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/Reference-LAPACK/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	local i
	cd "$builddir"
	sed -e 's|/CMAKE/|/cmake/|' -i CBLAS/CMakeLists.txt
	mkdir sandbox
}

build() {
	cd "$builddir"/sandbox
	cmake .. \
	    -DCMAKE_BUILD_TYPE=Release \
	    -DCMAKE_SKIP_RPATH=ON \
	    -DBUILD_SHARED_LIBS=ON \
	    -DBUILD_TESTING=OFF \
	    -DCMAKE_INSTALL_PREFIX=/usr \
	    -DCMAKE_INSTALL_LIBDIR=lib \
	    -DCMAKE_Fortran_COMPILER=gfortran \
	    -DLAPACKE=ON \
	    -DCBLAS=ON \
	    -DBUILD_DEPRECATED=ON
	  make
}

check() {
	cd "$builddir"/sandbox
	make test
}

package() {
	cd "$builddir"/sandbox
	make DESTDIR="$pkgdir" install
}

sha512sums="17786cb7306fccdc9b4a242de7f64fc261ebe6a10b6ec55f519deb4cb673cb137e8742aa5698fd2dc52f1cd56d3bd116af3f593a01dcf6770c4dcc86c50b2a7f  lapack-3.8.0.tar.gz"