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 lapack64 blas64 cblas64 lapacke64 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=('4b9ba79bfd4921ca820e83979db76ab3363155709444a787979e81c22285ffa9'
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 \
31 cmake -B build64 -S $pkgname-$pkgver \
32 -DCMAKE_SKIP_RPATH=ON \
33 -DBUILD_SHARED_LIBS=ON \
35 -DCMAKE_INSTALL_PREFIX=/usr \
36 -DCMAKE_Fortran_COMPILER=gfortran \
37 -DLAPACKE_WITH_TMG=ON \
39 -DBUILD_DEPRECATED=ON \
45 doxygen DOCS/Doxyfile_man
51 DESTDIR="$pkgdir" cmake --install build
53 rm -r "$pkgdir"/usr/lib/{libblas.*,libcblas.*,liblapacke.*}
54 rm -r "$pkgdir"/usr/lib/pkgconfig/{blas.*,cblas.*,lapacke.*}
55 rm -r "$pkgdir"/usr/lib/cmake/{cblas*,lapacke*}
56 rm -r "$pkgdir"/usr/include
60 pkgdesc='Basic Linear Algebra Subprograms'
63 DESTDIR="$pkgdir" cmake --install build/BLAS
65 install -Dm644 LICENSE.blas -t "$pkgdir"/usr/share/licenses/blas/
69 pkgdesc='C interface to BLAS'
72 DESTDIR="$pkgdir" cmake --install build/CBLAS
76 pkgdesc='C interface to LAPACK'
79 DESTDIR="$pkgdir" cmake --install build/LAPACKE
83 pkgdesc='Linear Algebra PACKage (64-bit integers)'
86 DESTDIR="$pkgdir" cmake --install build64
88 rm -r "$pkgdir"/usr/lib/{libblas64.*,libcblas64.*,liblapacke64.*}
89 rm -r "$pkgdir"/usr/lib/pkgconfig/{blas64.*,cblas64.*,lapacke64.*}
90 rm -r "$pkgdir"/usr/lib/cmake/{cblas*,lapacke*}
91 rm -r "$pkgdir"/usr/include
95 pkgdesc='Basic Linear Algebra Subprograms (64-bit integers)'
98 DESTDIR="$pkgdir" cmake --install build64/BLAS
100 install -Dm644 LICENSE.blas -t "$pkgdir"/usr/share/licenses/$pkgname/
104 pkgdesc='C interface to BLAS (64-bit integers)'
106 optdepends=('cblas: development headers')
108 DESTDIR="$pkgdir" cmake --install build64/CBLAS
109 rm -r "$pkgdir"/usr/include # Provided by cblas
112 package_lapacke64() {
113 pkgdesc='C interface to LAPACK (64-bit integers)'
115 optdepends=('lapacke: development headers')
117 DESTDIR="$pkgdir" cmake --install build64/LAPACKE
118 rm -r "$pkgdir"/usr/include # Provided by lapacke
121 package_lapack-doc() {
122 pkgdesc='Man pages for BLAS/LAPACK'
124 mkdir -p "$pkgdir"/usr/share
125 cp -r lapack-$pkgver/DOCS/man "$pkgdir"/usr/share
126 rm "$pkgdir"/usr/share/man/man3/{MIN,MAX}.3 # conflict with man-pages