# -*- 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                aniworld
version             4.8.6
revision            0
categories-prepend  www multimedia net anime
platforms           any
license             MIT
maintainers         {@barracuda156 macos-powerpc.org:barracuda} \
                    openmaintainer
description         AniWorld Downloader is a command-line tool for downloading \
                    and streaming anime, series and movies
long_description    {*}${description}
homepage            https://github.com/phoenixthrush/AniWorld-Downloader
checksums           rmd160  fb1345959c79c87fbd35626fae8c168a594071c9 \
                    sha256  563c5a57bcc4d40fabee114758f1e673c0d6cf1f90c5ef2491d236b2aee83fb3 \
                    size    1467174
supported_archs     noarch

# TODO: streaming was not working earlier (downloading is fine).
# https://github.com/phoenixthrush/AniWorld-Downloader/issues/200
# As of 4.8.6, streaming on modern macOS works again. PowerPC has to be checked.

# Related: https://github.com/phoenixthrush/AniWorld-Downloader/issues/201
patchfiles          patch-no-iina.diff

python.default_version  314

depends_lib-append  port:py${python.version}-authlib \
                    port:py${python.version}-certifi \
                    port:py${python.version}-cryptography \
                    port:py${python.version}-curl-cffi \
                    port:py${python.version}-fake-useragent \
                    port:py${python.version}-ffmpeg-python \
                    port:py${python.version}-flask \
                    port:py${python.version}-flask-wtf \
                    port:py${python.version}-niquests \
                    port:py${python.version}-npyscreen \
                    port:py${python.version}-packaging \
                    port:py${python.version}-patchright \
                    port:py${python.version}-python-dotenv \
                    port:py${python.version}-requests \
                    port:py${python.version}-rich \
                    port:py${python.version}-waitress

depends_run-append  path:bin/mpv:mpv

# https://github.com/phoenixthrush/AniWorld-Downloader/issues/146
notes "
This app must be used in a modern terminal emulator\;\
on legacy systems contour, mlterm(-minimal) or iTerm2 can be used.
"
