# -*- 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/elves/elvish 0.21.0 v
go.package          src.elv.sh
revision            0

homepage            https://elv.sh

description         Elvish = Expressive Programming Language + Versatile \
                    Interactive Shell

long_description    Elvish is a friendly interactive shell and an expressive \
                    programming language. It runs on Linux, BSDs, macOS and \
                    Windows.

categories          shells
installs_libs       no
license             BSD
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

build.cmd           make
build.target        get

use_parallel_build  no

variant plugin_support description {Enable experimental plugin support} {
    # elvish implements plugins using Cgo. Enabling plugin support will
    # build elvish with Cgo enabled, but when built this way, elvish
    # will no longer be marked as being a reproducible build.
    build.args-append   ELVISH_PLUGIN_SUPPORT=1
}

post-patch {
    # The Makefile tries to call `git rev-parse` to determine the
    # VersionSuffix.  Since this is not a checked-out git repository, doing
    # that will fail.  Patch the Makefile to manually set the VersionSuffix:
    reinplace -E {s|.VersionSuffix=.*|.VersionSuffix=-dev.macports\ \\|} \
        ${worksrcpath}/Makefile
}

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

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

checksums           ${distname}${extract.suffix} \
                        rmd160  db867382724a858ef4519ab6486a3e97326063d2 \
                        sha256  3a4b93c3c99fe2f9847de35d64be24e2d4b9c12d429cd9831b4571993a66bb7a \
                        size    958170

go.vendors          pkg.nimblebun.works/go-lsp \
                        repo    github.com/nimblebun/go-lsp \
                        lock    v1.1.0 \
                        rmd160  571718b88095c21f77239e5b7bb08afc5b5aec5e \
                        sha256  33d0132a8cbe9d0903215172acdbf95ffb410a506379a0c9ae9eda4858e53800 \
                        size    34097 \
                    gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208 \
                    golang.org/x/sys \
                        lock    v0.17.0 \
                        rmd160  bc96655eb5e0e6a21c3c7faf4197a25b5e974f53 \
                        sha256  5f94836d82aa1bbb99219d62a5a379b2b36f62dd8ea59207dcbb86b35eae5b1d \
                        size    1446795 \
                    golang.org/x/sync \
                        lock    v0.6.0 \
                        rmd160  f9a1a924a702fc4a3679db3dc36c58ca5b2eba0a \
                        sha256  b4e9aa29dbb296cc2ebfd679927b1789078d5743385b26c0656a24da89fdcee9 \
                        size    17596 \
                    go.etcd.io/bbolt \
                        repo    github.com/etcd-io/bbolt \
                        lock    v1.3.9 \
                        rmd160  b70f2165df71fc7870282f3d288229a88533ac63 \
                        sha256  ff9586508deafbadc9715dccdb9d8875412da8f131d048661ac10e1eda7bf941 \
                        size    124955 \
                    github.com/stretchr/testify \
                        lock    v1.8.1 \
                        rmd160  4d80635834e01b3ddb67babdd8de2eac2c5a7587 \
                        sha256  9848272e238f98fc0555b514c4522e70c4df25331b4ee3f9cb9244a04935934e \
                        size    97722 \
                    github.com/sourcegraph/jsonrpc2 \
                        lock    v0.2.0 \
                        rmd160  fd149dd6d87bf339da215c6bb8cbff309c27c782 \
                        sha256  f2acd7df345c86dcc941aaadf186a53c3e383ecd1393a8c09c85b9a630db8ae1 \
                        size    18153 \
                    github.com/pmezard/go-difflib \
                        lock    v1.0.0 \
                        rmd160  fc879bfbdef9e3ff50844def58404e2b5a613ab8 \
                        sha256  7cd492737641847266115f3060489a67f63581e521a8ec51efbc280c33fc991f \
                        size    11409 \
                    github.com/mattn/go-isatty \
                        lock    v0.0.20 \
                        rmd160  ef20ccdf87de8b704c0c7118625b2beb31d8f1b4 \
                        sha256  397549e98cf5d40df585f31dc7902f017c37be88c64311dd2b4aeccab4009949 \
                        size    4717 \
                    github.com/gorilla/websocket \
                        lock    v1.4.1 \
                        rmd160  fabb50c4c2297eb4485ccc1abb5ead16c239e26f \
                        sha256  79182d9e15e4dbd709c7d360245e25445628e0d111472a9809fc5ba6327af646 \
                        size    54230 \
                    github.com/google/go-cmp \
                        lock    v0.6.0 \
                        rmd160  2c9f5dab93f8a0895591466fe4a07c5dd9166ae2 \
                        sha256  0d550825fae514f8a947ab7e42fcb874f509d9cbfa3ad2711d7570a25f31571a \
                        size    104795 \
                    github.com/davecgh/go-spew \
                        lock    v1.1.1 \
                        rmd160  7c02883aa81f81aca14e13a27fdca9e7fbc136f7 \
                        sha256  e85d6afa83e64962e0d63dd4812971eccf2b9b5445eda93f46a4406f0c177d5f \
                        size    42171 \
                    github.com/creack/pty \
                        lock    v1.1.21 \
                        rmd160  6f0252fc288157bb3a4ef437139a3627d0e4f5a1 \
                        sha256  4cf13bc8303ab89680d9109d89170b74b6822963471d48b548666a38ea1e2d80 \
                        size    20134
