| # Copyright 2019 Gentoo Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| inherit go-module |
| |
| MY_PV="${PV/_rc/}" |
| MY_PV="${MY_PV/_/-}" |
| |
| DESCRIPTION="A shell parser, formatter, and interpreter (sh/bash/mksh)" |
| HOMEPAGE="https://github.com/mvdan/sh" |
| EGO_SUM=( |
| "github.com/davecgh/go-spew v1.1.0" |
| "github.com/davecgh/go-spew v1.1.0/go.mod" |
| "github.com/kr/pretty v0.1.0" |
| "github.com/kr/pretty v0.1.0/go.mod" |
| "github.com/kr/pty v1.1.1/go.mod" |
| "github.com/kr/text v0.1.0" |
| "github.com/kr/text v0.1.0/go.mod" |
| "github.com/pkg/diff v0.0.0-20190930165518-531926345625" |
| "github.com/pkg/diff v0.0.0-20190930165518-531926345625/go.mod" |
| "github.com/pmezard/go-difflib v1.0.0" |
| "github.com/pmezard/go-difflib v1.0.0/go.mod" |
| "github.com/rogpeppe/go-internal v1.5.0" |
| "github.com/rogpeppe/go-internal v1.5.0/go.mod" |
| "github.com/sergi/go-diff v1.0.0" |
| "github.com/sergi/go-diff v1.0.0/go.mod" |
| "github.com/stretchr/objx v0.1.0" |
| "github.com/stretchr/objx v0.1.0/go.mod" |
| "github.com/stretchr/testify v1.4.0" |
| "github.com/stretchr/testify v1.4.0/go.mod" |
| "golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod" |
| "golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc" |
| "golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod" |
| "golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod" |
| "golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e" |
| "golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod" |
| "golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod" |
| "golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod" |
| "golang.org/x/sys v0.0.0-20191008105621-543471e840be" |
| "golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod" |
| "golang.org/x/text v0.3.0/go.mod" |
| "golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898" |
| "golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod" |
| "gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod" |
| "gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127" |
| "gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod" |
| "gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15" |
| "gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod" |
| "gopkg.in/errgo.v2 v2.1.0" |
| "gopkg.in/errgo.v2 v2.1.0/go.mod" |
| "gopkg.in/yaml.v2 v2.2.2" |
| "gopkg.in/yaml.v2 v2.2.2/go.mod" |
| "mvdan.cc/editorconfig v0.1.0" |
| "mvdan.cc/editorconfig v0.1.0/go.mod" |
| "mvdan.cc/editorconfig v0.1.1-0.20191109213504-890940e3f00e" |
| "mvdan.cc/editorconfig v0.1.1-0.20191109213504-890940e3f00e/go.mod" |
| ) |
| |
| go-module_set_globals |
| |
| SRC_URI="https://github.com/mvdan/sh/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz |
| ${EGO_SUM_SRC_URI}" |
| |
| S="${WORKDIR}/sh-${MY_PV}" |
| |
| LICENSE="BSD" |
| SLOT="0" |
| KEYWORDS="*" |
| |
| src_compile() { |
| go build -v -work -x "./cmd/shfmt" |
| } |
| |
| src_install() { |
| go install -v -work -x "./cmd/shfmt" |
| dobin shfmt |
| } |