# -*- 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           python 1.0
PortGroup           github 1.0

github.setup        quodlibet mutagen 1.45.1 release-
github.tarball_from releases
name                py-mutagen
revision            0

categories-append   audio devel
platforms           darwin
supported_archs     noarch
license             GPL-2+
maintainers         nomaintainer

description         A Python module to handle audio metadata
long_description \
    Supports ASF, FLAC, M4A, Monkey's Audio, MP3, Musepack, Ogg FLAC, Ogg \
    Speex, Ogg Theora, Ogg Vorbis, True Audio, WavPack and OptimFROG audio \
    files. All versions of ID3v2 are supported, and all standard ID3v2.4 \
    frames are parsed. It can read Xing headers to accurately calculate the \
    bitrate and length of MP3s. ID3 and APEv2 tags can be edited regardless of \
    audio format. It can also manipulate Ogg streams on an individual \
    packet/page level.

homepage            https://mutagen.readthedocs.io

checksums           rmd160  e7294198f99abd384a42b94e91745eb01da6c19b \
                    sha256  6397602efb3c2d7baebd2166ed85731ae1c1d475abca22090b7141ff5034b3e1 \
                    size    1285455

python.versions     27 35 36 37 38 39

if {${subport} ne ${name}} {
    if {${python.version} == 27} {
        github.setup    quodlibet mutagen 1.43.1 release-
        github.tarball_from releases
        revision        0
        checksums       rmd160  fcac1fe459ef151c402ab48745a3336713da0a50 \
                        sha256  d873baeb7815311d3420aab0a1d83f050f628228cbc2d6045a14a16460411bc9 \
                        size    1151423
        }

    depends_lib-append \
                    port:py${python.version}-setuptools

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} COPYING NEWS \
            README.rst ${destroot}${docdir}
    }

    depends_test-append \
                    port:py${python.version}-hypothesis \
                    port:py${python.version}-pytest

    test.run        yes
    test.args       --no-quality

    livecheck.type  none
}
