# -*- 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

PortSystem          1.0
PortGroup           github 1.0

epoch               1
github.setup        westes flex 2.6.4 v
categories          devel
license             BSD
maintainers         {ryandesign @ryandesign} openmaintainer

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.

github.tarball_from releases
use_lzip            yes

checksums           rmd160  22cbf6c42daa68ca33fb72adefb191724c256a78 \
                    sha256  6fd4f424d69b3a03f7411050f74ce2199ac5cdd3a3174eb1f055fd04ea304ca7

depends_lib         port:gettext-runtime
depends_run         port:m4
depends_skip_archcheck-append m4

installs_libs       yes

patchfiles-append   dynamic_lookup-11.patch

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++
}