# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           cmake 1.1

github.setup        KhronosGroup Vulkan-ValidationLayers 1.4.321.0 vulkan-sdk-
github.tarball_from archive
name                vulkan-validationlayers
revision            0

categories          graphics
license             Apache-2
maintainers         {judaew @judaew} openmaintainer

description         Vulkan layers for validation and debugging
long_description    \
    Provides Vulkan validation layers that can be enabled to assist \
    development by enabling developers to verify their applications correct \
    use of the Vulkan API
homepage            https://vulkan.lunarg.com

checksums           sha256  80f929ac4e9a1810401064fcd3a789a98006c7916b73b215c235a5f538daa5e9 \
                    rmd160  92ce5cffc3bf3b40233931ad55f64c0b705490ab \
                    size    6494385

depends_build-append \
                    port:spirv-headers \
                    port:vulkan-headers \
                    port:vulkan-volk

depends_lib-append  \
                    port:glslang \
                    port:spirv-tools \
                    port:vulkan-loader \
                    port:vulkan-utility-libraries

set py_ver          3.13
set py_ver_nodot    [string map {. {}} ${py_ver}]
foreach stage {configure build destroot test} {
    ${stage}.env-append PATH=${frameworks_dir}/Python.framework/Versions/${py_ver}/bin:$env(PATH)
}
depends_build-append port:python${py_ver_nodot}

configure.args-append -DVULKAN_HEADERS_INSTALL_DIR=${prefix} \
                      -DGLSLANG_INSTALL_DIR=${prefix} \
                      -DSPIRV_HEADERS_INSTALL_DIR=${prefix} \
                      -DUSE_ROBIN_HOOD_HASHING=OFF
