# -*- 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

github.setup        f3d-app f3d 4.0.1 v
github.tarball_from archive
revision            0

categories          graphics
platforms           {macosx >= 13.3}
license             BSD
maintainers         @wu21-web openmaintainer

description         Fast and minimalist 3D viewer
long_description    F3D is a fast and minimalist 3D viewer, fully controllable \
                    from the command line. It supports interactive viewing, \
                    animations, and rendering 3D models to image files.

homepage            https://f3d.app

checksums           rmd160  634349c549e98ccac2cbe6dc0595b2323275cadd \
                    sha256  336dd26581a0a9b0bf9e6e9c900e3f103cf6df58971cfd5bbaf6fa93cd285560 \
                    size    5484826

compiler.cxx_standard 2020
compiler.blacklist-append {clang < 1500.3}

depends_build-append \
                    port:cxxopts \
                    port:nlohmann-json

depends_lib-append  port:vtk

configure.args-append \
                    -DBUILD_SHARED_LIBS:BOOL=ON \
                    -DBUILD_TESTING:BOOL=OFF \
                    -DF3D_BINDINGS_C:BOOL=OFF \
                    -DF3D_BINDINGS_JAVA:BOOL=OFF \
                    -DF3D_BINDINGS_PYTHON:BOOL=OFF \
                    -DF3D_BUILD_APPLICATION:BOOL=ON \
                    -DF3D_MACOS_BUNDLE:BOOL=OFF \
                    -DF3D_USE_EXTERNAL_CXXOPTS:BOOL=ON \
                    -DF3D_USE_EXTERNAL_NLOHMANN_JSON:BOOL=ON

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    move ${destroot}${prefix}/LICENSE.md \
         ${destroot}${prefix}/THIRD_PARTY_LICENSES.md \
         ${destroot}${prefix}/share/doc/${name}
}

# No pre-releases
github.livecheck.regex {([0-9.]+)}
