summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8fcc7711517365ebf112e9ff181c5ac96b890807 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Maintainer: Anton Kudelin <kudelin___AT___protonmail___DOT___com>
# Contributor: Giuseppe Borzi <gborzi___AT___ieee___DOT___org>
# Contributor: mickele <mimocciola___AT___yahoo___DOT___ com>
# Contributor: iztok pizorn <pizorn___AT___gmail___DOT___com>
# Contributor: olivier medoc <o_medoc___AT___yahoo___DOT___fr>

pkgname=atlas-lapack
pkgver=3.10.3
_lapackver=3.8.0
pkgrel=3
pkgdesc="Automatically Tuned Linear Algebra Software"
url="http://math-atlas.sourceforge.net/"
depends=('gcc-libs')
makedepends=('binutils' 'sed' 'gcc-fortran')
arch=('x86_64')
conflicts=('blas' 'lapack' 'cblas' 'atlas-lapack-base' 'openblas' 'openblas-lapack')
provides=("blas" "lapack" 'cblas' 'atlas-lapack-base')
license=('BSD' 'custom:lapack')
options=(!makeflags)
install=$pkgname.install
source=("https://github.com/Reference-LAPACK/lapack/archive/v$_lapackver.tar.gz"
        "http://downloads.sourceforge.net/math-atlas/atlas${pkgver}.tar.bz2"
        "Makefile")
noextract=("v$_lapackver.tar.gz" "atlas$pkgver.tar.bz2")
sha256sums=('deb22cc4a6120bff72621155a9917f485f96ef8319ac074a7afbc68aab88bcf6'
            '2688eb733a6c5f78a18ef32144039adcd62fabce66f2eb51dd59dde806a6d2b7'
            '7627446a0d598b55bc8f2795f8ff2028f134928b9ca597b76bf8dd5622dbff69')

prepare() {
   msg 'Before building this package, as root you must set the CPU(s)'
   msg 'governor(s) to "performance" and disable intel_pstate.'
   msg 'See: https://wiki.archlinux.org/index.php/CPU_frequency_scaling'

   cd $srcdir
   tar -xjf atlas$pkgver.tar.bz2
   mkdir -p ATLAS/build
}
   
build() {
   cd $srcdir/ATLAS/build

   ../configure --prefix=/usr \
                --shared \
                --with-netlib-lapack-tarfile="$srcdir/v$_lapackver.tar.gz"
   make build
   cd lib
   cp $srcdir/Makefile .
   make
}

check() {
   cd $srcdir/ATLAS/build

   make check
   make ptcheck
   make time
}

package() {
   cd $srcdir/ATLAS/build

   make DESTDIR=$pkgdir/usr install
   cp -d lib/*.so* $pkgdir/usr/lib
   cd $pkgdir/usr/lib
   ln -s libblas.so libblas.so.3
   ln -s liblapack.so.3 liblapack.so
   
   cd ../include/atlas
   sed -i "s#$srcdir# #g" *

   install -Dm644 $srcdir/ATLAS/build/src/lapack/reference/LICENSE \
      $pkgdir/usr/share/licenses/$pkgname/lapack-license.txt
}