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

# Any version update requires revbumping all ports that link with the library
# because the full version number is in the library's install name.
# See https://github.com/commonmark/cmark/issues/474
github.setup        commonmark cmark 0.30.3
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

checksums           rmd160  526aaf6777c0ac377cafa9de661c7166aad065ff \
                    sha256  79c4273d63ac4835734c3e7567885964d56a4f2e8bccd4321d5e3ead72745cdd \
                    size    246966

categories          devel
maintainers         nomaintainer
license             BSD

description         shared library with functions for parsing CommonMark documents
long_description    shared library (libcmark) with functions for parsing CommonMark \
                    documents to an abstract syntax tree (AST), manipulating the AST, \
                    and rendering the document to HTML, groff man, LaTeX, CommonMark, \
                    or an XML representation of the AST.

configure.args-append \
                    -DCMARK_TESTS=OFF \
                    -DCMARK_STATIC=OFF
                    
variant buildtests description "Build Tests" {
    depends_lib-append        port:python310
    configure.args-replace    -DCMARK_TESTS=OFF -DCMARK_TESTS=ON
    configure.args-append     -DPYTHON_EXECUTABLE=${prefix}/bin/python3.10
    test.run                  yes

}
