# $Id: Portfile 83385 2011-08-31 01:52:26Z dports@macports.org $

PortSystem 1.0

name            c2html
version         1.1.0
categories      textproc
maintainers     toby
description     c2html converts C source files to highlighted html
long_description \
	c2html is a program which converts C source files to \
	highlighted html files. The produced file can be used for \
	creating technical manuals. A highlighted source code listing \
	is usually much easier to read.
homepage        http://c2html.sourceforge.net/
platforms       darwin
license         GPL-2

master_sites    sourceforge
distname        ${name}_${version}
checksums       md5 819e263c4b8712ac1b7026ae8fc88d29 \
                sha1 bc9fe51875ec5d1b517f318c47429fdd00de18ee \
                rmd160 d00543035f753f7f5edb67d275cc0b6f62cc04ac

worksrcdir      ${name}

patchfiles      patch-Makefile patch-makefile.default \
                patch-check_begin.c patch-error.c

configure {
	reinplace "s|__CC__|${configure.cc}|" ${worksrcpath}/Makefile
	reinplace "s|__CFLAGS__|${configure.cflags}|" ${worksrcpath}/Makefile
	reinplace "s|__LDFLAGS__|${configure.ldflags}|" ${worksrcpath}/makefile.default
}

destroot {
	xinstall -m 755 ${worksrcpath}/c2html ${destroot}${prefix}/bin
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 "${worksrcpath}/User manual.pdf" \
		${destroot}${prefix}/share/doc/${name}
}

livecheck.regex ${name} ${name} (\.*) released
