# -*- 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                trackma
version             0.10.3
revision            1
categories-prepend  sysutils anime manga
platforms           any
license             GPL-3+
maintainers         nomaintainer
description         Open multi-site list manager
long_description    {*}${description} built with Python.
homepage            https://z411.github.io/trackma
checksums           rmd160  d7e9f864beb50b439199c8125b3298122aede55f \
                    sha256  905c806ce0ae09959b5add0bdf4e266fad07ba015b84ef1987728cf1f415690c \
                    size    239314
supported_archs     noarch

# Temporarily downgrade python version to support Qt GUI.
python.default_version  312

python.pep517_backend   poetry

patchfiles          pyqt4-compatibility.patch

depends_run-append  path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:py${python.version}-anitopy \
                    port:py${python.version}-cairo \
                    port:py${python.version}-gobject3 \
                    port:py${python.version}-jeepney \
                    port:py${python.version}-Pillow \
                    port:py${python.version}-pypresence \
                    port:py${python.version}-pyqt4 \
                    port:py${python.version}-requests \
                    port:py${python.version}-urwid

# FIXME: Qt GUI crashes on exit from the app. Does not impact functionality,
# but can be annoying. There are minor graphic artifacts with Qt when scrolling lists,
# at least when pyqt4 is built against qt4-mac-devel Cocoa port. The same issue
# has been observed with some other Qt4 ports like qgit.
notes "
The app provides CLI, TUI, GTK and Qt interfaces.\
GUI is launched via `trackma-gtk` or `trackma-qt` commands.
"
