1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
3 # Contributor: damir <damir@archlinux.org>
4 # Contributor: Jason Taylor <jftaylor21@gmail.com>
7 pkgname=(lapack blas cblas lapacke lapack-doc)
10 url='https://www.netlib.org/lapack'
11 pkgdesc='Linear Algebra PACKage'
12 makedepends=(gcc-fortran cmake python doxygen)
15 source=(https://github.com/Reference-LAPACK/lapack/archive/v$pkgver/$pkgname-$pkgver.tar.gz LICENSE.blas)
16 sha256sums=('cd005cd021f144d7d5f7f33c943942db9f03a28d110d6a3b80d718a295f7f714'
17 '2420cd1331c5754071966389b26e6196c5cb086a2ade0080953af62e0c6d4107')
20 cmake -B build -S $pkgname-$pkgver \
21 -DCMAKE_SKIP_RPATH=ON \
22 -DBUILD_SHARED_LIBS=ON \
24 -DCMAKE_INSTALL_PREFIX=/usr \
25 -DCMAKE_Fortran_COMPILER=gfortran \
26 -DLAPACKE_WITH_TMG=ON \
33 doxygen DOCS/Doxyfile_man
39 DESTDIR="$pkgdir" cmake --install build
41 rm -r "$pkgdir"/usr/lib/{libblas.*,libcblas.*,liblapacke.*}
42 rm -r "$pkgdir"/usr/lib/pkgconfig/{blas.*,cblas.*,lapacke.*}
43 rm -r "$pkgdir"/usr/lib/cmake/{cblas*,lapacke*}
44 rm -r "$pkgdir"/usr/include
48 pkgdesc="Basic Linear Algebra Subprograms"
51 DESTDIR="$pkgdir" cmake --install build/BLAS
53 install -Dm644 LICENSE.blas -t "$pkgdir"/usr/share/licenses/blas/
57 pkgdesc="C interface to BLAS"
60 DESTDIR="$pkgdir" cmake --install build/CBLAS
64 pkgdesc="C interface to LAPACK"
67 DESTDIR="$pkgdir" cmake --install build/LAPACKE
70 package_lapack-doc() {
71 pkgdesc="Man pages for BLAS/LAPACK"
73 mkdir -p "$pkgdir"/usr/share
74 cp -r lapack-$pkgver/DOCS/man "$pkgdir"/usr/share
75 rm "$pkgdir"/usr/share/man/man3/{MIN,MAX}.3 # conflict with man-pages