# -*- 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        google draco 1.5.6
revision            1
github.tarball_from archive

categories          archivers graphics gis
license             Apache-2
maintainers         {yahoo.com:n_larsson @nilason} openmaintainer
description         3D data compression
long_description    Draco is an open-source library for compressing and        \
                    decompressing 3D geometric meshes and point clouds.        \
                    Is is intended to improve the storage and transmission     \
                    of 3D graphics.
homepage            https://google.github.io/draco/

checksums           rmd160  e9a4e14b01727fa07221be051145d566d3da9406 \
                    sha256  0280888e5b8e4c4fb93bf40e65e4e8a1ba316a0456f308164fb5c2b2b0c282d6 \
                    size    60386658

patchfiles          patch-gltf-decoder-cc.diff

compiler.cxx_standard   2014
cmake.set_cxx_standard  yes

depends_build-append \
                    port:gtest

depends_lib-append  port:eigen3 \
                    port:ghc-filesystem \
                    port:nlohmann-json \
                    port:stb \
                    port:tinygltf

configure.args-append \
                    -DBUILD_SHARED_LIBS=ON \
                    -DDRACO_EIGEN_PATH=${prefix}/include/eigen3 \
                    -DDRACO_FILESYSTEM_PATH=${prefix}/include/ghc \
                    -DDRACO_GOOGLETEST_PATH=${prefix}/src \
                    -DDRACO_TESTS=ON \
                    -DDRACO_TINYGLTF_PATH=${prefix}/include \
                    -DDRACO_TRANSCODER_SUPPORTED=ON \
                    -DDRACO_VERBOSE=3 \

test.run            yes
test.cmd            "./draco_tests"
