diff options
author | William Hubbs <williamh@gentoo.org> | 2015-06-26 14:30:05 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2015-06-26 14:30:05 +0000 |
commit | ab5fdd47f01d044ed90b43cee06cee4ac87e5865 (patch) | |
tree | 962a990410b7a35df5217621c8ea4838f59578c6 /dev-go | |
parent | Stable for amd64, wrt bug #552062 (diff) | |
download | gentoo-2-ab5fdd47f01d044ed90b43cee06cee4ac87e5865.tar.gz gentoo-2-ab5fdd47f01d044ed90b43cee06cee4ac87e5865.tar.bz2 gentoo-2-ab5fdd47f01d044ed90b43cee06cee4ac87e5865.zip |
Convert live ebuild to use the new eclasses
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538)
Diffstat (limited to 'dev-go')
-rw-r--r-- | dev-go/go-tools/go-tools-9999.ebuild | 112 |
1 files changed, 48 insertions, 64 deletions
diff --git a/dev-go/go-tools/go-tools-9999.ebuild b/dev-go/go-tools/go-tools-9999.ebuild index 43549f2032da..6da00fc67c1a 100644 --- a/dev-go/go-tools/go-tools-9999.ebuild +++ b/dev-go/go-tools/go-tools-9999.ebuild @@ -1,97 +1,81 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-go/go-tools/go-tools-9999.ebuild,v 1.7 2015/06/09 03:17:38 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-go/go-tools/go-tools-9999.ebuild,v 1.8 2015/06/26 14:30:05 williamh Exp $ EAPI=5 -inherit git-r3 +inherit golang-build golang-vcs +EGO_PN=golang.org/x/tools/... +EGO_SRC=golang.org/x/tools +ICON_URI="http://golang.org/favicon.ico -> go-favicon.ico" -KEYWORDS="" DESCRIPTION="Go Tools" -MY_PN=${PN##*-} -GO_PN=golang.org/x/${MY_PN} -HOMEPAGE="https://godoc.org/${GO_PN}" -EGIT_REPO_URI="https://go.googlesource.com/${MY_PN}" -SRC_URI="http://golang.org/favicon.ico -> go-favicon.ico" +HOMEPAGE="https://godoc.org/x/tools" +SRC_URI="${ICON_URI}" LICENSE="BSD" SLOT="0" IUSE="" -DEPEND=">=dev-lang/go-1.4 - dev-go/go-net" +DEPEND="dev-go/go-net" RDEPEND="" -S="${WORKDIR}/src/${GO_PN}" -EGIT_CHECKOUT_DIR="${S}" -STRIP_MASK="*.a" - -src_unpack() { - git-r3_src_unpack - cp "${DISTDIR}"/go-favicon.ico "${S}"/godoc/static/favicon.ico || die -} src_prepare() { # disable broken tests - sed -e 's:TestWeb(:_\0:' -i cmd/godoc/godoc_test.go || die - sed -e 's:TestVet(:_\0:' -i cmd/vet/vet_test.go || die - sed -e 's:TestImport(:_\0:' -i go/gcimporter/gcimporter_test.go || die - sed -e 's:TestImportStdLib(:_\0:' -i go/importer/import_test.go || die - sed -e 's:TestStdlib(:_\0:' -i go/loader/stdlib_test.go || die - sed -e 's:TestStdlib(:_\0:' -i go/ssa/stdlib_test.go || die + sed -e 's:TestWeb(:_\0:' \ + -i src/${EGO_SRC}/cmd/godoc/godoc_test.go || die + sed -e 's:TestVet(:_\0:' \ + -i src/${EGO_SRC}/cmd/vet/vet_test.go || die + sed -e 's:TestImport(:_\0:' \ + -i src/${EGO_SRC}/go/gcimporter/gcimporter_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${EGO_SRC}/go/importer/import_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/go/loader/stdlib_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/stdlib_test.go || die sed -e 's:TestGorootTest(:_\0:' \ -e 's:TestFoo(:_\0:' \ -e 's:TestTestmainPackage(:_\0:' \ - -i go/ssa/interp/interp_test.go || die + -i src/${EGO_SRC}/go/ssa/interp/interp_test.go || die sed -e 's:TestBar(:_\0:' \ - -e 's:TestFoo(:_\0:' -i go/ssa/interp/testdata/a_test.go || die - sed -e 's:TestCheck(:_\0:' -i go/types/check_test.go || die + -e 's:TestFoo(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/interp/testdata/a_test.go || die + sed -e 's:TestCheck(:_\0:' \ + -i src/${EGO_SRC}/go/types/check_test.go || die sed -e 's:TestStdlib(:_\0:' \ -e 's:TestStdFixed(:_\0:' \ - -e 's:TestStdKen(:_\0:' -i go/types/stdlib_test.go || die - sed -e 's:TestRepoRootForImportPath(:_\0:' -i go/vcs/vcs_test.go || die - sed -e 's:TestStdlib(:_\0:' -i refactor/lexical/lexical_test.go || die + -e 's:TestStdKen(:_\0:' \ + -i src/${EGO_SRC}/go/types/stdlib_test.go || die + sed -e 's:TestRepoRootForImportPath(:_\0:' \ + -i src/${EGO_SRC}/go/vcs/vcs_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/refactor/lexical/lexical_test.go || die # Add favicon to the godoc web interface (bug 551030) - sed -e 's:"example.html",:\0\n\t"favicon.ico",:' -i godoc/static/makestatic.go || die - sed -e 's:<link type="text/css":<link rel="icon" type="image/png" href="/lib/godoc/favicon.ico">\n\0:' -i \ - godoc/static/godoc.html || die + cp "${DISTDIR}"/go-favicon.ico "src/${EGO_SRC}/godoc/static/favicon.ico" || + die + sed -e 's:"example.html",:\0\n\t"favicon.ico",:' \ + -i src/${EGO_SRC}/godoc/static/makestatic.go || die + sed -e 's:<link type="text/css":<link rel="icon" type="image/png" href="/lib/godoc/favicon.ico">\n\0:' \ + -i src/${EGO_SRC}/godoc/static/godoc.html || die } src_compile() { - # Create a writable GOROOT in order to avoid sandbox violations. - GOROOT="${WORKDIR}/goroot" - cp -sR "${EPREFIX}"/usr/lib/go "${GOROOT}" || die - rm -rf "${GOROOT}/src/${GO_PN}" \ - "${GOROOT}/pkg/linux_${ARCH}/${GO_PN}" || die - # Generate static.go with favicon included - pushd godoc/static >/dev/null - GOROOT="${GOROOT}" GOPATH=${WORKDIR} go run makestatic.go || die + pushd src/golang.org/x/tools/godoc/static >/dev/null || die + go run makestatic.go || die popd >/dev/null - GOROOT="${GOROOT}" GOPATH=${WORKDIR} go install -v -x -work ${GO_PN}/... || die -} - -src_test() { - GOROOT="${GOROOT}" GOPATH=${WORKDIR} \ - go test -x -v ${GO_PN}/... || die $? + golang-build_src_compile } src_install() { - local x - exeinto /usr/lib/go/bin - doexe "${WORKDIR}"/bin/* - - # godoc ends up in ${GOROOT}/bin - dodir /usr/bin - while read -r -d '' x; do - doexe "${x}" - ln "${ED}"usr/{lib/go/bin,bin}/${x##*/} || die - done < <(find "${GOROOT}/bin" -type f -print0) + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die - # cover and vet end up in ${GOROOT}/pkg/tool/linux_amd64 - exeinto /usr/lib/go/pkg/tool/linux_amd64 - find "${GOROOT}/pkg/tool/linux_amd64" -type f -exec doexe {} \; + GOROOT="${T}/goroot" golang-build_src_install + dobin bin/* "${T}/goroot/bin/godoc" - insinto /usr/lib/go - find "${WORKDIR}"/{pkg,src} -name '.git*' -exec rm -rf {} \; 2>/dev/null - insopts -m0644 -p # preserve timestamps for bug 551486 - doins -r "${WORKDIR}"/{pkg,src} + exeinto "$(go env GOTOOLDIR)" + exeopts -m0755 -p # preserve timestamps for bug 551486 + doexe "${T}/goroot/pkg/tool/$(go env GOOS)_$(go env GOARCH)/cover" + doexe "${T}/goroot/pkg/tool/$(go env GOOS)_$(go env GOARCH)/vet" } |