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

PortSystem          1.0

name                cvs-fast-export
version             1.40
categories          devel
license             GPL-2
platforms           darwin
maintainers         mojca openmaintainer

description         Export an RCS or CVS history as a fast-import stream

long_description    This program analyzes a collection of RCS files in a CVS \
                    repository (or outside of one) and, when possible, emits \
                    an equivalent history in the form of a fast-import stream. \
                    Not all possible histories can be rendered this way – the \
                    program tries to emit useful warnings when it can't. \
                    The program can also produce a visualization of the \
                    resulting commit DAG in the DOT format handled by the \
                    graphviz suite. The package also includes cvssync, a tool \
                    for mirroring masters from remote CVS hosts. 

homepage            http://www.catb.org/~esr/cvs-fast-export/
master_sites        ${homepage}

checksums           rmd160  373b61d8dd7caf87431bb5e362e3adbed92b1255 \
                    sha256  5c2ad1a50dd7494f66c475d567e3f526913a7f9f6ae27e837c83425432ddb8d1

depends_build       port:flex \
                    port:bison \
                    port:asciidoc

patchfiles          patch-Makefile.diff

post-patch {
    reinplace "s|@@PREFIX@@|${prefix}|g"        ${worksrcpath}/Makefile
    reinplace "s|@@FLEX@@|${prefix}/bin/flex|g" ${worksrcpath}/Makefile
    reinplace "s|@@CC@@|${configure.cc}|g"      ${worksrcpath}/Makefile
    reinplace "s|@@A2X@@|${prefix}/bin/a2x|g"   ${worksrcpath}/Makefile
}

use_configure       no

build.target        cvs-fast-export