# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 73572 2010-11-18 19:43:45Z ryandesign@macports.org $

PortSystem          1.0

name                pHash
version             0.9.3
categories          multimedia
platforms           darwin
maintainers         workisfun.ru:ivan
license             GPL-3

description         Perceptual hash library

long_description    Tool to build hash from multimedia files

homepage            http://phash.org/
master_sites        ${homepage}releases/

checksums           sha1    9bd19917263d9228aeb7a1f58e26b4b58c7e327a \
                    rmd160  d5b38e4957d7d7805c4609d9c5c42b3dc06c782d

depends_lib         port:ffmpeg \
                    port:jpeg \
                    port:libsndfile \
                    port:libsamplerate \
                    port:mpg123 \
                    port:CImg

# ffmpeg is not universal
universal_variant   no

patchfiles          patch-configure.ac.diff \
                    patch-src-ph_fft.h.diff

use_autoreconf      yes

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS \
        COPYING \
        ChangeLog \
        ${docdir}
}
