3a8840f6c759e000e657b7633b0f58a08ede409b
[gentoo.git] / dev-go / go-sys / go-sys-0_pre20150729.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 EGO_PN=golang.org/x/sys/...
6 EGO_SRC=golang.org/x/sys
7
8 if [[ ${PV} = *9999* ]]; then
9         inherit golang-vcs
10 else
11         KEYWORDS="~amd64"
12 EGIT_COMMIT="58da1121af381632b48b2843aeb16299f2e1dc50"
13         SRC_URI="https://github.com/golang/sys/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
14         inherit golang-vcs-snapshot
15 fi
16 inherit golang-build
17
18 DESCRIPTION="Go packages for low-level interaction with the operating system"
19 HOMEPAGE="https://godoc.org/golang.org/x/sys"
20 LICENSE="BSD"
21 SLOT="0/${PVR}"
22 IUSE=""
23 DEPEND=""
24 RDEPEND=""
25
26 src_compile() {
27         # Create a writable GOROOT in order to avoid sandbox violations.
28         cp -sR "$(go env GOROOT)" "${T}/goroot" || die
29         rm -rf "${T}/goroot/src/${EGO_SRC}" || die
30         rm -rf "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" || die
31         export GOROOT="${T}/goroot"
32         golang-build_src_compile
33 }