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

name                byaccj
version             1.15
revision            1
checksums           rmd160  f876560c40bd316f775fa5e22734147576aeb220 \
                    sha256  4d6ba21fa5bc4ec4b1be9eb6e6efbb367eb6df2577fd0eaff60be9c6614f6609 \
                    size    53646

categories          devel java
platforms           darwin
maintainers         nomaintainer
license             public-domain

description         yacc compatible parser generator with Java extension

long_description    byacc/j is an extension to the Berkeley v1.8 yacc \
                    compatible parser generator. byacc/j not only can \
                    produce C/C++ source for a LALR-grammar parser, \
                    but also Java source.

homepage            http://byaccj.sourceforge.net/
master_sites        sourceforge
distname            byaccj${version}_src
worksrcdir          byaccj${version}/src

patchfiles          Makefile.patch \
                    implicit.patch

use_configure       no

variant universal {}

build.args          CC="${configure.cc} [get_canonical_archflags]" \
                    CFLAGS="${configure.cflags}" \
                    LDFLAGS="${configure.ldflags}"

destroot {
    xinstall -m 0755 -d ${destroot}${prefix}/share/doc/
    file copy ${worksrcpath}/../docs ${destroot}${prefix}/share/doc/${name}
    xinstall -W ${worksrcpath} new_features no_warranty \
            ${destroot}${prefix}/share/doc/${name}/
    xinstall -m 0755 ${worksrcpath}/yacc ${destroot}${prefix}/bin/byaccj
    xinstall -m 0644 ${worksrcpath}/yacc.1 ${destroot}${prefix}/share/man/man1/byaccj.1
}
