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

github.setup            imageworks pystring 1.1.4 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball
revision                0
categories              devel
license                 BSD
maintainers             {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description             a collection of C++ functions which match the interface and behavior of python's string class methods
long_description        Pystring is {*}${description} using std::string.

checksums               rmd160  67f9777fdb2a89dfbb0c4c0931f9cfea74660f1b \
                        sha256  3718549e9b6bd3cfce3d69dd50825903800dfc91b066bd07686db8a857a97b21 \
                        size    19187

post-destroot {
    # header files are not installed by default
    # follow FreeBSD file system layout
    #     see https://github.com/freebsd/freebsd-ports/blob/main/devel/pystring/Makefile
    xinstall -d -m 0755 ${destroot}${prefix}/include/pystring
    xinstall -m 0644    ${cmake.source_dir}/pystring.h \
                        ${cmake.source_dir}/unittest.h \
                        ${destroot}${prefix}/include/pystring
}

test.run                yes
test.cmd                DYLD_LIBRARY_PATH=${cmake.build_dir} ctest
