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

github.setup        bkryza clang-uml 0.6.2
github.tarball_from archive
revision            0
categories          devel
license             Apache-2
maintainers         {@bkryza gmail.com:bkryza} openmaintainer

description         Customizable automatic UML diagram generator for C++ based on Clang

long_description    clang-uml is an automatic C++ to UML class, sequence, package and \
                    include diagram generator, driven by YAML configuration files. The \
                    main idea behind the project is to easily maintain up-to-date diagrams \
                    within a code-base or document legacy code. The configuration file or \
                    files for clang-uml define the types and contents of each generated \
                    diagram.

checksums           rmd160  44d500d961c3499dde5b1383b33cfca758fa4f30 \
                    sha256  004540c328699f81abebceb33a4661b548ab3a5f74096da2c025b9971b2b17ff \
                    size    3100641

compiler.cxx_standard 2017

set llvm_version    20
set llvm_dir        ${prefix}/libexec/llvm-${llvm_version}

configure.compiler  macports-clang-${llvm_version}

depends_lib-append  port:clang-${llvm_version}
depends_lib-append  port:yaml-cpp

cmake.install_rpath-append  ${llvm_dir}/lib

configure.args-append   -DGIT_VERSION=${version} \
                        -DCMAKE_PREFIX=${llvm_dir}/lib/cmake/llvm \
                        -DBUILD_TESTS=OFF

post-destroot {
    xinstall -d ${destroot}${prefix}/share/bash-completion/completions
    xinstall ${worksrcpath}/packaging/autocomplete/clang-uml \
        ${destroot}${prefix}/share/bash-completion/completions/clang-uml
    xinstall -d ${destroot}${prefix}/share/zsh/site-functions
    xinstall ${worksrcpath}/packaging/autocomplete/_clang-uml \
        ${destroot}${prefix}/share/zsh/site-functions/_clang-uml
}
