# $Id: Portfile 61215 2009-12-05 11:20:48Z mww@macports.org $

PortSystem 1.0

name                ragel
version             6.6
categories          lang
platforms           darwin
maintainers         mww
license             GPL
description         ragel is a state machine compiler
long_description    Ragel compiles finite state machines from regular \
                    languages into runnable C/C++ code. Ragel state \
                    machines can not only recognize byte sequences as \
                    regular expression machines do, but can also execute \
                    code at arbitrary points in the recognition of a \
                    regular language.

homepage            http://www.complang.org/ragel/
master_sites        ${homepage}
checksums           md5     5c4366369f4934adc02bd71dc1a4ee1f \
                    sha1    8c085300c90e23a120684760b5f078fca275bb49 \
                    rmd160  b0de6eaa6383f5fc9f9121012262685eec408450

depends_build       port:bison

post-build    {
    system "cd ${worksrcpath}/doc && ${build.cmd} ragel.1"
}

test.run            yes
test.dir            ${worksrcpath}/test
test.target

destroot.destdir    prefix=${destroot}${prefix}
post-destroot {
    xinstall -m 644 ${worksrcpath}/doc/ragel.1 \
        ${destroot}${prefix}/share/man/man1
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} COPYING CREDITS ChangeLog README TODO \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.version   State Machine Compiler ${version}

