# $Id: Portfile 66174 2010-04-06 15:37:07Z kimuraw@macports.org $

PortSystem 1.0

name            lcov
version         1.8
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
platforms       darwin
master_sites    sourceforge:ltp
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}
		}
		# modify the location of etc/lcovrc
		reinplace "s|/etc/lcovrc|${prefix}/etc/lcovrc|" \
				${destroot}${prefix}/bin/gendesc \
				${destroot}${prefix}/bin/genhtml \
				${destroot}${prefix}/bin/geninfo \
				${destroot}${prefix}/bin/genpng \
				${destroot}${prefix}/bin/lcov
}
checksums      	md5 a909d9145111c6133c65b9dce007d7a1 \
				rmd160 cde9a5e5a4b1f6ca0330f2fd2afba00b4b8949b4 \
				sha1 9c8b7134658e7f9c70214ca578310a7c0e6135df

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

