# $Id$

PortSystem 1.0

name                ragel
version             6.9
categories          lang
platforms           darwin
maintainers         mww
license             GPL-2
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.colm.net/open-source/ragel/
master_sites        http://www.colm.net/files/ragel/
checksums           rmd160  67c7b1f39956f9707742201a1a681c164cff84ab \
                    sha256  6e07be0fab5ca1d9c2d9e177718a018fc666141f594a5d6e7025658620cf660a

depends_build       port:bison

installs_libs       no

post-build    {
    system -W ${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.type      regex
livecheck.url       ${homepage}
livecheck.regex     {ragel-(\d+(?:\.\d+)*).tar.gz}