OCaml 4.14.0 rebuild
[arch-packages.git] / lapack / trunk / PKGBUILD
blob82adea875931032f900efc6a0ea74a8aeb4440d2
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>
6 pkgbase=lapack
7 pkgname=(lapack blas cblas lapacke lapack-doc)
8 pkgver=3.10.1
9 pkgrel=1
10 url='https://www.netlib.org/lapack'
11 pkgdesc='Linear Algebra PACKage'
12 makedepends=(gcc-fortran cmake python doxygen)
13 arch=(x86_64)
14 license=(custom)
15 source=(https://github.com/Reference-LAPACK/lapack/archive/v$pkgver/$pkgname-$pkgver.tar.gz LICENSE.blas)
16 sha256sums=('cd005cd021f144d7d5f7f33c943942db9f03a28d110d6a3b80d718a295f7f714'
17             '2420cd1331c5754071966389b26e6196c5cb086a2ade0080953af62e0c6d4107')
19 build() {
20   cmake -B build -S $pkgname-$pkgver \
21     -DCMAKE_SKIP_RPATH=ON \
22     -DBUILD_SHARED_LIBS=ON \
23     -DBUILD_TESTING=OFF \
24     -DCMAKE_INSTALL_PREFIX=/usr \
25     -DCMAKE_Fortran_COMPILER=gfortran \
26     -DLAPACKE_WITH_TMG=ON \
27     -DCBLAS=ON \
28     -DBUILD_DEPRECATED=ON
29   cmake --build build
31 # Build man pages
32   cd $pkgname-$pkgver
33   doxygen DOCS/Doxyfile_man
36 package_lapack() {
37   depends=(blas)
38   
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
47 package_blas() {
48   pkgdesc="Basic Linear Algebra Subprograms"
49   depends=(gcc-libs)
51   DESTDIR="$pkgdir" cmake --install build/BLAS
52   
53   install -Dm644 LICENSE.blas -t "$pkgdir"/usr/share/licenses/blas/
56 package_cblas() {
57   pkgdesc="C interface to BLAS"
58   depends=(blas)
60   DESTDIR="$pkgdir" cmake --install build/CBLAS
63 package_lapacke() {
64   pkgdesc="C interface to LAPACK"
65   depends=(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