# -*- 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.321.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  021ed905eea6f3e2cc8a60a21459ee7b43f98f32052ca30f27a3be390b7a4862 \
                    rmd160  6e86147222c3b240f3781ebf137c820ef00ca57f \
                    size    71495

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
