# $Id: Portfile 276 2011-03-02 12:44:31Z kimuraw $

PortSystem		1.0
PortGroup		ruby 1.0

name			docdiff
version			0.4.0
platforms		darwin
categories		textproc
description		DocDiff compares two text files and shows the difference.
long_description	\
	DocDiff compares two text files and shows the difference. It can compare \
	files word by word, char by char, or line by line. It has several output \
	formats such as HTML, tty, Manued, or user-defined markup. \
	It supports several encodings and end-of-line characters, including \
	ASCII, UTF-8, EUC-JP, Shift_JIS, CR, LF, and CRLF.

homepage		http://docdiff.sourceforge.net/
master_sites	sourceforge
maintainers		kimuraw

depends_lib		port:ruby

destroot		{
	# command and ruby-libraies
	xinstall -m 755 ${worksrcpath}/docdiff.rb ${destroot}${prefix}/bin/docdiff
	reinplace "s|^#!.*ruby|#!${ruby.bin}|" ${destroot}${prefix}/bin/docdiff
	xinstall -d -m 755 ${destroot}${ruby.lib}
	file copy ${worksrcpath}/docdiff ${destroot}${ruby.lib}
	# documents and samples
	set docdir ${destroot}${prefix}/share/doc/${name}
	xinstall -d -m 755 ${docdir}
	eval xinstall -m 644 [glob ${worksrcpath}/*.html] ${docdir}
	xinstall -m 644 ${worksrcpath}/docdiff.conf.example ${docdir}
	file copy ${worksrcpath}/img ${docdir}
	file copy ${worksrcpath}/sample ${docdir}
	# web interface (experimetal?)
	xinstall -m 644 ${worksrcpath}/docdiffwebui.cgi ${docdir}
}

use_configure	no
build			{}
dist_subdir		${name}
checksums		md5 c9c7f559aa9c9c07c6ae342e579b4142 \
				sha1 aa26d988f9d96529ef912b27253cd36237d48163 \
				rmd160 cd473b3968be95ac2a58370589e8112561424ce0

