# Copyright 2019-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit go-module

DESCRIPTION="detect licenses used in Go binaries"
HOMEPAGE="https://github.com/mitchellh/golicense"

EGO_SUM=(
	"github.com/360EntSecGroup-Skylar/excelize v1.4.0"
	"github.com/360EntSecGroup-Skylar/excelize v1.4.0/go.mod"
	"github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod"
	"github.com/DHowett/go-plist v0.0.0-20180609054337-500bd5b9081b/go.mod"
	"github.com/agext/levenshtein v1.2.1"
	"github.com/agext/levenshtein v1.2.1/go.mod"
	"github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod"
	"github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7"
	"github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod"
	"github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239"
	"github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod"
	"github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod"
	"github.com/apparentlymart/go-textseg v1.0.0"
	"github.com/apparentlymart/go-textseg v1.0.0/go.mod"
	"github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod"
	"github.com/davecgh/go-spew v1.1.1"
	"github.com/davecgh/go-spew v1.1.1/go.mod"
	"github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc"
	"github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod"
	"github.com/dgryski/go-minhash v0.0.0-20170608043002-7fe510aff544"
	"github.com/dgryski/go-minhash v0.0.0-20170608043002-7fe510aff544/go.mod"
	"github.com/dgryski/go-spooky v0.0.0-20170606183049-ed3d087f40e2"
	"github.com/dgryski/go-spooky v0.0.0-20170606183049-ed3d087f40e2/go.mod"
	"github.com/ekzhu/minhash-lsh v0.0.0-20171225071031-5c06ee8586a1"
	"github.com/ekzhu/minhash-lsh v0.0.0-20171225071031-5c06ee8586a1/go.mod"
	"github.com/emirpasic/gods v1.12.0"
	"github.com/emirpasic/gods v1.12.0/go.mod"
	"github.com/fatih/color v1.7.0"
	"github.com/fatih/color v1.7.0/go.mod"
	"github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568"
	"github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod"
	"github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod"
	"github.com/gliderlabs/ssh v0.2.2"
	"github.com/gliderlabs/ssh v0.2.2/go.mod"
	"github.com/go-test/deep v1.0.1"
	"github.com/go-test/deep v1.0.1/go.mod"
	"github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod"
	"github.com/golang/protobuf v1.1.0/go.mod"
	"github.com/golang/protobuf v1.2.0"
	"github.com/golang/protobuf v1.2.0/go.mod"
	"github.com/google/go-cmp v0.2.0"
	"github.com/google/go-cmp v0.2.0/go.mod"
	"github.com/google/go-github/v18 v18.2.0"
	"github.com/google/go-github/v18 v18.2.0/go.mod"
	"github.com/google/go-querystring v1.0.0"
	"github.com/google/go-querystring v1.0.0/go.mod"
	"github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd"
	"github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd/go.mod"
	"github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod"
	"github.com/hashicorp/errwrap v1.0.0"
	"github.com/hashicorp/errwrap v1.0.0/go.mod"
	"github.com/hashicorp/go-cleanhttp v0.5.0"
	"github.com/hashicorp/go-cleanhttp v0.5.0/go.mod"
	"github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod"
	"github.com/hashicorp/go-multierror v1.0.0"
	"github.com/hashicorp/go-multierror v1.0.0/go.mod"
	"github.com/hashicorp/hcl2 v0.0.0-20181111172936-0467c0c38ca2"
	"github.com/hashicorp/hcl2 v0.0.0-20181111172936-0467c0c38ca2/go.mod"
	"github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b"
	"github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b/go.mod"
	"github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99"
	"github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod"
	"github.com/jdkato/prose v1.1.0"
	"github.com/jdkato/prose v1.1.0/go.mod"
	"github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod"
	"github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e"
	"github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e/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/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348"
	"github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod"
	"github.com/mattn/go-colorable v0.0.9"
	"github.com/mattn/go-colorable v0.0.9/go.mod"
	"github.com/mattn/go-isatty v0.0.4"
	"github.com/mattn/go-isatty v0.0.4/go.mod"
	"github.com/mitchellh/go-homedir v1.0.0"
	"github.com/mitchellh/go-homedir v1.0.0/go.mod"
	"github.com/mitchellh/go-spdx v0.1.0"
	"github.com/mitchellh/go-spdx v0.1.0/go.mod"
	"github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7"
	"github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod"
	"github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826"
	"github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod"
	"github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808"
	"github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808/go.mod"
	"github.com/neurosnap/sentences v1.0.6"
	"github.com/neurosnap/sentences v1.0.6/go.mod"
	"github.com/pelletier/go-buffruneio v0.2.0"
	"github.com/pelletier/go-buffruneio v0.2.0/go.mod"
	"github.com/pkg/errors v0.8.0"
	"github.com/pkg/errors v0.8.0/go.mod"
	"github.com/pmezard/go-difflib v1.0.0"
	"github.com/pmezard/go-difflib v1.0.0/go.mod"
	"github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod"
	"github.com/rsc/goversion v1.2.0"
	"github.com/rsc/goversion v1.2.0/go.mod"
	"github.com/sebdah/goldie v0.0.0-20180424091453-8784dd1ab561"
	"github.com/sebdah/goldie v0.0.0-20180424091453-8784dd1ab561/go.mod"
	"github.com/sergi/go-diff v1.0.0"
	"github.com/sergi/go-diff v1.0.0/go.mod"
	"github.com/shogo82148/go-shuffle v0.0.0-20180218125048-27e6095f230d"
	"github.com/shogo82148/go-shuffle v0.0.0-20180218125048-27e6095f230d/go.mod"
	"github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95"
	"github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod"
	"github.com/spf13/pflag v1.0.2/go.mod"
	"github.com/src-d/gcfg v1.4.0"
	"github.com/src-d/gcfg v1.4.0/go.mod"
	"github.com/stretchr/objx v0.1.1"
	"github.com/stretchr/objx v0.1.1/go.mod"
	"github.com/stretchr/testify v1.2.2"
	"github.com/stretchr/testify v1.2.2/go.mod"
	"github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod"
	"github.com/xanzy/ssh-agent v0.2.0"
	"github.com/xanzy/ssh-agent v0.2.0/go.mod"
	"github.com/zclconf/go-cty v0.0.0-20180815031001-58bb2bc0302a"
	"github.com/zclconf/go-cty v0.0.0-20180815031001-58bb2bc0302a/go.mod"
	"golang.org/x/crypto v0.0.0-20180816225734-aabede6cba87/go.mod"
	"golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac"
	"golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod"
	"golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2"
	"golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod"
	"golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod"
	"golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod"
	"golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod"
	"golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495"
	"golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod"
	"golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod"
	"golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod"
	"golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod"
	"golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod"
	"golang.org/x/net v0.0.0-20180826012351-8a410e7b638d"
	"golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod"
	"golang.org/x/net v0.0.0-20190311183353-d8887717615a"
	"golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod"
	"golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be"
	"golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod"
	"golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f"
	"golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod"
	"golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod"
	"golang.org/x/sys v0.0.0-20180824143301-4910a1d54f87"
	"golang.org/x/sys v0.0.0-20180824143301-4910a1d54f87/go.mod"
	"golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9"
	"golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod"
	"golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod"
	"golang.org/x/sys v0.0.0-20190312061237-fead79001313"
	"golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod"
	"golang.org/x/text v0.3.0"
	"golang.org/x/text v0.3.0/go.mod"
	"golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b"
	"golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod"
	"golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod"
	"golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846"
	"golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod"
	"gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod"
	"gonum.org/v1/gonum v0.6.0"
	"gonum.org/v1/gonum v0.6.0/go.mod"
	"gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod"
	"gonum.org/v1/netlib v0.0.0-20191031114514-eccb95939662"
	"gonum.org/v1/netlib v0.0.0-20191031114514-eccb95939662/go.mod"
	"gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod"
	"google.golang.org/appengine v1.1.0"
	"google.golang.org/appengine v1.1.0/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/neurosnap/sentences.v1 v1.0.6"
	"gopkg.in/neurosnap/sentences.v1 v1.0.6/go.mod"
	"gopkg.in/russross/blackfriday.v2 v2.0.0"
	"gopkg.in/russross/blackfriday.v2 v2.0.0/go.mod"
	"gopkg.in/src-d/go-billy-siva.v4 v4.2.2"
	"gopkg.in/src-d/go-billy-siva.v4 v4.2.2/go.mod"
	"gopkg.in/src-d/go-billy.v4 v4.3.0"
	"gopkg.in/src-d/go-billy.v4 v4.3.0/go.mod"
	"gopkg.in/src-d/go-git-fixtures.v3 v3.5.0"
	"gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod"
	"gopkg.in/src-d/go-git.v4 v4.7.0"
	"gopkg.in/src-d/go-git.v4 v4.7.0/go.mod"
	"gopkg.in/src-d/go-license-detector.v2 v2.0.0-20180510072912-da552ecf050b"
	"gopkg.in/src-d/go-license-detector.v2 v2.0.0-20180510072912-da552ecf050b/go.mod"
	"gopkg.in/src-d/go-siva.v1 v1.3.0"
	"gopkg.in/src-d/go-siva.v1 v1.3.0/go.mod"
	"gopkg.in/warnings.v0 v0.1.2"
	"gopkg.in/warnings.v0 v0.1.2/go.mod"
	"gopkg.in/yaml.v2 v2.2.1/go.mod"
	"howett.net/plist v0.0.0-20180609054337-500bd5b9081b/go.mod"
	"modernc.org/cc v1.0.0/go.mod"
	"modernc.org/golex v1.0.0/go.mod"
	"modernc.org/mathutil v1.0.0/go.mod"
	"modernc.org/strutil v1.1.0/go.mod"
	"modernc.org/xc v1.0.0/go.mod"
	"rsc.io/pdf v0.1.1/go.mod"
	)
go-module_set_globals
SRC_URI="https://github.com/mitchellh/golicense/archive/v${PV}.tar.gz -> ${P}.tar.gz
	${EGO_SUM_SRC_URI}"

LICENSE="Apache-2.0 BSD ISC MIT MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"

src_compile() {
	go build || die
}

src_install() {
	dobin golicense
	dodoc README.md
}