# $Id: Portfile 84005 2011-09-14 23:03:46Z mww@macports.org $

PortSystem 1.0

name                compare
version             1.16
revision            2
categories          sysutils
platforms           darwin
maintainers         mww openmaintainer
license             GPL-2
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 \
                    rmd160  430f9fec01e5f9aefaa6d4a823b0ab1c693a0cdd \
                    sha256  1808bf1899fe1f50533b04173804a84149154830550aaa50d47d229fcd304fd0
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
}

