# -*- 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 106164 2013-05-17 16:12:06Z larryv@macports.org $

PortSystem          1.0
PortGroup           github 1.0

epoch               1
github.setup        martine ninja 1.3.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  4e3940842892bd6debdff00deefb20bcc9fbb2ff \
                    sha256  90c8cb853bbaf64da7de90895793512fc9b55bdd868a3f3623dee558893fed42

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
}
