williamh 15/06/25 17:43:02 Modified: go-text-9999.ebuild Log: convert live ebuild to use the new go eclasses (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538)
Revision Changes Path 1.6 dev-go/go-text/go-text-9999.ebuild file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-text/go-text-9999.ebuild?rev=1.6&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-text/go-text-9999.ebuild?rev=1.6&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-text/go-text-9999.ebuild?r1=1.5&r2=1.6 Index: go-text-9999.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- go-text-9999.ebuild 9 Jun 2015 03:07:26 -0000 1.5 +++ go-text-9999.ebuild 25 Jun 2015 17:43:02 -0000 1.6 @@ -1,47 +1,40 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v 1.5 2015/06/09 03:07:26 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v 1.6 2015/06/25 17:43:02 williamh Exp $ EAPI=5 -inherit git-r3 -KEYWORDS="" +inherit golang-build golang-vcs +EGO_PN=golang.org/x/text/... +EGO_SRC=golang.org/x/text + DESCRIPTION="Go text processing support" -GO_PN=golang.org/x/${PN##*-} -HOMEPAGE="https://godoc.org/${GO_PN}" -EGIT_REPO_URI="https://go.googlesource.com/${PN##*-}" +HOMEPAGE="https://godoc.org/golang.org/x/text" LICENSE="BSD" SLOT="0" IUSE="" -DEPEND=">=dev-lang/go-1.4" +DEPEND="" RDEPEND="" -S="${WORKDIR}/src/${GO_PN}" -EGIT_CHECKOUT_DIR="${S}" -STRIP_MASK="*.a" -src_compile() { +src_test() { # 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 - GOROOT="${GOROOT}" GOPATH=${WORKDIR} go install -v -x -work ${GO_PN}/... || die -} + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + if [ -d "${T}/goroot/src/${EGO_SRC}" ]; then + rm -rf "${T}/goroot/src/${EGO_SRC}" || die + fi + if [ -d "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" ]; then + rm -rf "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" || + die + fi -src_test() { # Create go symlink for TestLinking in display/dict_test.go - mkdir -p "${GOROOT}/bin" - ln -s /usr/bin/go "${GOROOT}/bin/go" || die + mkdir -p "${T}/goroot/bin" + ln -s /usr/bin/go "${T}/goroot/bin/go" || die - GOROOT="${GOROOT}" GOPATH=${WORKDIR} \ - go test -x -v ${GO_PN}/... || die $? + GOROOT="${T}/goroot" golang-build_src_test } src_install() { - exeinto /usr/lib/go/bin - doexe "${WORKDIR}"/bin/* - 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} + golang-build_src_install + dobin bin/* }
