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

pkgname=xsimd
pkgver=12.1.1
pkgrel=1
pkgdesc='QuantStack tools library - Multi-dimensional arrays with broadcasting and lazy computing'
arch=(any)
url='https://github.com/QuantStack/xsimd'
license=(BSD)
depends=()
makedepends=(cmake
             gtest)
source=(https://github.com/QuantStack/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('8e45a8e9b28358d5f20f713ea19a8c366edc62790c27984149f283dfe808d78a549c8ec465e8b3677d7e30b2cb80093908de364bbb9dc80683f5fdfb843131e1')

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

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