# -*- 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           github 1.0
PortGroup           legacysupport 1.1
PortGroup           meson 1.0

# getline
legacysupport.newest_darwin_requires_legacy 10

github.setup        zsugabubus aria2t 5666e9bbe0ea5eebf0f2acfef06217c2fa1206b4
version             20240911
revision            0
categories-prepend  net
license             GPL-3
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         TUI for aria2c(1)
long_description    ${name}
checksums           rmd160  d8d2ef7b64bb2d0ce6b4f976b5d525f5898ad3e5 \
                    sha256  47d1edf78ca02c069e899b91da46cd4fce4f815178c4344025755ba0bb8a041e \
                    size    51344
github.tarball_from archive
github.livecheck.branch devel

compiler.c_standard 2011

# https://github.com/zsugabubus/aria2t/issues/7
patchfiles-append   0001-Fix-MacOS.patch \
                    0002-Replace-ncursesw-with-ncurses.patch \
                    0003-Replace-sed-with-gsed.patch
# https://github.com/zsugabubus/aria2t/pull/8
patchfiles-append   0004-Add-macOS-specific-headers.patch \
                    0005-Add-a-fallback-for-ppoll-for-macOS.patch \
                    0006-Fix-getxattr-for-macOS.patch

depends_build-append \
                    port:gperf \
                    port:gsed \
                    path:bin/pkg-config:pkgconfig
depends_lib-append  port:ncurses
depends_run-append  port:aria2
