# $Id$

PortSystem          1.0

name                flex
version             2.6.0
categories          devel
license             BSD
platforms           darwin
maintainers         mww
description         Fast lexical analyser generator
long_description    \
    Flex is a tool for generating programs that require pattern-matching on \
    text. It is usually used together with yacc/bison to automatically \
    generate a parser for a language grammar, e.g. the syntax of a \
    configuration file.

homepage            http://flex.sourceforge.net/
master_sites        sourceforge:project/flex
use_bzip2           yes

checksums           rmd160  9918907286548c468106d4aa920d633908832633 \
                    sha256  24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9

depends_lib         port:gettext \
                    port:m4

installs_libs       yes

configure.args      ac_cv_prog_AWK=/usr/bin/awk

use_parallel_build  yes

test.run            yes
test.target         check

post-destroot {
    ln -sf flex ${destroot}${prefix}/bin/flex++
}

livecheck.type      regex
livecheck.url       http://sourceforge.net/projects/flex/files/
livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}