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

github.setup        GitSquared edex-ui 2.2.8 v
github.tarball_from archive
revision            0

description         \
    Science fiction terminal emulator with advanced monitoring

long_description    \
    eDEX-UI is a fullscreen, cross-platform terminal emulator and system \
    monitor that looks and feels like a sci-fi computer interface.  Heavily \
    inspired from the TRON Legacy movie effects (especially the Board Room \
    sequence), the eDEX-UI project was originally meant to be a \"DEX-UI with \
    less « art » and more « distributable software »\". While keeping a \
    futuristic look and feel, it strives to maintain a certain level of \
    functionality and to be usable in real-life scenarios, with the larger \
    goal of bringing science-fiction UXs to the mainstream.

categories          sysutils shells
license             GPL-3
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  77d5d0596f973268b85bbbf728abaef9a43bdaf7 \
                    sha256  c6a8ef34890c028ee2a1e4c64485db29d4d0aedda0d63c0fc5f8572d45226b51 \
                    size    15611777

# Use legacysupport for 10.11 and earlier; needed for missing syscalls 'clock_gettime', etc.
legacysupport.newest_darwin_requires_legacy 15

depends_build       port:npm7 \
                    port:yarn

build.env-append    CSC_IDENTITY_AUTO_DISCOVERY=false

use_configure       no
use_xcode           yes

build {
    # Set up all JS dependencies
    system -W ${worksrcpath} "yarn --frozen-lockfile"

    # Build electron app
    system -W ${worksrcpath} "${build.env} yarn run build-darwin --dir"
}

destroot {
    copy \
        {*}[glob ${worksrcpath}/dist/*/eDEX-UI.app] \
        ${destroot}${applications_dir}
}

github.livecheck.regex {([0-9.]+)}
