PortSystem 1.0

name                lemon
version             1.39
revision            2
categories          lang devel
platforms           darwin
maintainers         nomaintainer
license             public-domain
description         An LALR(1) parser generator like yacc or bison.
long_description    ${description}

homepage            https://www.hwaci.com/sw/lemon/
master_sites        https://people.FreeBSD.org/~seanc/ports/lemon/ \
                    freebsd
checksums           sha1    0baa13c54d437b21ccf802792e4ef081e5af3348 \
                    rmd160  fe09fb8862467da6e20090bbab18d0fb1971cfbc \
                    sha256  22ea0766611dcfa33629a9d44c275e82c9060bcfd2a2662d0ff533d428b5b5dd
use_bzip2           yes
post-extract {
    xinstall -m 644 ${filespath}/Makefile ${worksrcpath}
    xinstall -m 755 ${filespath}/configure ${worksrcpath}
}

patchfiles          patch-lemon.c.diff

configure.env-append PREFIX=${prefix}

destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/lemon
    xinstall -m 755 -W ${worksrcpath} lemon lemoncxx ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcpath}/lempar.c ${destroot}${prefix}/share/lemon/lempar.c
    xinstall -m 644 ${worksrcpath}/lempar.c ${destroot}${prefix}/share/lemon/lempar.cpp
}

livecheck.type      moddate
livecheck.url       https://www.sqlite.org/cvstrac/getfile/sqlite/tool/lemon.c