# -*- 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

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Razor2-Client-Agent 2.86 ../../authors/id/T/TO/TODDR
license             {Artistic-1 GPL}
categories-append   mail
maintainers         nomaintainer
description         Vipul's Razor is a distributed, collaborative, spam \
                    detection and filtering network.
long_description    ${description}

checksums           rmd160  9275640c4ff88077ae519ea886473c6698c18e0e \
                    sha256  5e062e02ebb65e24b708e7eefa5300c43d6f657bf20d08fec4ca8a0a3b94845f \
                    size    92637

platforms           darwin

if {${perl5.major} != ""} {
    depends_lib-append \
                    port:p${perl5.major}-digest-sha1 \
                    port:p${perl5.major}-getopt-long \
                    port:p${perl5.major}-time-hires \
                    port:p${perl5.major}-uri

    post-destroot {
        # move man files from a non-versioned directory to a versioned one
        # allows the subports to be installed in parallel without conflicts
        set man5_dir ${destroot}${prefix}/share/man/man5
        set versioned_man5_dir ${destroot}${prefix}/share/perl${perl5.major}/man/man5
        file mkdir ${versioned_man5_dir}
        foreach f [glob -tails -directory ${man5_dir} *] {
            move ${man5_dir}/$f ${versioned_man5_dir}/$f
        }
    }
}
