# -*- 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           legacysupport 1.1
PortGroup           github  1.0
PortGroup           cmake   1.1

legacysupport.newest_darwin_requires_legacy 19

github.setup        spnda fastgltf 1.0.1 v
github.tarball_from archive
revision            0

set branch          [regsub {^(\d+\.\d+).*} ${github.version} {\1}]
homepage            https://fastgltf.readthedocs.io/v${branch}x/

description         \
    A modern C++20 glTF 2.0 library focused on speed, correctness, and \
    usability

long_description    \
    ${name} is a speed and usability focused glTF 2.0 library written in \
    modern C++20 with minimal dependencies. It uses SIMD in various areas to \
    decrease the time the application spends parsing and loading glTF data. \
    By taking advantage of modern C++20 it also \
    provides easy and safe access to the properties and data. The library \
    supports the entirety of glTF 2.0 specification, including many \
    extensions. By default, ${name} will only do the absolute minimum to work \
    with a glTF model. However, it brings many additional features to ease \
    working with the data, including accessor tools, the ability to directly \
    write to mapped GPU buffers, and decomposing transform matrices.

categories          graphics devel
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  e898aa71e069cbaeaa8ac612d0acf7a5927958b9 \
                    sha256  8399c5ed2cd90d0aef0704e65c02be59f866a9baf56bdc310cb647a6744ead94 \
                    size    202578

depends_lib-append  port:simdjson \
                    port:simdutf

# 1.0 requires C++20.
compiler.cxx_standard 2020

# Use the MacPorts simdjson and simdutf; never download copies at configure.
configure.args-append \
                    -DFASTGLTF_DOWNLOAD_SIMDJSON=OFF \
                    -DFASTGLTF_DOWNLOAD_SIMDUTF=OFF
