# -*- 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.363.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           rmd160  67d3f737a21f89f2287e32709037ec1fa284328d \
                    sha256  1547d8d74395d4048fb3f4a6313da56db626e89b55db238d0d7e8944c8a645f3 \
                    size    86163

cmake.build_type    Release

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} \
                        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
