# -*- 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 117452 2014-02-26 22:55:17Z cal@macports.org $

PortSystem          1.0

name                ott
version             0.24
platforms           darwin
categories          devel
license             BSD
maintainers         gmail.com:ggreif
description         tool for writing definitions of programming languages
long_description    Ott is a tool for writing definitions of programming \
                    languages and calculi. It takes as input a definition of a \
                    language syntax and semantics, in a concise and readable \
                    ASCII notation that is close to what one would write in \
                    informal mathematics. It generates LaTeX to build a \
                    typeset version of the definition, and Coq, HOL, and \
                    Isabelle versions of the definition.

homepage            http://www.cl.cam.ac.uk/~pes20/ott/
master_sites        ${homepage}
distname            ott_distro_${version}

checksums           rmd160  69b91b55d2ea1cf06fe1ec0ee37d9aee12d6f826 \
                    sha256 ef215996eff2760631bf5333ad2ef97f46f1bb281e9a2e12dca5110b465a1f43 

depends_lib         port:ocaml

use_configure       no

build.env           PREFIX=${prefix}
build.target        world

destroot {
    xinstall -m 755 -d ${destroot}${prefix}/bin \
        ${destroot}${prefix}/share/doc
    xinstall -m 755 -W ${worksrcpath} bin/ott \
        ${destroot}${prefix}/bin/ott
    file copy ${worksrcpath}/doc \
        ${destroot}${prefix}/share/doc/${name}
    file copy ${worksrcpath}/examples \
        ${destroot}${prefix}/share/doc/${name}/examples
    xinstall -m 644 ${worksrcpath}/LICENCE \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     "ott_distro_(\\d+(\\.\\d+)*)[quotemeta ${extract.suffix}]"
