# $Id: Portfile 67108 2010-04-29 07:37:43Z mww@macports.org $

PortSystem 1.0

name			compare
version			1.16
revision		2
categories		sysutils
platforms		darwin
maintainers		mww openmaintainer
license             GPLv2
description		fast replacement for cmp
long_description	compare is similar to cmp but faster and with better \
				readable output. compare examines one file and standard in, or \
				two files on a byte by byte basis, and prints the file \
				position of the first difference it finds, first in decimal \
				and then in hexadecimal, followed by the differing byte \
				content in hexadecimal and a quoted character.

homepage		ftp://ftp.berlios.de/pub/compare/
master_sites	${homepage}
checksums		md5 b4fdc2ad3c07e6df23cfe02e923bd775 \
				sha1 0e76cfa606ecb358c693f160ad56b820545922b5
patchfiles		patch-RULES-rules.prg patch-compare-compare.1.diff patch-compare-compare.c.diff

depends_build	port:smake

use_configure	no
use_parallel_build no

build.cmd		${prefix}/bin/smake
build.target

destroot.destdir	INS_BASE=${destroot}${prefix} \
				MANDIR=share/man
post-destroot {
    file delete -force ${destroot}${prefix}/share/man/man5 \
        ${destroot}${prefix}/lib ${destroot}${prefix}/include
    file rename ${destroot}${prefix}/bin/compare \
        ${destroot}${prefix}/bin/scompare
    file rename ${destroot}${prefix}/share/man/man1/compare.1 \
        ${destroot}${prefix}/share/man/man1/scompare.1
}

