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

github.setup        Ict00 mpt 3 v
revision            0
categories          devel
license             MIT
maintainers         nomaintainer
description         My Project Tool
long_description    {*}${description}
checksums           rmd160  021ec34ba390bc2db0e0d660ea3d12e2809bf096 \
                    sha256  105fd0464287433ff21f11ecc1e2573b401e4968ca5a6f2d38d2a719996629c5 \
                    size    10698
github.tarball_from archive

# https://github.com/Ict00/mpt/issues/1
post-patch {
    reinplace "s|-D_XOPEN_SOURCE=500||" ${worksrcpath}/Makefile
}

compiler.c_standard 1999

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
    xinstall -d ${destroot}${prefix}/share/${name}
    xinstall -m 0644 -W ${worksrcpath} LICENSE.md Project README.md ${destroot}${prefix}/share/${name}
}

notes "
    Example project file is available at ${prefix}/share/${name}/Project
"
