# -*- 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.328.1 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  8d6a4092d5de62d0c6290394cf81cf7a99e36875934b1b75d595e76d08fcadd1 \
                    rmd160  63814d7e65a5bb614b916fb65e826ffae5db0cc8 \
                    size    72711

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
