PortSystem 1.0

name            tcl-dox
version         0.8.3
revision        2
categories      textproc
platforms       darwin
license         GPL-2+
maintainers     nomaintainer
description     Tcl-Dox is a filter that you can use with Doxygen for documenting Tcl source code.
long_description \
    ${description}
homepage        http://therowes.net/~greg/software/

master_sites    http://therowes.net/~greg/download/tcl-doxygen-filter/

checksums       md5     94d0befbb7b7734e17fd37379e649d2f \
                sha1    b83a6f132ff6b8bec569f98e00c9041b37047777 \
                rmd160  7be30d03f0ff66f1764dbd8492f35c91bf3422ae

depends_build   bin:flex:flex


patchfiles \
    patch-0001-require-at-least-one-white-space-and-or-tab-after-a-.diff \
    patch-0002-print-whitespace-after-namespace-declaration.diff \
    patch-0003-if-we-match-a-at-start-of-file-we-look-for-a-matchin.diff \
    patch-0004-recognize-package-require-provide-statements.diff \
    patch-0005-consume-whole-content-of-a-proc-declaration.diff \
    patch-0006-add-a-pattern-to-recognize-values-in-brackets-in-opt.diff \
    patch-0007-consume-whole-lines-or-at-least-the-newline-characte.diff \
    patch-0008-don-t-break-the-lexer-if-there-is-an-escaped-bracket.diff \
    patch-0009-remove-commented-test-code.diff

patch.pre_args-replace  -p0 -p1
patch.dir       ${worksrcpath}/src

use_configure   no
# declare empty universal variant for get_canonical_archflags
variant universal {}

build.dir       ${worksrcpath}/src
build.args      CC=${configure.cc}
# First two flags come from the included Makefile
build.args-append CFLAGS="-Wall -std=gnu99 ${configure.cflags} [get_canonical_archflags]"

destroot {
    # docs
    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING README ChangeLog ${destroot}${docdir}
    file copy ${worksrcpath}/example ${destroot}${docdir}

    # executable
    xinstall -m 755 -W ${worksrcpath} src/${name} ${destroot}${prefix}/bin
}

livecheck.type none
