# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Alexander Susha <isushik94@gmail.com>
# Contributor: Fredrik Tegenfeldt <tegenf@gmail.com>

pkgname=xsimd
pkgver=14.0.0
pkgrel=1
pkgdesc='QuantStack tools library - Multi-dimensional arrays with broadcasting and lazy computing'
arch=(any)
url='https://github.com/QuantStack/xsimd'
license=(BSD-3-Clause)
depends=()
makedepends=(cmake
             git
             gtest)
source=(git+https://github.com/QuantStack/$pkgname#tag=$pkgver)
sha512sums=('d56e94c3aee8f04bbd1386241e616de9c7c974430e40f04f401ec58544d56968454f5d837703972b793aba30d3b88f5ba7c757f065f3ebcfae358343c96731c1')

build() {
  cmake -B build -S $pkgname \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $pkgname/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
