summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0507d126f5ad5b9f437e4ec184c1acc006613784 (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
# Maintainer: Israel Herraiz <isra@herraiz.org>

pkgname=suitesparse-mkl
pkgver=4.5.5
pkgrel=1
pkgdesc="A collection of sparse matrix libraries (compiled with the Intel MKL lib)"
url="http://faculty.cse.tamu.edu/davis/suitesparse.html"
arch=('i686' 'x86_64')
conflicts=('umfpack', 'suitesparse')
provides=('umfpack', 'suitesparse=${pkgver}')
replaces=('umfpack', 'suitesparse')
depends=('metis' 'intel-mkl' 'intel-tbb')
makedepends=('intel-compiler-base' 'intel-fortran-compiler' 'cmake' 'chrpath')
license=('GPL')
options=('staticlibs')
source=("http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-$pkgver.tar.gz" suitesparse-link-tbb.patch)
sha1sums=('60b7778e6d5e7304f1f7f337874de8a631b470b0'
          '4f0b3836e8c3c1ec5be01f988f136cee4a2cb936')

prepare() {
# Fix linking with intel-tbb
  cd SuiteSparse
  patch -p1 -i ../suitesparse-link-tbb.patch
}

build() {
   cd "$srcdir"/SuiteSparse

   source /opt/intel/mkl/bin/mklvars.sh intel64 
   source /opt/intel/composerxe/linux/bin/compilervars.sh intel64
   export BLAS="-L/opt/intel/mkl/lib/intel64 -lmkl_rt"
   TBB=-ltbb SPQR_CONFIG=-DHAVE_TBB MY_METIS_LIB=/usr/lib/libmetis.so make
}


package() {
   cd "${srcdir}"/SuiteSparse
   install -dm755 "${pkgdir}"/usr/{include,lib}

   source /opt/intel/mkl/bin/mklvars.sh intel64 
   source /opt/intel/composerxe/linux/bin/compilervars.sh intel64
   export BLAS="-L/opt/intel/mkl/lib/intel64 -lmkl_rt"
   export LAPACK="-L/opt/intel/mkl/lib/intel64 -lmkl_rt"
   
   TBB=-ltbb SPQR_CONFIG=-DHAVE_TBB MY_METIS_LIB=/usr/lib/libmetis.so \
     make INSTALL_LIB="${pkgdir}"/usr/lib INSTALL_INCLUDE="${pkgdir}"/usr/include install

   # fix RPATH
   chrpath -d "$pkgdir"/usr/lib/*
}