# Description: A collection of sparse matrix libraries
# URL: http://faculty.cse.tamu.edu/davis/suitesparse.html
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: lapack metis

name=suitesparse
version=7.1.0
release=1
source=(https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v$version/$name-$version.tar.gz)

build() {
  cd SuiteSparse-$version

  CMAKE_OPTIONS="-D BLA_VENDOR=Generic \
  -D CMAKE_INSTALL_PREFIX=/usr \
  -D CMAKE_INSTALL_LIBDIR=lib \
  -D CMAKE_BUILD_TYPE=Release \
  -D CMAKE_C_FLAGS_RELEASE=\"$CFLAGS -ffat-lto-objects\" \
  -D CMAKE_CXX_FLAGS_RELEASE=\"$CXXFLAGS -ffat-lto-objects\"" \
  make

  make DESTDIR=$PKG install
}
