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

github.setup            ggerganov hnterm 9d09b1764f129f61b3a8ef7a6de55c23777f36c2
version                 0.4-20240808
revision                0
categories              www news
license                 MIT
maintainers             {@barracuda156 macos-powerpc.org:barracuda} openmaintainer

description             Hacker News in the terminal
long_description        {*}${description}
homepage                https://hnterm.ggerganov.com

fetch.type              git

post-fetch {
    system -W ${worksrcpath} "git submodule update --init --recursive"
}

depends_lib-append      port:curl

# Use the new C++ ABI.
compiler.blacklist-append \
                        *gcc-4.* {clang < 500}
# compiler.cxx_standard   2017

# It uses custom libs but does not install those.
# Go with the default static build for now.
configure.args-append   -DBUILD_SHARED_LIBS=0

# https://github.com/ggerganov/hnterm/issues/17
notes "
Launch the app as `TERM=xterm-256color ${name}` in contour, mlterm(-minimal) or iTerm2,\
otherwise it may not display content correctly.
"
