From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-919995-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 9D42C139085
	for <garchives@archives.gentoo.org>; Thu, 29 Dec 2016 17:30:31 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BD869E0C25;
	Thu, 29 Dec 2016 17:30:30 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 89987E0C25
	for <gentoo-commits@lists.gentoo.org>; Thu, 29 Dec 2016 17:30:30 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id F3723340EE8
	for <gentoo-commits@lists.gentoo.org>; Thu, 29 Dec 2016 17:30:28 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6881524E0
	for <gentoo-commits@lists.gentoo.org>; Thu, 29 Dec 2016 17:30:27 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org>
Message-ID: <1483032611.0f2489c12930d4a832d1cc5979b2c64c20d682d9.williamh@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/go/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lang/go/go-9999.ebuild
X-VCS-Directories: dev-lang/go/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 0f2489c12930d4a832d1cc5979b2c64c20d682d9
X-VCS-Branch: master
Date: Thu, 29 Dec 2016 17:30:27 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 32784197-af42-433c-a1ab-f68b091dbed1
X-Archives-Hash: 19d5bad12b58647f56ac8970a2398df7

commit:     0f2489c12930d4a832d1cc5979b2c64c20d682d9
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 29 17:29:37 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Dec 29 17:30:11 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f2489c1

dev-lang/go: multiple live ebuild cleanups

- drop the kernel_* use flags
- clean up version tests
- do not run tests on releases
- use einstalldocs to install documentation

Package-Manager: Portage-2.3.0, Repoman-2.3.1

 dev-lang/go/go-9999.ebuild | 95 ++++++++++++++++++++++------------------------
 1 file changed, 46 insertions(+), 49 deletions(-)

diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
index 58d44c5..2be3584 100644
--- a/dev-lang/go/go-9999.ebuild
+++ b/dev-lang/go/go-9999.ebuild
@@ -13,42 +13,43 @@ inherit toolchain-funcs
 
 BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
 SRC_URI="!gccgo? (
-kernel_Darwin? (
-	x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap.tbz )
+amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap.tbz )
+arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap.tbz )
+arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap.tbz )
+ppc64? (
+	${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap.tbz
+	${BOOTSTRAP_DIST}/go-linux-ppc64le-bootstrap.tbz
 )
-kernel_FreeBSD? (
+s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-bootstrap.tbz )
+x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-1.tbz )
 amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-bootstrap.tbz )
 x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-bootstrap-1.tbz )
-)
-kernel_linux? (
-	amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap.tbz )
-	arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap.tbz )
-	arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap.tbz )
-	ppc64? (
-		${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap.tbz
-		${BOOTSTRAP_DIST}/go-linux-ppc64le-bootstrap.tbz
-	)
-	s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-bootstrap.tbz )
-	x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap-1.tbz )
-)
-kernel_SunOS? (
-	x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap.tbz )
-)
+x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap.tbz )
+x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-bootstrap.tbz )
 )
 "
 
-if [[ ${PV} = 9999 ]]; then
+case ${PV}  in
+*9999*)
 	EGIT_REPO_URI="git://github.com/golang/go.git"
 	inherit git-r3
-else
+	;;
+*)
 	SRC_URI+="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz"
+	S="${WORKDIR}"/go
 	case ${PV} in
-		*9999*|*_rc*) ;;
-		*)
-			KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
-			;;
+	*_beta*|*_rc*) ;;
+	*)
+		KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
+		# The upstream tests fail under portage but pass if the build is
+		# run according to their documentation [1].
+		# I am restricting the tests on released versions until this is
+		# solved.
+		# [1] https://golang.org/issues/18442
+		RESTRICT="test"
+		;;
 	esac
-fi
+esac
 
 DESCRIPTION="A concurrent garbage collected and typesafe programming language"
 HOMEPAGE="http://www.golang.org"
@@ -61,7 +62,11 @@ DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
 RDEPEND="!<dev-go/go-tools-0_pre20150902"
 
 # These test data objects have writable/executable stacks.
-QA_EXECSTACK="usr/lib/go/src/debug/elf/testdata/*.obj"
+QA_EXECSTACK="
+	usr/lib/go/src/debug/elf/testdata/*.obj
+	usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
+	usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
+	"
 
 # Do not complain about CFLAGS, etc, since Go doesn't use them.
 QA_FLAGS_IGNORED='.*'
@@ -71,16 +76,17 @@ REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
 # The tools in /usr/lib/go should not cause the multilib-strict check to fail.
 QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
 
-# The go language uses *.a files which are _NOT_ libraries and should not be
-# stripped. The test data objects should also be left alone and unstripped.
-STRIP_MASK="/usr/lib/go/pkg/*.a
-	/usr/lib/go/src/debug/elf/testdata/*
-	/usr/lib/go/src/debug/dwarf/testdata/*
-	/usr/lib/go/src/runtime/race/*.syso"
+# Do not strip this package. Stripping is unsupported upstream and may
+# fail.
+RESTRICT+="strip"
 
-if [[ ${PV} != 9999 ]]; then
-	S="${WORKDIR}"/go
-fi
+DOCS=(
+AUTHORS
+CONTRIBUTING.md
+CONTRIBUTORS
+PATENTS
+README.md
+)
 
 go_arch()
 {
@@ -190,25 +196,17 @@ src_test()
 
 	cd src
 	PATH="${GOBIN}:${PATH}" \
-		./run.bash -no-rebuild || die "tests failed"
+	./run.bash -no-rebuild || die "tests failed"
 }
 
 src_install()
 {
-	local bin_path f x
-
+	einstalldocs
 	dodir /usr/lib/go
-	insinto /usr/lib/go
-
-	# There is a known issue which requires the source tree to be installed [1].
-	# Once this is fixed, we can consider using the doc use flag to control
-	# installing the doc and src directories.
-	# [1] https://golang.org/issue/2775
-	doins -r bin doc lib pkg src
-	fperms -R +x /usr/lib/go/bin /usr/lib/go/pkg/tool
-
-	cp -a misc "${D}"/usr/lib/go/misc
+	# deliberately use cp to retain permissions
+	cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
 
+	local bin_path f x
 	if go_cross_compile; then
 		bin_path="bin/$(go_tuple)"
 	else
@@ -218,5 +216,4 @@ src_install()
 		f=${x##*/}
 		dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
 	done
-	dodoc AUTHORS CONTRIBUTORS PATENTS README.md
 }