aur-suitesparse-mkl

Kyle
2018-09-29T12:51:57Z

PKGBUILD

| # Maintainer: Israel Herraiz <isra@herraiz.org>
|
| pkgname=suitesparse-mkl
| pkgver=5.2.0
| 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=('lapack' '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-fix-icc.patch)
| sha1sums=('e80fb66c7c8613e24cc87c9fb4482e8348f690e9'
| 'ce2e1dfe590a96d7ea3af01e74c74d1191598bcf')
|
| prepare() {
| # Fix linking with intel-tbb
| cd SuiteSparse
| patch -p1 -i ../suitesparse-fix-icc.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/*
| }