From 3e3f7d6d13889dd7c4311a93222a83f73d5cae60 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 24 Jan 2023 22:40:58 +0000 Subject: dev-go/go-protobuf : new package (pentoo import) --- dev-go/go-protobuf/go-protobuf-1.5.2.ebuild | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 dev-go/go-protobuf/go-protobuf-1.5.2.ebuild (limited to 'dev-go/go-protobuf/go-protobuf-1.5.2.ebuild') diff --git a/dev-go/go-protobuf/go-protobuf-1.5.2.ebuild b/dev-go/go-protobuf/go-protobuf-1.5.2.ebuild new file mode 100644 index 00000000..e4f625bc --- /dev/null +++ b/dev-go/go-protobuf/go-protobuf-1.5.2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGO_SRC="github.com/golang/protobuf" +EGO_PN=${EGO_SRC}/... +EGO_VENDOR=( + "google.golang.org/genproto af9cb2a35e7f169ec875002c1829c9b315cddc04 github.com/google/go-genproto" + "golang.org/x/net aaf60122140d3fcf75376d319f0554393160eb50 github.com/golang/net" + "golang.org/x/sync 1d60e4601c6fd243af51cc01ddf169918a5407ca github.com/golang/sync" + "google.golang.org/protobuf v1.27.1 github.com/protocolbuffers/protobuf-go" +) + +inherit golang-build golang-vcs-snapshot + +DESCRIPTION="Go support for Google's protocol buffers" +HOMEPAGE="https://github.com/golang/protobuf" +SRC_URI="https://${EGO_SRC}/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI}" +LICENSE="BSD" +SLOT="0/${PVR}" +KEYWORDS="amd64 x86" +IUSE="test" +DEPEND="test? ( dev-libs/protobuf )" +RDEPEND="" +RESTRICT="!test? ( test )" + +#src_prepare() { +# default + # golden_test.go:113: golden file differs: deprecated/deprecated.pb.go +# sed -e 's:^\(func \)\(TestGolden\):\1_\2:' \ +# -i src/${EGO_SRC}/protoc-gen-go/golden_test.go || die +#} + +src_compile() { + env GOPATH="${S}" \ + go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die +} + +src_test() { + GOPATH="${S}" \ + go test -v -work -x "${EGO_PN}" || die +} + +src_install() { + rm -rf src/${EGO_SRC}/.git* || die + golang_install_pkgs + rm -rf "${D%/}$(get_golibdir_gopath)/src/${EGO_SRC}/vendor" || die + + dobin bin/* +} -- cgit v1.2.3