Gentoo Archives: gentoo-commits

From: "William Hubbs (williamh)" <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-go/go-text: go-text-9999.ebuild
Date: Thu, 25 Jun 2015 17:43:13
Message-Id: 20150625174302.58520A55@oystercatcher.gentoo.org
1 williamh 15/06/25 17:43:02
2
3 Modified: go-text-9999.ebuild
4 Log:
5 convert live ebuild to use the new go eclasses
6
7 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538)
8
9 Revision Changes Path
10 1.6 dev-go/go-text/go-text-9999.ebuild
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-text/go-text-9999.ebuild?rev=1.6&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-text/go-text-9999.ebuild?rev=1.6&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-text/go-text-9999.ebuild?r1=1.5&r2=1.6
15
16 Index: go-text-9999.ebuild
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v
19 retrieving revision 1.5
20 retrieving revision 1.6
21 diff -u -r1.5 -r1.6
22 --- go-text-9999.ebuild 9 Jun 2015 03:07:26 -0000 1.5
23 +++ go-text-9999.ebuild 25 Jun 2015 17:43:02 -0000 1.6
24 @@ -1,47 +1,40 @@
25 # Copyright 1999-2015 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v 1.5 2015/06/09 03:07:26 zmedico Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v 1.6 2015/06/25 17:43:02 williamh Exp $
29
30 EAPI=5
31 -inherit git-r3
32
33 -KEYWORDS=""
34 +inherit golang-build golang-vcs
35 +EGO_PN=golang.org/x/text/...
36 +EGO_SRC=golang.org/x/text
37 +
38 DESCRIPTION="Go text processing support"
39 -GO_PN=golang.org/x/${PN##*-}
40 -HOMEPAGE="https://godoc.org/${GO_PN}"
41 -EGIT_REPO_URI="https://go.googlesource.com/${PN##*-}"
42 +HOMEPAGE="https://godoc.org/golang.org/x/text"
43 LICENSE="BSD"
44 SLOT="0"
45 IUSE=""
46 -DEPEND=">=dev-lang/go-1.4"
47 +DEPEND=""
48 RDEPEND=""
49 -S="${WORKDIR}/src/${GO_PN}"
50 -EGIT_CHECKOUT_DIR="${S}"
51 -STRIP_MASK="*.a"
52
53 -src_compile() {
54 +src_test() {
55 # Create a writable GOROOT in order to avoid sandbox violations.
56 - GOROOT="${WORKDIR}/goroot"
57 - cp -sR "${EPREFIX}"/usr/lib/go "${GOROOT}" || die
58 - rm -rf "${GOROOT}/src/${GO_PN}" \
59 - "${GOROOT}/pkg/linux_${ARCH}/${GO_PN}" || die
60 - GOROOT="${GOROOT}" GOPATH=${WORKDIR} go install -v -x -work ${GO_PN}/... || die
61 -}
62 + cp -sR "$(go env GOROOT)" "${T}/goroot" || die
63 + if [ -d "${T}/goroot/src/${EGO_SRC}" ]; then
64 + rm -rf "${T}/goroot/src/${EGO_SRC}" || die
65 + fi
66 + if [ -d "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" ]; then
67 + rm -rf "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" ||
68 + die
69 + fi
70
71 -src_test() {
72 # Create go symlink for TestLinking in display/dict_test.go
73 - mkdir -p "${GOROOT}/bin"
74 - ln -s /usr/bin/go "${GOROOT}/bin/go" || die
75 + mkdir -p "${T}/goroot/bin"
76 + ln -s /usr/bin/go "${T}/goroot/bin/go" || die
77
78 - GOROOT="${GOROOT}" GOPATH=${WORKDIR} \
79 - go test -x -v ${GO_PN}/... || die $?
80 + GOROOT="${T}/goroot" golang-build_src_test
81 }
82
83 src_install() {
84 - exeinto /usr/lib/go/bin
85 - doexe "${WORKDIR}"/bin/*
86 - insinto /usr/lib/go
87 - find "${WORKDIR}"/{pkg,src} -name '.git*' -exec rm -rf {} \; 2>/dev/null
88 - insopts -m0644 -p # preserve timestamps for bug 551486
89 - doins -r "${WORKDIR}"/{pkg,src}
90 + golang-build_src_install
91 + dobin bin/*
92 }