# -*- 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.4.2
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  64fd9a1211d51487168f357c8cfcc57fa154ba22 \
                    sha256  99550e15c50c2f8d79bd6fc285df04b21e629820577f4a8e28689f7d459b530d \
                    size    176654
supported_archs     noarch

# FIXME: streaming may not work (downloading works fine).
# https://github.com/phoenixthrush/AniWorld-Downloader/issues/200

# 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}-cryptography \
                    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 mlterm(-minimal) or iTerm2 can be used.
"
