go-sys-0_pre20150729.ebuild 929 B

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