# $Id: Portfile 37000 2008-05-22 17:02:35Z simon@macports.org $

PortSystem          1.0

name                xxdiff
version             3.2
categories          devel
platforms           darwin
maintainers         simon openmaintainer
description         xxdiff is a graphical merging tool
long_description    xxdiff is a graphical browser for viewing the \
                    differences between two or three files, or between two \
                    directories, and can be used to produce a merged version.

homepage            http://furius.ca/xxdiff/
master_sites        sourceforge
checksums           md5 301ff399a1e4be8b68c38c3e27c0b1ad \
                    sha1 ab2848fd9279f55b5db270f319ad4791154ecf82 \
                    rmd160 12e7527f39713b925f05b687c2ad8b60459bb670
use_bzip2           yes

depends_lib         port:bison \
                    port:flex \
                    port:qt3

use_configure       no

build {
    # Build xxdiff with qmake.
    system "cd ${worksrcpath}/src; make -f Makefile.bootstrap makefile QTDIR=${prefix}"
    system "cd ${worksrcpath}/src; make QTDIR=${prefix}"
}

destroot {
    # Destroot xxdiff.
    xinstall ${worksrcpath}/bin/xxdiff   ${destroot}${prefix}/bin
    xinstall ${worksrcpath}/src/xxdiff.1 ${destroot}${prefix}/share/man/man1
    # Destroot xxdiff documentation.
    xinstall -d ${destroot}${prefix}/share/doc
    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
    file delete ${destroot}${prefix}/share/doc/${name}/Makefile
    file delete ${destroot}${prefix}/share/doc/${name}/xxdiff-scripts.txt
    file delete ${destroot}${prefix}/share/doc/${name}/xxdiff-scripts.html
}
