# -*- 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 106553 2013-05-30 21:25:54Z g5pw@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        D-Programming-Language druntime 2.063 v
categories          lang
platforms           darwin
license             Boost-1
maintainers         takeshi openmaintainer
description         Low level runtime library for the D programming language
long_description \
    Druntime is the minimum library required to support the D programming \
    language. It includes the system code required to support the garbage \
    collector, associative arrays, exception handling, array vector operations, \
    startup/shutdown, etc.
homepage            http://dlang.org/

checksums           rmd160  5314d960497da3a0ad5c120fcb840dddfe0d611a \
                    sha256  1670d25541802f8b44bbde432d562f2da479bd3f3b511de8885694d8e2cd2310

depends_lib         port:dmd

use_configure       no

if {${build_arch}=="x86_64"} {
    set model 64
} else {
    set model 32
}

build.args          -f posix.mak \
                    CC=${configure.cc} \
                    DMD=${prefix}/bin/dmd \
                    MODEL=${model} \
                    CFLAGS=\"${configure.cflags}\"
build.target

destroot {
    xinstall -m 644 ${worksrcpath}/lib/libdruntime-osx${model}.a \
        ${destroot}${prefix}/lib/libdruntime.a
    xinstall -m 755 -d ${destroot}${prefix}/include
    file copy ${worksrcpath}/import ${destroot}${prefix}/include/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}download.html
livecheck.regex     {\.([0-9]+\.[0-9]+)\.zip}
