# Contributor: Laurent Carlier <lordheavym@gmail.com>

pkgname=static-compat-vulkan-headers
_pkgname=Vulkan-Headers
pkgver=1.4.309.0
pkgrel=1
epoch=2
pkgdesc="Vulkan header files"
arch=(any)
url="https://www.vulkan.org/"
license=("Apache-2.0 OR MIT")
makedepends=(static-compat-cmake git ninja)
provides=("static-compat-vulkan-hpp=${pkgver}")
source=("git+https://github.com/KhronosGroup/Vulkan-Headers#tag=vulkan-sdk-$pkgver")
b2sums=('d4703fab34991fd81e5c44c7ba5aa15aca30dacc6ddfec82972cda16e8598e0c8180d4612adca9063efc57b1f32c87f11c3e8f6e87df7b4785d055e0f441ea68')

build() {
  source static-compat-environment
  static-compat-cmake -S Vulkan-Headers -B build -G Ninja
  cmake --build build
}

check() {
  ctest --test-dir build --output-on-failure --stop-on-failure
}

package() {
  source static-compat-environment
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 Vulkan-Headers/LICENSES/MIT.txt \
    -t "$pkgdir/usr/share/licenses/$pkgname"
}
