# -*- 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.6.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  fb0d70906d61b976d4d2f83766996f6f9240eaa2 \
                    sha256  517c7626b7c1ea26c01c594540f6c08210e3424dde871317b722e4772d1bd0f3 \
                    size    197218
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.
"
