# -*- 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 111116 2013-09-15 18:58:22Z cal@macports.org $

PortSystem          1.0
PortGroup           github 1.0

epoch               1
github.setup        martine ninja 1.4.0 v
categories          devel
platforms           darwin
maintainers         uuid-mail.com:521E328E-2A13-4749-826A-E4EF4F22A0F1 openmaintainer
license             Apache-2
installs_libs       no

description         Small build system with a focus on speed.

long_description    Ninja is yet another build system. It takes as input    \
                    the interdependencies of files (typically source code   \
                    and output executables) and orchestrates building them, \
                    quickly.                                                \
                                                                            \
                    Ninja joins a sea of other build systems. Its           \
                    distinguishing goal is to be fast. It is born from my   \
                    work on the Chromium browser project, which has over    \
                    30,000 source files and whose other build systems       \
                    (including one built from custom non-recursive          \
                    Makefiles) can take ten seconds to start building       \
                    after changing one file. Ninja is under a second.

homepage            http://martine.github.com/ninja/

checksums           rmd160  05a26fcb33bc651c11fbcb27c1c48694c2c4ef58 \
                    sha256  3f4bf2053613438c07b0d4c56f5bb12ab6fc4044ce02398bdd49c88a02fc73a6

patchfiles          bootstrap.py-use-system-python.diff \
                    configure.py-use-system-python.diff

use_configure       no

variant universal {}

build.cmd           ./bootstrap.py
build.target
build.args          --verbose
build.env           CXX="${configure.cxx} [get_canonical_archflags cxx]"

destroot {
    xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/etc/bash_completion.d
    xinstall -m 644 ${worksrcpath}/misc/bash-completion ${destroot}${prefix}/etc/bash_completion.d/ninja
}
