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

go.setup            github.com/xxxserxxx/gotop 4.2.0 v
# Delete this on next update to use golang PortGroup's default ('archive')
github.tarball_from tarball
revision            1
categories          sysutils
platforms           darwin
license             MIT
maintainers         {i0ntempest @i0ntempest} openmaintainer
description         Another terminal based graphical activity monitor, inspired by gtop and vtop, this time written in Go!
long_description    gotop is a terminal-based (TUI) system monitor for Linux and macOS. \
                    The software is inspired by gtop and vtop, but while these 2 utilities \
                    use Node.js, gotop is written in Go.

checksums           ${distname}${extract.suffix} \
                        rmd160  c4b4b05e99aa4e32afd639c5e4cbcf664dd167e5 \
                        sha256  76d32283d5b6401e792980dedc1a79de68af6d1dcc74c114da40722af1424a72 \
                        size    1204834

go.vendors          howett.net/plist \
                        repo    github.com/DHowett/go-plist \
                        lock    v1.0.0 \
                        rmd160  5566fa84f55c7c4fba17982afcdd00567e453266 \
                        sha256  881f9c6bcb814fdfe2d51da53f75ffd28bd9d2149c9c7cc1e783bc5a54c9f9e8 \
                        size    52994 \
                    gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208 \
                    gopkg.in/yaml.v2 \
                        lock    v2.4.0 \
                        rmd160  66e9feb7944b3804efa63155ed9b618717b8955c \
                        sha256  72812077e7f20278003de6ab0d85053d89131d64c443f39115a022114fd032b6 \
                        size    73231 \
                    gopkg.in/tomb.v1 \
                        lock    dd632973f1e7 \
                        rmd160  ae07f5ddbbc6afc772d6dc5273bb72eaba50529a \
                        sha256  91c562a4e31c89d13e5391143ff653231fc2d80562743db89ce2172ad8f81008 \
                        size    3636 \
                    gopkg.in/check.v1 \
                        lock    788fd7840127 \
                        rmd160  b63165c8909a27edc15dda210df66a1b49efb49e \
                        sha256  7e5547c6471cc48da89a7c87f965b20ca5311f43fc4d883ca62f9fccf7551630 \
                        size    31597 \
                    golang.org/x/xerrors \
                        lock    5ec99f83aff1 \
                        rmd160  6e8267f353e153297f205e4be219236d6ae43880 \
                        sha256  9a500a49d83a09e7de6c71b215d1c14b81e315d26884530ef327c95ddf1f2d28 \
                        size    13667 \
                    golang.org/x/text \
                        lock    v0.3.6 \
                        rmd160  e3da48fcc60d98e202458228188bf6dac408e309 \
                        sha256  6b2d69df22b5ba1634bc6730c3f03404db499536a96c48b8016da80ced804450 \
                        size    8356058 \
                    golang.org/x/sys \
                        lock    7b5979e65e41 \
                        rmd160  85112744d84b080421dfa3f481eb33e1368fa051 \
                        sha256  e138b74f9fa43992055b0e36de6eb29be89c4550b8385c5dcf168cc32c1dd624 \
                        size    1357855 \
                    golang.org/x/net \
                        lock    69e39bad7dc2 \
                        rmd160  722be2fbb86549a951d74beb4d35f882de120354 \
                        sha256  f66db35109dbd76aac9039afbcbe891513580ff8edf986d1ed8773bcc0511d49 \
                        size    1263978 \
                    golang.org/x/crypto \
                        lock    c86fa9a7ed90 \
                        rmd160  d10541162293e950d1c79f5b0cff231d0158b53c \
                        sha256  d97beb5e040b73b1997e0c9b34e1fa78bbbca789f17cfdfb52e3d25c880112bb \
                        size    1631830 \
                    github.com/xxxserxxx/lingo \
                        lock    v2.0.1 \
                        rmd160  d837c890c5b3bccc03f1fd2b2db5dc8cbe483668 \
                        sha256  973278e51b6256e6b36afea146cb6b559f20eee8de16c84332e71bc645e23ef1 \
                        size    6297 \
                    github.com/valyala/histogram \
                        lock    v1.2.0 \
                        rmd160  a592c9b7a389a97c1a34ee002d0d52140592355a \
                        sha256  7d0fa285708f0a23eacb59897c9675c5d33e9fbe301c6311242176225db82c0a \
                        size    4518 \
                    github.com/valyala/fastrand \
                        lock    v1.1.0 \
                        rmd160  15667a2f60fe31aef28266810a568165189a5cd1 \
                        sha256  b7895c6fd739bbfcb4c3e4ea9d7a9556684248f05e6048a467f4d557208f7747 \
                        size    3413 \
                    github.com/tmc/scp \
                        lock    f7b48647feef \
                        rmd160  f7007e617e3c4113a4711b7c80ee2e7dc283bd07 \
                        sha256  ebdfa72702744d344689c4b0008f2dc797ac5e91fe8df006074acf36f2bf072e \
                        size    1918 \
                    github.com/stretchr/testify \
                        lock    v1.8.0 \
                        rmd160  5c390a4b7ea60de6cf9f69ece1cfc664e52c52b7 \
                        sha256  9b51f07d72fd2d88a76cd89fb8863fc69812e364d28d0a97f6eacf9cd974c71d \
                        size    97622 \
                    github.com/shirou/gopsutil \
                        lock    v3.20.12 \
                        rmd160  036bdadf313eb8e4bc569d94a77e088a04f02947 \
                        sha256  8ba9603049a0cb4b399a211e2c12a88130e47d02e7564a2275d82c57eed1520f \
                        size    285558 \
                    github.com/shibukawa/configdir \
                        lock    e180dbdc8da0 \
                        rmd160  7d98ef23d1f5664c935ba332a439f6bf1c11885b \
                        sha256  232e87909860090ce5a95f2efd7afc72d18fd4dbffa0d464e48ea8cfca4255a4 \
                        size    3786 \
                    github.com/rivo/uniseg \
                        lock    v0.2.0 \
                        rmd160  33577def583aa2db50b69ca601e5d29ab201ebc4 \
                        sha256  2832965221246272462a03ffc8e159c94d8f534827f660f1ac4fc77e5ccd644c \
                        size    44037 \
                    github.com/pmezard/go-difflib \
                        lock    v1.0.0 \
                        rmd160  fc879bfbdef9e3ff50844def58404e2b5a613ab8 \
                        sha256  7cd492737641847266115f3060489a67f63581e521a8ec51efbc280c33fc991f \
                        size    11409 \
                    github.com/pkg/errors \
                        lock    v0.9.1 \
                        rmd160  dc065c655f8a24c6519b58f9d1202eb266ecda40 \
                        sha256  208d21a7da574026f68a8c9818fa7c6ede1b514ef9e72dc733b496ddcb7792a6 \
                        size    13422 \
                    github.com/onsi/gomega \
                        lock    v1.10.4 \
                        rmd160  e7963f5d46a36ae11174ebb91f0704b0db537b22 \
                        sha256  3963ae0e35d301b287e28e7474b7002179fbeb2bab64b5fd3359bfa1b719c46d \
                        size    98265 \
                    github.com/onsi/ginkgo \
                        lock    v1.14.2 \
                        rmd160  fcccc4fac43f406120ef2f73359e74e542e59943 \
                        sha256  ff4996addbeb612b2ac4eba07906df61f8f0a02702148eca8669363f66e5628f \
                        size    146957 \
                    github.com/nxadm/tail \
                        lock    v1.4.4 \
                        rmd160  33d7373bd1b164159b9032fc8595bb09b25598f6 \
                        sha256  16d8773e0be69469d3c296ee785bbef433c3442defb68760682cdbcf80ba40ee \
                        size    1238830 \
                    github.com/nsf/termbox-go \
                        lock    v1.1.1 \
                        rmd160  a46d55da1ac925e14c15196db1e18707c52938bb \
                        sha256  1c32821967f105bf1a4a475bbfb53f5301d5d1746ff85a69e83d4c2d2307cbf4 \
                        size    37573 \
                    github.com/mitchellh/go-wordwrap \
                        lock    v1.0.1 \
                        rmd160  aabcb6578a2dcdfc425e66174663b2ef483998ed \
                        sha256  32c15ef99c4288a9ea02387eb6cd79718da19c5b780590913990b1091827628f \
                        size    2928 \
                    github.com/mitchellh/go-homedir \
                        lock    v1.1.0 \
                        rmd160  44b3985e40e5bbb22d11f8622c340f9ed727ea91 \
                        sha256  024c8a57316c7fbc0eb23cdbfd57f72a74b51beb83d714034d67ee9aba48100c \
                        size    3366 \
                    github.com/mattn/go-runewidth \
                        lock    v0.0.13 \
                        rmd160  e177edb4dc4702ae2b23704934ff31cc6561bbd0 \
                        sha256  dcd3ccbd956a6f53bc106b79489d0303a237c21d858d23250e3e1d7284b72b86 \
                        size    17363 \
                    github.com/kr/text \
                        lock    v0.1.0 \
                        rmd160  0b3c78459e227170a3b80a0103d87a3eef77ed88 \
                        sha256  5ed970aad0da3cba3cffacdb4d154a162a8968655ee6d6f7b627e71b869efaf6 \
                        size    8691 \
                    github.com/kr/pretty \
                        lock    v0.1.0 \
                        rmd160  9aa7a5aad4c48840eecfd0f80186d1fb5ded0fd6 \
                        sha256  f6c3f89667c63e5b7f1fc6ee2c06b6a6bfdce88f3a965ccd395b64c6f95c9a47 \
                        size    8553 \
                    github.com/kballard/go-shellquote \
                        lock    95032a82bc51 \
                        rmd160  40415cd59ece9fb38b22170feec07f1f48d518a2 \
                        sha256  41aa42696f96fb2783c5135d71ff1ec5938dfe178b51eb703e509c8ac0e7db4e \
                        size    4335 \
                    github.com/jaypipes/pcidb \
                        lock    v1.0.0 \
                        rmd160  1ceec2b4986f35eb3d9bf8a20af63c71c3c21e95 \
                        sha256  e3e28a379b8cd40feaf71b25454f437d9a526912624ad427f62a47283b4400eb \
                        size    15470 \
                    github.com/jaypipes/ghw \
                        lock    v0.9.0 \
                        rmd160  8d2b6ba9446e0ac044208ef11845ee9ec4ffb70a \
                        sha256  9f482f1b1fa66c63e9d15830cc2ce56d6f994a5f6bcb98b2635af8a9c97c2952 \
                        size    167689 \
                    github.com/go-ole/go-ole \
                        lock    v1.2.6 \
                        rmd160  70350a72faa92597facb55379e481ea049bb57da \
                        sha256  d818d3dab064c4f8f2be9460353318207f58d562f874d06c0bff91cd423dc2af \
                        size    52614 \
                    github.com/gizak/termui \
                        lock    v3.1.0 \
                        rmd160  f1be2950d4a743e6584c28a5e099c1b33efb53dd \
                        sha256  5e1ae80e56b28bd92d6fad83371235ab3b1761f5023ec80c2cbc90f9de02d461 \
                        size    185693 \
                    github.com/ghodss/yaml \
                        lock    v1.0.0 \
                        rmd160  b5ddb70fac3e20547f19f24002cc32f206242207 \
                        sha256  d4bd43ce9348fc1b52af3b7de7a8e62a30d5a02d9137319f312cd95380014f6e \
                        size    11774 \
                    github.com/fsnotify/fsnotify \
                        lock    v1.4.9 \
                        rmd160  4660b5721da8aea4c890786e49d7cec39c2e04d3 \
                        sha256  7920cf1e5ccf268962fcff0b501398ed6c28ed75b1e1281fb17b19a8b0e4db5c \
                        size    31910 \
                    github.com/droundy/goopt \
                        lock    48d6390ad4d1 \
                        rmd160  cc649da0aebcacaf41386e5b8727371791cff936 \
                        sha256  46821a9f8bed20176542a8bd82d49dcb1c00fe08d99d1dbca69471fb5500b09a \
                        size    11601 \
                    github.com/distatus/battery \
                        lock    v0.10.0 \
                        rmd160  d65953e05b0333e59bfb92fae80c60eedaa7395f \
                        sha256  f9e9fd439ec5fb9374fa1c241bcb033a67318067359f52bdda74809bc2816cf8 \
                        size    14629 \
                    github.com/davecgh/go-spew \
                        lock    v1.1.1 \
                        rmd160  7c02883aa81f81aca14e13a27fdca9e7fbc136f7 \
                        sha256  e85d6afa83e64962e0d63dd4812971eccf2b9b5445eda93f46a4406f0c177d5f \
                        size    42171 \
                    github.com/cloudfoundry-attic/jibber_jabber \
                        lock    bcc4c8345a21 \
                        rmd160  8c8c1f92d4c90385efa67367147bf14430b8ba33 \
                        sha256  953bc3c56f895a45448a2b5655ef394bf8f699a638498889bab890c9efa4c426 \
                        size    7374 \
                    github.com/anatol/vmtest \
                        lock    7a42f1f6d7b8 \
                        rmd160  30c02dc847df1826b4a4a302e776e4162e612fab \
                        sha256  e58ff0f3bfc51278f68b39afb2ab6305f76ab3a8f30c58b1bf56cc80c00b25ed \
                        size    11631 \
                    github.com/anatol/smart.go \
                        lock    c0b00d90f8cc \
                        rmd160  20f4369c887e6e3dfbc295852c764bb25a26ce69 \
                        sha256  e601daf35cdbf6d8a3eb188c55d92f49326bed1ab7070ce755cbb23b3e3810a0 \
                        size    64972 \
                    github.com/VividCortex/ewma \
                        lock    v1.2.0 \
                        rmd160  1d2cef6a9d902902ce305b922b0e8e53a3527860 \
                        sha256  1b2d004974f53c07d0cf960cf663d8b1264750f6636cdd7288b6d3875bf50bc6 \
                        size    6693 \
                    github.com/VictoriaMetrics/metrics \
                        lock    v1.18.1 \
                        rmd160  94932932021fd144216c97820ffcc18d360fdf18 \
                        sha256  b6d253544a924891bbac7f567751f19a0915ad59ba22f61d41b2bb5f4724cbd0 \
                        size    25964 \
                    github.com/StackExchange/wmi \
                        lock    v1.2.1 \
                        rmd160  f02f859c7021ddd8422f78793d3e3001c85565d2 \
                        sha256  e1d463fd14dd07f40914b7ce14cfa4d453fec5292601fea27af24e2bb8bb470c \
                        size    12455 \
                    github.com/BurntSushi/toml \
                        lock    v1.1.0 \
                        rmd160  e57f2698bc9ef3ce4e207ee5b59196a22b9e1783 \
                        sha256  3c28e768873191e22aec847c4c2bea6a590ba8b046b2ecd792591bfa830f9987 \
                        size    91869

# Notes for updating this port:
# Remove entry for github.com/cloudfoundry/jibber_jabber (conflicts with cloudfoundry-attic/jibber_jabber)

post-patch {
    reinplace "s|{\"/Library/Application Support\"}|{\"${prefix}/etc\"}|" ${gopath}/src/github.com/shibukawa/configdir/config_darwin.go
    reinplace "s|os.Getenv(\"HOME\") + \"/Library/Application Support\"|os.Getenv(\"HOME\") + \"/.config\"|" ${gopath}/src/github.com/shibukawa/configdir/config_darwin.go
    reinplace "s|/Library/Caches|/.cache|" ${gopath}/src/github.com/shibukawa/configdir/config_darwin.go
}

set time [clock format [clock seconds] -format %Y%m%dT%H%M%S]
build.args-append   -ldflags=\"-X 'main.Version=v${version}' -X 'main.BuildDate=${time}'\" -o ./gotop ./cmd/gotop

destroot {
    xinstall -m 755 ${worksrcpath}/gotop ${destroot}${prefix}/bin
    system -W ${worksrcpath} "./gotop --create-manpage > ./gotop.8"
    xinstall -m 444 ${worksrcpath}/gotop.8 ${destroot}${prefix}/share/man/man8
    file mkdir ${destroot}${prefix}/etc/gotop
    xinstall -m 644 -W ${worksrcpath} build/gotop.conf layouts/disk layouts/htop ${destroot}${prefix}/etc/gotop
}
