# -*- 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.31.2
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball

checksums           rmd160  76065c3b2bc4c5e4d55d89db14aa49cac008f60d \
                    sha256  abb914edb9755bd6f9996ce2492657e510737ad5dc75110f7a1b61e3b15bd08f \
                    size    267298

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

}
