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

github.setup        msteinert bstring 1.1.0 v
github.tarball_from releases
revision            0

use_xz              yes

categories          textproc devel
license             BSD
maintainers         {@trodemaster icloud.com:manuals-unread2u} openmaintainer

description         The Better String Library for C
long_description    ${name} is a fork of Paul Hsieh's Better String Library. \
                    It provides a comprehensive string library for C with \
                    UTF-8 support, a meson build system, and continuous \
                    integration via GitHub Actions.

homepage            https://github.com/msteinert/bstring

checksums           rmd160  cf8098657d90d894e911326891ab46696a174a54 \
                    sha256  1b513965a658494193ab9431c229ea675a7b1c7c85de9d68b8cc089abfb82240 \
                    size    121708

variant tests description {Build and run tests} {
    depends_build-append    port:check
    configure.args-append   -Denable-tests=true
    test.run                yes
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} README.md COPYING \
        ${destroot}${prefix}/share/doc/${name}
}
