# -*- 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        zeux volk 1.4.335.0 vulkan-sdk-
github.tarball_from archive
name                vulkan-volk
revision            0

categories          graphics
license             Apache-2
platforms           any
supported_archs     noarch
maintainers         {judaew @judaew} openmaintainer

description         Meta loader for Vulkan API
long_description    \
    volk is a meta-loader for Vulkan. It allows you to dynamically load\
    entrypoints required to use Vulkan without linking to vulkan-1.dll or\
    statically linking Vulkan loader. Additionally, volk simplifies the use of\
    Vulkan extensions by automatically loading all associated entrypoints.\
    Finally, volk enables loading Vulkan entrypoints directly from the driver\
    which can increase performance by skipping loader dispatch overhead.

checksums           sha256  ca2beb1ab9bf272895bc0152ef29b437d178d837bae4a76d0022b7bbafb3c483 \
                    rmd160  78568ddde99238b324d984da4e50c66602e0eb60 \
                    size    79441

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} \
                        port:vulkan-headers \
                        path:bin/glslang:glslang \
                        path:bin/glslc:shaderc

configure.args-append \
                    -DVOLK_INSTALL=ON \
                    -DVOLK_STATIC_DEFINES=VK_USE_PLATFORM_MACOS_MVK
