# -*- 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-pyxdg
version             0.28
revision            0

license             LGPL-2
categories-append   textproc
maintainers         {aronnax @lpsinger} openmaintainer
supported_archs     noarch
platforms           {darwin any}

description         Python module implementing various freedesktop.org standards
long_description    \
    PyXDG is a python library to access freedesktop.org standards. Currently \
    supported standards are: \
    \
    *   Base Directory Specification Version 0.6 \
    *   Menu Specification Version 1.0 \
    *   Desktop Entry Specification Version 1.0 \
    *   Icon Theme Specification Version 0.8 \
    *   Recent File Spec 0.2 \
    *   Shared-MIME-Database Specification 0.13

homepage            https://freedesktop.org/wiki/Software/pyxdg

checksums           sha256  3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4 \
                    rmd160  83e3915cd88675d3a254917a5c00d74bf60fec25 \
                    size    77776

python.versions     310 311 312 313 314

conflicts           py-xdg

if {${name} ne ${subport}} {
    conflicts               py${python.version}-xdg
}

# deactivate hack to have a smooth transition from the py-xdg to py-pyxdg port
pre-activate {
    if {![catch {set installed [lindex [registry_active py${python.version}-xdg] 0]}]} {
        set _version [lindex $installed 1]
        if {[vercmp $_version ${version}] <= 0} {
            registry_deactivate_composite py${python.version}-xdg "" [list ports_nodepcheck 1]
        }
    }
}
