# -*- 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.350.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           rmd160  e93dde1ba87f36145a6406087ea8c2e994bdad15 \
                    sha256  078a9411298e4e0f60f5f5398c890783427c25a414619294ca8e69587bbd5eae \
                    size    84557

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
