# -*- 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.0
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  119540b852569af447ca5149eae4d8e9c725e301 \
                    sha256  7445b89a7deb5302d776ad4c067f257f9e80fd9183126728f5b9b9b0d107304d \
                    size    173032
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.
"
