# -*- 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        browsh-org browsh 1.8.2 v
github.tarball_from releases
revision            0

homepage            https://www.brow.sh

description         ${name} is a fully-modern text-based browser

long_description    {*}${description}. It can render anything that a modern \
                    browser can: HTML5, CSS3, JS, video and even WebGL.

categories          www
installs_libs       no
license             LGPL-2.1
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

extract.mkdir       yes
use_configure       no

set distbase        ${name}_${version}_darwin_

checksums           ${distbase}arm64${extract.suffix} \
                    rmd160  bb7d84da5346e85785462a4845e1e55686368b1c \
                    sha256  b72c4109185c8ba20216bf5006d91c647873e1e51813e788ad4daf1739c44605 \
                    size    3531931 \
                    ${distbase}amd64${extract.suffix} \
                    rmd160  e0553d50e0372e78c4ae140c8993245c35f63962 \
                    sha256  ba12409221f292238cd0781b7d3f2fd9bb36453c5a7cbe7c3435e86add33a6cf \
                    size    3634043

if {${configure.build_arch} eq "arm64"} {
    set distarch "arm64"
} else {
    set distarch "amd64"
}

distname            ${distbase}${distarch}

build {}

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
}

notes "
If the firewall is enabled in macOS, explicit exceptions may need to be added for:

    - ${prefix}/bin/${name}
    - /Applications/Firefox.app

Refer to the Firewall section in System Preferences.
"