summaryrefslogtreecommitdiff
path: root/dev-go
diff options
context:
space:
mode:
Diffstat (limited to 'dev-go')
-rw-r--r--dev-go/go-tools/Manifest1
-rw-r--r--dev-go/go-tools/go-tools-0_pre20150805.ebuild72
2 files changed, 73 insertions, 0 deletions
diff --git a/dev-go/go-tools/Manifest b/dev-go/go-tools/Manifest
index 5a0a1c192d91..d3a088537a6e 100644
--- a/dev-go/go-tools/Manifest
+++ b/dev-go/go-tools/Manifest
@@ -1,2 +1,3 @@
DIST go-favicon.ico 1150 SHA256 d76ca702a6d81e20ddd31c8c5a4368130e7c68d990600316f6f1c9509bd38ba7 SHA512 194c4b3c360321a10f714b6755d9155de6129682b4070d19b52d0d5706fcbd1d244ea38c33fd77fe1dec85b3e39720dd0a62f5b126803036fbc8337a9d72fea6 WHIRLPOOL f55a84a28812bffd1fa38e098e6ba7d757bdefc0e20c3d8ef767fb1bc7d6e2cfbb8d1ae0593e81cce17c27f60e6aacf094e6c67b1f592c0546090feab9d3830f
DIST go-tools-0_pre20150606.tar.gz 1625903 SHA256 d121fc152648283413bc0596a55edc229796a7640d2ba6e1fd31c4fc316bb32c SHA512 68904e9799f80c77b1ccda2483eea4dcb19825aaf94355f967d1b0c3547ebf85772c0e92d9b5ba2e492a8af1b4cd07037d121add3c42760d15ca41c05d1161ab WHIRLPOOL 2e5e51112b4ddf2f391c8131e0b84e4c73ddcfcedc46ee934700b45c9cac5c2ee6a4984c02fa80c2207bd39d6b903a68c72cddec0fabcdd14ec2c6a4c7c7f727
+DIST go-tools-0_pre20150805.tar.gz 1633388 SHA256 80db6fc563df50eb924dbf4f96cef287fc6b89cc8b98595c1dac3c80a118f290 SHA512 80813c2da74c7b25fa2cfd15b2505757e7f466469ac701cb22d190dc83a607f091c4dea207a2e371e53d7a1f5459e7b53e5eea53c95565e958a6eb7fcb212359 WHIRLPOOL 3b000f830d81c35e6f76a9883d9430eb7fe0f546a36579a150a7bd8f825146a0623726a98a7b7f764825c9fee30af1f89b3bbc98efeaf05fe8f64bbb127a1f68
diff --git a/dev-go/go-tools/go-tools-0_pre20150805.ebuild b/dev-go/go-tools/go-tools-0_pre20150805.ebuild
new file mode 100644
index 000000000000..10a1951112cd
--- /dev/null
+++ b/dev-go/go-tools/go-tools-0_pre20150805.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+EGO_PN="golang.org/x/tools/..."
+EGO_SRC="golang.org/x/tools"
+
+if [[ ${PV} = *9999* ]]; then
+ inherit golang-vcs
+else
+ EGIT_COMMIT="d02228d1857b9f49cd0252788516ff5584266eb6"
+ ARCHIVE_URI="https://github.com/golang/tools/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+ inherit golang-vcs-snapshot
+fi
+inherit golang-build
+
+DESCRIPTION="Go Tools"
+HOMEPAGE="https://godoc.org/golang.org/x/tools"
+SRC_URI="${ARCHIVE_URI}
+ http://golang.org/favicon.ico -> go-favicon.ico"
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+DEPEND="dev-go/go-net:="
+RDEPEND=""
+RESTRICT="test"
+
+src_prepare() {
+ # Add favicon to the godoc web interface (bug 551030)
+ cp "${DISTDIR}"/go-favicon.ico "src/${EGO_SRC}/godoc/static/favicon.ico" ||
+ die
+ sed -e 's:"example.html",:\0\n\t"favicon.ico",:' \
+ -i src/${EGO_SRC}/godoc/static/makestatic.go || die
+ sed -e 's:<link type="text/css":<link rel="icon" type="image/png" href="/lib/godoc/favicon.ico">\n\0:' \
+ -i src/${EGO_SRC}/godoc/static/godoc.html || die
+}
+
+src_compile() {
+ # Generate static.go with favicon included
+ pushd src/golang.org/x/tools/godoc/static >/dev/null || die
+ go run makestatic.go || die
+ popd >/dev/null
+
+ # Create a writable GOROOT in order to avoid sandbox violations.
+ cp -sR "$(go env GOROOT)" "${T}/goroot" || die
+ export GOROOT="${T}/goroot"
+ rm -rf "${GOROOT}/src/${EGO_SRC}" || die
+ rm -rf "${GOROOT}/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" || die
+ golang-build_src_compile
+}
+
+src_install() {
+ local x
+ golang-build_src_install
+ export -n GOROOT
+ exeopts -m0755 -p # preserve timestamps for bug 551486
+ exeinto "$(go env GOROOT)/bin"
+ doexe bin/*
+
+ # godoc ends up in ${GOROOT}/bin
+ dodir /usr/bin
+ while read -r -d '' x; do
+ doexe "${x}"
+ ln "${ED}"usr/{lib/go/bin,bin}/${x##*/} || die
+ done < <(find "${GOROOT}/bin" -type f -print0)
+
+ exeinto "$(go env GOTOOLDIR)"
+ doexe "${GOROOT}/pkg/tool/$(go env GOOS)_$(go env GOARCH)/cover"
+ doexe "${GOROOT}/pkg/tool/$(go env GOOS)_$(go env GOARCH)/vet"
+}