# -*- 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-pync
version             2.0.3
revision            0

categories-append   aqua
supported_archs     noarch
platforms           {darwin any}
license             MIT
# Except for 'Terminal.icns', which is a copy of Apple's Terminal.app icon and as such is copyright of Apple.
# But we delete the vendor/ dir, so we should be just MIT licensed.
maintainers         nomaintainer

description         A simple Python wrapper around the terminal-notifier command-line tool.
long_description    {*}${description} It allows you to send User Notifications to \
                    the Notification Center on OS X 10.8 or higher.

homepage            https://github.com/setem/pync

checksums           rmd160  efa14da3e3618fe70a0d1a74cc83a45835e84db2 \
                    sha256  38b9e61735a3161f9211a5773c5f5ea698f36af4ff7f77fa03e8d1ff0caa117f \
                    size    374289

python.versions     310 311 312 313

if {${subport} ne ${name}} {
    depends_run-append \
                    port:py${python.version}-dateutil \
                    port:terminal-notifier


    patchfiles      pync_TerminalNotifier.py.diff \
                    setup.py.diff

    post-extract {
        delete ${worksrcpath}/pync/vendor
    }

    post-patch {
        reinplace "s|__PREFIX__|${prefix}|" pync/TerminalNotifier.py
    }
}
