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

categories          devel graphics games
license             MIT
maintainers         {judaew @judaew} openmaintainer

description         Tiny but powerful single file wavefront obj loader
long_description    \
    Tiny but powerful single file wavefront obj loader written in C++03. No \
    dependency except for C++ STL. It can parse over 10M polygons with \
    moderate memory and time. tinyobjloader is good for embedding .obj loader \
    to your (global illumination) renderer.

conflicts           tinyobjloader-devel
github.setup        tinyobjloader tinyobjloader 1.0.7 v
revision            0

checksums           rmd160 3cef910b680b65d4812ad3bd7b0f30e6b489527c \
                    sha256 7a64832ac9b1b3fa98997a0d08b4fc0d07ab8ec54459f411ed080375ef66f91c \
                    size 993325

compiler.cxx_standard \
                     2003

subport tinyobjloader-devel {
    conflicts           tinyobjloader
    github.setup        tinyobjloader tinyobjloader 2.0.0rc10 v
    github.tarball_from archive
    revision            0

    checksums           rmd160  0388b79f5251786fa858a966f437de56c49688cd \
                        sha256  e1bc2e5547b562d33ca4a90b581717984a70d58113d83208dbc97c82e137b9fe \
                        size    971003
}

configure.args-append \
                    -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON

if {${subport} eq ${name}} {
    livecheck.type      regex
    livecheck.url       https://api.github.com/repos/tinyobjloader/tinyobjloader/tags?per_page=100
    livecheck.regex     \".+tarball/refs/tags/v(\\d+.\\d+.\\d+)\"
}
