# $Id: Portfile 83385 2011-08-31 01:52:26Z dports@macports.org $

PortSystem          1.0

name                cfv
version             1.18.3
revision            2
categories          security
maintainers         perry openmaintainer
platforms           darwin
supported_archs     noarch

description         cfv is a utility to both test and create .sfv, .csv, \
                    .crc, .md5(sfv-like), md5sum, bsd md5, sha1sum, and \
                    .torrent files.
long_description    ${description} These files are commonly used to ensure \
                    the correct retrieval or storage of data.
license             GPL-2
homepage            http://cfv.sourceforge.net/

livecheck.regex     {cfv-(.+)\.tar\.gz}
livecheck.type      regex
livecheck.url       ${homepage}

master_sites        sourceforge

checksums           rmd160 d239e5fe212b2458f5a3612b55591c7625a2318d

patchfiles          patch-Makefile.diff patch-cfv.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/Makefile
}

use_configure       no

build               {}

if {![variant_isset python27] && ![variant_isset python32]} {
    default_variants    +python27
}

variant python27 conflicts python32 description {Use Python 2.7} {
    depends_lib port:python27

    post-patch {
        reinplace "s|@PYTHON@|${prefix}/bin/python2.7|" ${worksrcpath}/Makefile ${worksrcpath}/cfv
    }
}

variant python32 conflicts python27 description {Use Python 3.2} {
    depends_lib port:python32

    post-patch {
        reinplace "s|@PYTHON@|${prefix}/bin/python3.2|" ${worksrcpath}/Makefile ${worksrcpath}/cfv
    }
}
