# -*- 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

github.setup        samunderSingh12 look-out 6c6bee5d72a164be728e1972b5fe4f8de53047fa
version             2025.05.06
revision            0
categories          devel
platforms           any
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             BSD

description         Terminal User Interface (TUI) for interacting with GitHub
long_description    {*}${description}

checksums           rmd160  76f245709b111c79869ebd4a97c4ec5e285f346e \
                    sha256  fc9ba7504029a4f81a7767a30a8e8247168cdca4f23cbf89e61aeb63cf6dad1e \
                    size    181027
github.tarball_from archive
supported_archs     noarch

patchfiles          patch-look_out.py.diff

set py_ver          3.13
set py_ver_nodot    [string map {. {}} ${py_ver}]
set sharedir        ${prefix}/share/${name}

post-patch {
    reinplace "s|@PYTHON@|${prefix}/bin/python${py_ver}|" ${worksrcpath}/look_out.py
    reinplace "s|@SHAREDIR@|${sharedir}|" ${worksrcpath}/look_out.py
}

depends_run-append  path:bin/git:git \
                    port:python${py_ver_nodot} \
                    port:py${py_ver_nodot}-python-dotenv \
                    port:py${py_ver_nodot}-requests \
                    port:py${py_ver_nodot}-textual

use_configure       no
build               { }

destroot {
    xinstall -m 0755 ${worksrcpath}/look_out.py ${destroot}${prefix}/bin/${name}
    xinstall -d ${destroot}${sharedir}
    copy ${worksrcpath}/github_activity.css ${destroot}${sharedir}
}
