Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-go/go-net/
Date: Mon, 20 Aug 2018 00:21:04
Message-Id: 1534724447.446bbe2a6b2b187c6cd9410af3e9061b06b9ae05.zmedico@gentoo
1 commit: 446bbe2a6b2b187c6cd9410af3e9061b06b9ae05
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 20 00:12:50 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 20 00:20:47 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=446bbe2a
7
8 dev-go/go-net: update 9999 ebuild
9
10 Package-Manager: Portage-2.3.47, Repoman-2.3.10
11
12 dev-go/go-net/go-net-9999.ebuild | 54 ++++++++++++++++++++++++++--------------
13 1 file changed, 35 insertions(+), 19 deletions(-)
14
15 diff --git a/dev-go/go-net/go-net-9999.ebuild b/dev-go/go-net/go-net-9999.ebuild
16 index bf416c447af..f9b9ae5ffca 100644
17 --- a/dev-go/go-net/go-net-9999.ebuild
18 +++ b/dev-go/go-net/go-net-9999.ebuild
19 @@ -1,15 +1,15 @@
20 -# Copyright 1999-2016 Gentoo Foundation
21 +# Copyright 1999-2018 Gentoo Foundation
22 # Distributed under the terms of the GNU General Public License v2
23
24 -EAPI=5
25 -EGO_PN=golang.org/x/net/...
26 +EAPI=6
27 EGO_SRC=golang.org/x/net
28 +EGO_PN=${EGO_SRC}/...
29
30 if [[ ${PV} = *9999* ]]; then
31 inherit golang-vcs
32 else
33 - KEYWORDS="~amd64"
34 - EGIT_COMMIT="b6d7b1396ec874c3b00f6c84cd4301a17c56c8ed"
35 + KEYWORDS="~amd64 ~arm ~x86"
36 + EGIT_COMMIT="aaf60122140d3fcf75376d319f0554393160eb50"
37 SRC_URI="https://github.com/golang/net/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
38 inherit golang-vcs-snapshot
39 fi
40 @@ -20,24 +20,40 @@ HOMEPAGE="https://godoc.org/golang.org/x/net"
41 LICENSE="BSD"
42 SLOT="0/${PVR}"
43 IUSE=""
44 -DEPEND="dev-go/go-crypto:=
45 - dev-go/go-text:="
46 +DEPEND=">=dev-go/go-crypto-0_pre20180816:=
47 + >=dev-go/go-sys-0_pre20180816:=
48 + >=dev-go/go-text-0.3.0:="
49 RDEPEND=""
50
51 src_prepare() {
52 - # disable broken tests
53 - sed -e 's:TestReadProppatch(:_\0:' \
54 - -i src/${EGO_SRC}/webdav/xml_test.go || die
55 - sed -e 's:TestPingGoogle(:_\0:' \
56 - -e 's:TestNonPrivilegedPing(:_\0:' \
57 - -i src/${EGO_SRC}/icmp/ping_test.go || die
58 + default
59 + sed -e 's:TestDiag(:_\0:' \
60 + -e 's:TestConcurrentNonPrivilegedListenPacket(:_\0:' \
61 + -i src/${EGO_SRC}/icmp/diag_test.go || die
62 + sed -e 's:TestConcurrentNonPrivilegedListenPacket(:_\0:' \
63 + -i src/${EGO_SRC}/icmp/diag_test.go || die
64 + sed -e 's:TestMultipartMessageBodyLen(:_\0:' \
65 + -i src/${EGO_SRC}/icmp/multipart_test.go || die
66 }
67
68 src_compile() {
69 - # Create a writable GOROOT in order to avoid sandbox violations.
70 - cp -sR "$(go env GOROOT)" "${T}/goroot" || die
71 - rm -rf "${T}/goroot/src/${EGO_SRC}" || die
72 - rm -rf "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" || die
73 - export GOROOT="${T}/goroot"
74 - golang-build_src_compile
75 + local x
76 + mkdir -p "${T}/golibdir/src/golang.org/x" || die
77 + for x in sys text crypto; do
78 + ln -s "$(get_golibdir_gopath)/src/golang.org/x/${x}" "${T}/golibdir/src/golang.org/x/${x}" || die
79 + done
80 + env GOPATH="${S}:${T}/golibdir" GOBIN="${S}/bin" \
81 + go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die
82 +}
83 +
84 +src_test() {
85 + GOPATH="${S}:${T}/golibdir" GOBIN="${S}/bin" \
86 + go test -v -work -x "${EGO_PN}" || die
87 +}
88 +
89 +src_install() {
90 + rm -rf "${S}/src/${EGO_SRC}/.git"* || die
91 + golang_install_pkgs
92 + exeinto "$(go env GOROOT)/bin"
93 + doexe bin/*
94 }