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

name                py-feedparser
version             6.0.11
revision            1

# remove next update
dist_subdir   ${name}/${version}_1

license             BSD
supported_archs     noarch
platforms           {darwin any}
maintainers         {khindenburg @kurthindenburg} openmaintainer

description         RSS and Atom parser
long_description    Universal Feed Parser is a Python module for downloading \
    and parsing syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, \
    Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom, \
    and CDF feeds.

homepage            https://pypi.python.org/pypi/${python.rootname}/

checksums           rmd160  64627d6e92f894a35f6c3073e6add86887c9f9c6 \
                    sha256  c9d0407b64c6f2a065d0ebb292c2b35c01050cc0dc33757461aaabdc4c4184d5 \
                    size    286197

python.versions     27 39 310 311 312 313

if {${name} ne ${subport}} {
    if {${python.version} eq 27} {
        version             5.2.1
        revision            1
        dist_subdir   ${name}/${version}_1

        checksums           rmd160  d48648b794bdd8af38e77b8337ac2241d79bca4c \
                            sha256  bd030652c2d08532c034c27fcd7c85868e7fa3cb2b17f230a44a6bbc92519bf9 \
                            size    252956


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

        depends_test-append port:py${python.version}-chardet
        test.run        yes
        python.test_framework
        test.cmd        ${python.bin} tests/runtests.py
    }

    post-destroot {
        xinstall -m 0644 -W ${worksrcpath} LICENSE README.rst \
            ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type  none
}
