# -*- 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.363.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           rmd160  0753348c8a46cf546f21ed63e71c4f5aff6daf0a \
                    sha256  36720627913a591ae8ffc0f24b3c04f98af65242c9b7215d1944a85ff5b70e00 \
                    size    8516350

cmake.build_type    Release

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.14
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
