# -*- 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
# $Id: Portfile 153996 2016-10-17 18:59:16Z devans@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           github 1.0

github.setup        mesonbuild meson 0.35.1
license             Apache-2
categories          devel python
maintainers         devans openmaintainer
platforms           darwin
homepage            http://mesonbuild.com/

description         Meson - a high productivity build system
long_description    Meson  is  a  build system designed to optimize programmer productivity. \
                    It aims to do this by providing simple, out-of-the-box support for modern \
                    software development tools and practices, such as unit tests, coverage reports, \
                    Valgrind,  CCache  and  the like. It is both extremely fast, and, even more importantly, \
                    as user friendly as possible.

checksums           rmd160  bb55d1909ccd94f26c348ae19939932ac43eb8c5 \
                    sha256  b2b9c75e0d826046bd74174e1a1a0705c90817b85d801756a175b475dc86e27e

# requires python 3

python.versions         34
python.default_version  34
python.link_binaries    no

depends_build-append \
                    port:py${python.version}-setuptools

depends_lib-append \
                    port:ninja

post-destroot {
    set python_prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
    foreach bname {meson mesonconf mesonintrospect wraptool} {
        ln -s  ${python_prefix}/bin/${bname}.py ${destroot}${prefix}/bin/${bname}
        ln -s  ${python_prefix}/share/man/man1/${bname}.1 ${destroot}${prefix}/share/man/man1
    }
}