# Description: a library for calculating the results of formula expressions stored in multiple named targets
# URL: https://gitlab.com/ixion/ixion
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: mdds spdlog

name=libixion
version=0.20.0
release=2
source=(https://gitlab.com/api/v4/projects/ixion%2Fixion/packages/generic/source/$version/libixion-$version.tar.xz
  boost.m4)

build() {
  cd $name-$version

  mv $SRC/boost.m4 m4/boost.m4
  autoreconf -vfi

  [[ -e /usr/lib/libcuda.so ]] && PKGMK_LIBIXION+=' --enable-cuda'

  CFLAGS="-O2 -fPIC" \
  CXXFLAGS="-O2 -fPIC" \
  ./configure --prefix=/usr $PKGMK_LIBIXION
  make
  make DESTDIR=$PKG install
}
