Skip to content

Instantly share code, notes, and snippets.

@specter119
Created September 29, 2018 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save specter119/16115fb90e12eefca1b8312c41e1e4df to your computer and use it in GitHub Desktop.
Save specter119/16115fb90e12eefca1b8312c41e1e4df to your computer and use it in GitHub Desktop.
aur-suitesparse-mkl
# 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/*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment