# -*- 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         MIME-tools 5.517 ../../authors/id/D/DS/DSKOLL
revision            0
license             {Artistic-1 GPL}
maintainers         nomaintainer
description         MIME-tools - modules for parsing (and creating!) MIME entities
long_description    {*}${description}

homepage            https://metacpan.org/release/${perl5.module}

platforms           {darwin any}
supported_archs     noarch

checksums           rmd160  2bbcbf52a210566e626af6d29a7560788c1190fd \
                    sha256  e05f8e45d0895164b1fe53a0a8e725dd81e92191a29409e1b48c55f823b03483 \
                    size    425046

if {${perl5.major} != ""} {
    depends_build-append \
                    port:p${perl5.major}-test-deep

    depends_lib-append \
                    port:p${perl5.major}-convert-binhex \
                    port:p${perl5.major}-file-temp \
                    port:p${perl5.major}-io-stringy \
                    port:p${perl5.major}-mailtools

    patchfiles      patch-lib-MIME-Parser.pm.nobinhex.diff \
                    patch-lib-MIME-Parser.pm.useContentTypeName.diff \
                    patch-lib-MIME-Parser.pm.uu_whine.diff

    variant doBinHex description {use the (buggy) internal binhex decoder} {
        patchfiles-delete   patch-lib-MIME-Parser.pm.nobinhex.diff
    }

    variant allow_no_trailing_boundary description {parse MIME messages without a trailing boundary rather than consider them to be an error} {
        patchfiles-append   patch-lib-MIME-Parser.pm.allow_no_trailing_boundary.diff
    }
}
