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

name                JSE
github.setup        geometryprocessing json-spec-engine 11d028ebf54c3665e1a7c25d8ac622a8cb851223
version             2024.06.18
revision            0
categories          devel
license             MIT
platforms           any
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
description         JSON Spec Engine
long_description    ${name} is a library to validate a JSON file containing a set \
                    of parameters and to complete it with default parameters. \
                    The specification of the JSON format is itself a JSON file. \
                    The library contains Python scripts for generating documentation \
                    for the JSON format in HTML format and as a graph.
checksums           rmd160  4796ec63a9d6235dd10ed99ea3bd164f90e4473f \
                    sha256  899e97eb9e432ab0f2caf2226c451bfbc88e1461b78ced11188ea5d36707378b \
                    size    3190369
github.tarball_from archive

depends_lib-append  port:nlohmann-json

patchfiles          patch-find-json.diff

compiler.cxx_standard   2017

configure.args-append \
                    -DJSE_WITH_SANITIZERS=OFF \
                    -DJSE_WITH_TESTS=OFF \
                    -DJSE_WITH_APP=ON

destroot {
    copy ${cmake.build_dir}/jse_app ${destroot}${prefix}/bin
    copy ${cmake.build_dir}/libjse.a ${destroot}${prefix}/lib
    copy ${worksrcpath}/src/jse/jse.h ${destroot}${prefix}/include
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir}
    copy ${worksrcpath}/docs ${destroot}${docdir}
}
