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

pkgname=xsimd
pkgver=14.1.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=('88400c1ff2eec4a3bdca51ed1ad83be943a75e9032db273829868671501195b1a0202c91bb5e6f7c7f8d252d07ba20db7f12bc71e86752da6a60b86ba4dd1cb2')

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
}
