Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-go/go-licenses/
Date: Tue, 12 May 2020 13:58:05
Message-Id: 1589291829.1d067f1ccc23da00a9c60ec4675749d44be9cee4.juippis@gentoo
1 commit: 1d067f1ccc23da00a9c60ec4675749d44be9cee4
2 Author: Konstantin Podshumok <kpp.live+signed <AT> gmail <DOT> com>
3 AuthorDate: Mon May 4 12:05:02 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Tue May 12 13:57:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d067f1c
7
8 dev-go/go-licenses: live ebuild
9
10 Signed-off-by: Konstantin Podshumok <kpp.live+signed <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/15508
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 dev-go/go-licenses/go-licenses-9999.ebuild | 196 +++++++++++++++++++++++++++++
15 1 file changed, 196 insertions(+)
16
17 diff --git a/dev-go/go-licenses/go-licenses-9999.ebuild b/dev-go/go-licenses/go-licenses-9999.ebuild
18 new file mode 100644
19 index 00000000000..a3e8b157c0f
20 --- /dev/null
21 +++ b/dev-go/go-licenses/go-licenses-9999.ebuild
22 @@ -0,0 +1,196 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +DESCRIPTION="Reports on the licenses used by a Go package and its dependencies"
29 +HOMEPAGE="https://github.com/google/go-licenses"
30 +LICENSE="Apache-2.0 MIT BSD BSD-2"
31 +SLOT="0"
32 +
33 +EGO_PN=github.com/google/${PN}
34 +EGIT_REPO_URI="https://${EGO_PN}.git"
35 +
36 +inherit go-module
37 +
38 +if [[ ${PV} == *9999* ]]; then
39 + inherit git-r3
40 +
41 + src_unpack() {
42 + git-r3_src_unpack
43 + go-module_live_vendor
44 + }
45 +else
46 + KEYWORDS="~amd64"
47 + EGIT_COMMIT="0fa8c766a59182ce9fd94169ddb52abe568b7f4e"
48 + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
49 +
50 + EGO_SUM=(
51 + "github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7"
52 + "github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239"
53 + "github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5"
54 + "github.com/davecgh/go-spew v1.1.1"
55 + "github.com/emirpasic/gods v1.12.0"
56 + "github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568"
57 + "github.com/gliderlabs/ssh v0.2.2"
58 + "github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b"
59 + "github.com/google/go-cmp v0.3.1"
60 + "github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702"
61 + "github.com/inconshreveable/mousetrap v1.0.0"
62 + "github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99"
63 + "github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd"
64 + "github.com/kr/pretty v0.1.0"
65 + "github.com/kr/text v0.1.0"
66 + "github.com/mitchellh/go-homedir v1.1.0"
67 + "github.com/otiai10/copy v1.0.2"
68 + "github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95"
69 + "github.com/otiai10/mint v1.3.0"
70 + "github.com/pkg/errors v0.8.1"
71 + "github.com/pmezard/go-difflib v1.0.0"
72 + "github.com/sergi/go-diff v1.0.0"
73 + "github.com/spf13/cobra v0.0.5"
74 + "github.com/spf13/pflag v1.0.5"
75 + "github.com/src-d/gcfg v1.4.0"
76 + "github.com/stretchr/testify v1.3.0"
77 + "github.com/xanzy/ssh-agent v0.2.1"
78 + "golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4"
79 + "golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f"
80 + "golang.org/x/net v0.0.0-20190724013045-ca1201d0de80"
81 + "golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914"
82 + "golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e"
83 + "golang.org/x/sys v0.0.0-20191119060738-e882bf8e40c2"
84 + "golang.org/x/text v0.3.2"
85 + "golang.org/x/tools v0.0.0-20191118222007-07fc4c7f2b98"
86 + "gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127"
87 + "gopkg.in/src-d/go-billy.v4 v4.3.2"
88 + "gopkg.in/src-d/go-git-fixtures.v3 v3.5.0"
89 + "gopkg.in/src-d/go-git.v4 v4.13.1"
90 + "gopkg.in/warnings.v0 v0.1.2"
91 +
92 + "github.com/BurntSushi/toml v0.3.1/go.mod"
93 + "github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod"
94 + "github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod"
95 + "github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod"
96 + "github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod"
97 + "github.com/coreos/etcd v3.3.10+incompatible/go.mod"
98 + "github.com/coreos/go-etcd v2.0.0+incompatible/go.mod"
99 + "github.com/coreos/go-semver v0.2.0/go.mod"
100 + "github.com/cpuguy83/go-md2man v1.0.10/go.mod"
101 + "github.com/creack/pty v1.1.7/go.mod"
102 + "github.com/davecgh/go-spew v1.1.0/go.mod"
103 + "github.com/davecgh/go-spew v1.1.1/go.mod"
104 + "github.com/emirpasic/gods v1.12.0/go.mod"
105 + "github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod"
106 + "github.com/fsnotify/fsnotify v1.4.7/go.mod"
107 + "github.com/gliderlabs/ssh v0.2.2/go.mod"
108 + "github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod"
109 + "github.com/google/go-cmp v0.2.0/go.mod"
110 + "github.com/google/go-cmp v0.3.0/go.mod"
111 + "github.com/google/go-cmp v0.3.1/go.mod"
112 + "github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702/go.mod"
113 + "github.com/hashicorp/hcl v1.0.0/go.mod"
114 + "github.com/inconshreveable/mousetrap v1.0.0/go.mod"
115 + "github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod"
116 + "github.com/jessevdk/go-flags v1.4.0/go.mod"
117 + "github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod"
118 + "github.com/kr/pretty v0.1.0/go.mod"
119 + "github.com/kr/pty v1.1.1/go.mod"
120 + "github.com/kr/pty v1.1.8/go.mod"
121 + "github.com/kr/text v0.1.0/go.mod"
122 + "github.com/magiconair/properties v1.8.0/go.mod"
123 + "github.com/mitchellh/go-homedir v1.1.0/go.mod"
124 + "github.com/mitchellh/mapstructure v1.1.2/go.mod"
125 + "github.com/otiai10/copy v1.0.2/go.mod"
126 + "github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod"
127 + "github.com/otiai10/mint v1.3.0/go.mod"
128 + "github.com/pelletier/go-buffruneio v0.2.0/go.mod"
129 + "github.com/pelletier/go-toml v1.2.0/go.mod"
130 + "github.com/pkg/errors v0.8.1/go.mod"
131 + "github.com/pmezard/go-difflib v1.0.0/go.mod"
132 + "github.com/russross/blackfriday v1.5.2/go.mod"
133 + "github.com/sergi/go-diff v1.0.0/go.mod"
134 + "github.com/spf13/afero v1.1.2/go.mod"
135 + "github.com/spf13/cast v1.3.0/go.mod"
136 + "github.com/spf13/cobra v0.0.5/go.mod"
137 + "github.com/spf13/jwalterweatherman v1.0.0/go.mod"
138 + "github.com/spf13/pflag v1.0.3/go.mod"
139 + "github.com/spf13/pflag v1.0.5/go.mod"
140 + "github.com/spf13/viper v1.3.2/go.mod"
141 + "github.com/src-d/gcfg v1.4.0/go.mod"
142 + "github.com/stretchr/objx v0.1.0/go.mod"
143 + "github.com/stretchr/objx v0.2.0/go.mod"
144 + "github.com/stretchr/testify v1.2.2/go.mod"
145 + "github.com/stretchr/testify v1.3.0/go.mod"
146 + "github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod"
147 + "github.com/xanzy/ssh-agent v0.2.1/go.mod"
148 + "github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod"
149 + "golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod"
150 + "golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod"
151 + "golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod"
152 + "golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod"
153 + "golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f/go.mod"
154 + "golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod"
155 + "golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod"
156 + "golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod"
157 + "golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914/go.mod"
158 + "golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod"
159 + "golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod"
160 + "golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod"
161 + "golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod"
162 + "golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod"
163 + "golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod"
164 + "golang.org/x/sys v0.0.0-20191119060738-e882bf8e40c2/go.mod"
165 + "golang.org/x/text v0.3.0/go.mod"
166 + "golang.org/x/text v0.3.2/go.mod"
167 + "golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod"
168 + "golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod"
169 + "golang.org/x/tools v0.0.0-20191118222007-07fc4c7f2b98/go.mod"
170 + "golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod"
171 + "gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod"
172 + "gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod"
173 + "gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod"
174 + "gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod"
175 + "gopkg.in/src-d/go-git.v4 v4.13.1/go.mod"
176 + "gopkg.in/warnings.v0 v0.1.2/go.mod"
177 + "gopkg.in/yaml.v2 v2.2.2/go.mod"
178 + )
179 +
180 + S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
181 +fi
182 +
183 +go-module_set_globals
184 +SRC_URI+=" ${EGO_SUM_SRC_URI}"
185 +
186 +DEPEND="dev-go/licenseclassifier"
187 +RDEPEND="${DEPEND}"
188 +
189 +# tries to go online
190 +RESTRICT+=" test"
191 +
192 +src_prepare() {
193 + eapply_user
194 +
195 + local share="${EROOT}/usr/share/licenseclassifier"
196 +
197 + local vendored_const_path="vendor/github.com/google/licenseclassifier"
198 + if [[ ${PV} != *9999* ]]; then
199 + go mod vendor || die
200 + fi
201 +
202 + sed -i "s@= lcRoot()@= \"${share}\", error(nil)@" \
203 + "${vendored_const_path}"*/file_system_resources.go || die
204 +}
205 +
206 +src_compile() {
207 + mkdir build || die
208 + go build -o build ./... || die
209 +}
210 +
211 +src_test() {
212 + go test ./... || die
213 +}
214 +
215 +src_install() {
216 + dobin "build/${PN}"
217 + einstalldocs
218 +}