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

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

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 \
                    features like autotools build system, updated test suite \
                    based on Check, Valgrind integration, and continuous \
                    integration via GitHub Actions.

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

checksums           rmd160  21007dd4abd42029c5e5539639560081af0f570b \
                    sha256  7fac6e52b449817b285858764053b7deb40336860c17b0213385470b3c498048 \
                    size    510826

depends_build       path:bin/pkg-config:pkgconfig

use_autoreconf      yes

variant tests description "Build and run tests" {
    depends_lib-append  port:check
    configure.args-append --enable-tests
    test.run            yes
    test.target         check
}

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