# $Id: Portfile 98589 2012-10-09 14:08:08Z ryandesign@macports.org $

PortSystem          1.0

name                flex
version             2.5.37
revision            1
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
checksums           rmd160  456a5aa71e9fed1c5e723801278331fbdd0dac02 \
                    sha256  17aa7b4ebf19a13bc2dff4115b416365c95f090061539a932a68092349ac052a
use_bzip2           yes

depends_lib         port:gettext \
                    port:m4

installs_libs       yes

configure.args      --infodir=${prefix}/share/info \
                    --mandir=${prefix}/share/man

use_parallel_build  yes

test.run            yes
test.target         check

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

livecheck.type      regex
livecheck.regex     {version (\d+(?:\.\d+)*)}
