# -*- 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           compiler_blacklist_versions 1.0
PortGroup           github 1.0
PortGroup           meson 1.0

github.setup        NanoMichael MicroTeX d87ebec8436ae01a1eb183d985c1375e39b2a542
version             2023.05.29
categories          tex
license             MIT
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
description         Dynamic, cross-platform and embeddable LaTeX rendering library
long_description    {*}${description}
checksums           rmd160  6ac9bdda47f70a22a923f3b22ef1e68023a486fc \
                    sha256  c1bc2d77fe6dcc135a8b83cc8e0a602d8ac3d18bc66903d61b505690a1aba175 \
                    size    1598140
github.tarball_from archive

depends_build-append \
                    port:pkgconfig

depends_lib-append  port:gtkmm3 \
                    port:gtksourceviewmm3 \
                    port:tinyxml2

compiler.cxx_standard   2017

# Oddly, only macOS 12 fails to compile this.
# error: no matching function for call to 'not_fn'
# s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not_fn<int(int)>(isspace)));
if {${os.platform} eq "darwin" && ${os.major} == 21} {
    compiler.blacklist-append \
                    {clang}
}
