# -*- 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                viewvc
version             1.1.24
categories          devel www
maintainers         khindenburg openmaintainer

description         Browser interface for CVS and Subversion
long_description    \
    ViewVC is a browser interface for CVS and Subversion version control \
    repositories. It generates templatized HTML to present navigable \
    directory, revision, and change log listings. It can display specific \
    versions of files as well as diffs between those versions. Basically, \
    ViewVC provides the bulk of the report-like functionality you expect \
    out of your version control tool, but much more prettily than the \
    average textual command-line program output.

homepage            http://www.viewvc.org
platforms           darwin
supported_archs     noarch
license             BSD
master_sites        http://viewvc.tigris.org/files/documents/3330/49471/

patchfiles          patch-viewvc-install.diff

checksums           rmd160  f54549b82e6959cf1088c244e90c2688f27ee2a7 \
                    sha256  0620f69fa5ba02ac65e000586ba31015a2053a82711bedb30629fd6087003d7e

# Per website, this doesn't work with any python3
depends_lib         port:python27

post-patch {
    reinplace "s|/usr/bin/env python|${prefix}/bin/python2.7|" ${worksrcpath}/viewvc-install
}

use_configure       no

build               {}

destroot.cmd        ./viewvc-install --prefix=${prefix}/share/${name} --destdir=${destroot} --clean-mode=true


variant cvs description {Enable cvs repositories} {
    depends_lib-append  port:cvs \
                        port:rcs
}
variant subversion description {Enable subversion repositories} {
    depends_lib-append  port:py27-pysvn \
                        port:subversion-python27bindings
}

default_variants +cvs +subversion

notes "
If this is a fresh install, read\
http://viewvc.tigris.org/source/browse/*checkout*/viewvc/trunk/INSTALL\
otherwise http://viewvc.tigris.org/source/browse/*checkout*/viewvc/trunk/docs/upgrading-howto.html\

Copy ${prefix}/share/viewvc/viewvc.conf.dist to ${prefix}/share/viewvc.conf\
and then edit it.\
It may be easiest to use ${prefix}/share/viewvc/bin/standalone.py to test the setup.
"

livecheck.url       http://viewvc.tigris.org/servlets/ProjectDocumentList?folderID=6004