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

github.setup        da-luce astroterm 1.2.0 v
github.tarball_from archive
revision            0

categories          science
license             MIT
maintainers         {@herbygillot gmail.com:herby.gillot} openmaintainer

description         A planetarium for your terminal
long_description    {*}${description}. ${name} renders stars, planets, \
                    constellations and more in the command line, for any \
                    date, time and location.

set bsc5_distfile   BSC5
master_sites-append http://tdc-www.harvard.edu/catalogs/:bsc5
distfiles-append    ${bsc5_distfile}:bsc5
extract.only        ${distname}${extract.suffix}

checksums           ${distname}${extract.suffix} \
                    rmd160  935774f47150c5a2736df31ac7f54769041336f7 \
                    sha256  10a98255a46517ee306be73f156eb78163aff8801f46b84a731f7b5913e1d6f5 \
                    size    20474692 \
                    ${bsc5_distfile} \
                    rmd160  ef1cc940f0d5adf0da125df6e2d994ed426d57fe \
                    sha256  e471d02eaf4eecb61c12f879a1cb6432ba9d7b68a9a8c5654a1eb42a0c8cc340 \
                    size    291548

# Upstream assumes the build directory is inside the source tree
patchfiles          patch-embed-path.diff

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:argtable3 \
                    port:ncurses

post-extract {
    copy ${distpath}/${bsc5_distfile} ${worksrcpath}/data/bsc5
}

test.run            yes
