# $Id$

PortSystem 1.0

name            lcov
version         1.12
categories      devel
maintainers     kimuraw openmaintainer
description     \
        LCOV is a graphical front-end for GCC's coverage testing tool gcov.
long_description \
        LCOV is a graphical front-end for GCC's coverage testing tool gcov. \
        It collects gcov data for multiple source files and creates HTML \
        pages containing the source code annotated with coverage information. \
        It also adds overview pages for easy navigation within the file \
        structure.

homepage        http://ltp.sourceforge.net/coverage/lcov.php
license         GPL-2+
platforms       darwin
supported_archs noarch
master_sites    sourceforge:ltp
depends_lib     port:perl5
patchfiles      patch-Makefile.diff \
                patch-bin-install.sh.diff
use_configure   no
build           {}
destroot.env    PREFIX=${destroot}${prefix}
post-destroot   {
        # install docs and examples
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
        xinstall -m 644 \
            ${worksrcpath}/README \
            ${worksrcpath}/CHANGES \
                ${destroot}${prefix}/share/doc/${name}
        foreach subdir { example example/methods } {
            xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/${subdir}
            eval xinstall -m 644 [glob -type f ${worksrcpath}/${subdir}/*] \
                ${destroot}${prefix}/share/doc/${name}/${subdir}
        }
        foreach cmd [glob ${destroot}${prefix}/bin/*] {
            reinplace "s|/usr/bin/perl|${prefix}/bin/perl5|" ${cmd}
            reinplace "s|/etc/lcovrc|${prefix}/etc/lcovrc|" ${cmd}
        }
}
checksums       md5     e497f9b77a93c6dda4e594cd8a67f634 \
                rmd160  f758ce5baad5c052b28a1209f15d9b4a2284a369 \
                sha1    7b1c53da770cba5bdc1ff7779162bc4c5dff0708 \
                sha256  b474e49c6c962754063b3be97a757a2ba9e7a455f0aea612863bf67e9b8b8ea7

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex {>lcov-(.*).tar.gz</a>}