summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-02-11 01:22:55 -0800
committerZac Medico <zmedico@gentoo.org>2016-02-11 01:25:02 -0800
commitcc180f4e8a629f1a0ee47e95a5d2c1c87c821028 (patch)
treeb22cfc8f78c073385e15fb232122340491e65df8 /dev-go/go-tour/go-tour-0_p20160209.ebuild
parentros-meta/mavros: Bump to 0.17.0. (diff)
downloadgentoo-cc180f4e8a629f1a0ee47e95a5d2c1c87c821028.tar.gz
gentoo-cc180f4e8a629f1a0ee47e95a5d2c1c87c821028.tar.bz2
gentoo-cc180f4e8a629f1a0ee47e95a5d2c1c87c821028.zip
dev-go/go-tour: new package
Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-go/go-tour/go-tour-0_p20160209.ebuild')
-rw-r--r--dev-go/go-tour/go-tour-0_p20160209.ebuild36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-go/go-tour/go-tour-0_p20160209.ebuild b/dev-go/go-tour/go-tour-0_p20160209.ebuild
new file mode 100644
index 000000000000..10593aa2de16
--- /dev/null
+++ b/dev-go/go-tour/go-tour-0_p20160209.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+EGO_PN="golang.org/x/tour/..."
+
+EGIT_COMMIT="6b2e5b35ce8ed092eaedc3d2a2294373a639f122"
+ARCHIVE_URI="https://github.com/golang/tour/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+inherit golang-vcs-snapshot golang-build
+
+DESCRIPTION="A Tour of Go"
+HOMEPAGE="https://tour.golang.org"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+src_compile() {
+ # Create a writable GOROOT in order to avoid sandbox violations.
+ cp -sR "$(go env GOROOT)" "${T}/goroot" || die
+ rm -rf "${T}/goroot/src/${EGO_PN%/*}" || die
+ GOROOT="${T}/goroot" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
+ go build -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}"
+ [[ -x $(find "${T}" -name a.out) ]] || die "a.out not found"
+}
+
+src_install() {
+ GOROOT="${T}/goroot" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \
+ go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}"
+ exeinto "$(go env GOTOOLDIR)"
+ newexe bin/gotour tour
+ insinto "$(go env GOROOT)"
+ doins -r src
+}