# vulkan-headers 1.4.350.1 — cabeceras de la API Vulkan + config CMake Vulkan::Headers. Blocker de kwin
# (find_package(Vulkan REQUIRED) → Vulkan::Vulkan). Campaña KDE (ADR 0011), cadena Vulkan. Headers-only:
# INTERFACE library, no compila nada, sólo instala include/vulkan + los .cmake. Versión debe casar con
# vulkan-loader. Tests y el módulo C++20 (Vulkan-Hpp) apagados.
name    = "vulkan-headers"
version = "1.4.350.1"

[source]
tarball = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.350.1.tar.gz"
sha256  = "6d1bb65e49520344cc0a48af3dc02e993781efff14c7ebdcb8ae9fa23ddf7e83"

[build]
compiler    = "zig-cc"
target      = "x86_64-linux-musl"
link        = "dynamic"
zig_version = "0.13.0"

[build.phases]
configure = '''
ZW="$PWD/.zwrap"; mkdir -p "$ZW"
printf '#!/bin/sh\nexec /opt/zig/zig cc -mcpu=baseline "$@"\n'  > "$ZW/cc"
printf '#!/bin/sh\nexec /opt/zig/zig c++ -mcpu=baseline "$@"\n' > "$ZW/cxx"
chmod +x "$ZW/cc" "$ZW/cxx"
cmake -B build -G Ninja -Wno-dev \
  -DCMAKE_C_COMPILER="$ZW/cc" -DCMAKE_CXX_COMPILER="$ZW/cxx" \
  -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
  -DVULKAN_HEADERS_ENABLE_TESTS=OFF -DVULKAN_HEADERS_ENABLE_MODULE=OFF
'''
compile = "cmake --build build"
install = "DESTDIR=/out cmake --install build"

[deps]
build = ["cmake", "samurai", "python3", "pkgconf"]
