dev-go/go-tools: sync live ebuild
authorWilliam Hubbs <williamh@gentoo.org>
Thu, 27 Aug 2015 15:02:06 +0000 (10:02 -0500)
committerWilliam Hubbs <williamh@gentoo.org>
Thu, 27 Aug 2015 15:02:33 +0000 (10:02 -0500)
Package-Manager: portage-2.2.20.1

dev-go/go-tools/go-tools-9999.ebuild

index ac8982ed2b2ee09d8e7155deae4568835b0578f0..030ff9e2a489aa46d59f4a6c45842fee5333d4ee 100644 (file)
@@ -81,7 +81,12 @@ src_install() {
        cp -sR "$(go env GOROOT)" "${T}/goroot" || die
 
        GOROOT="${T}/goroot" golang-build_src_install
-       dobin bin/* "${T}/goroot/bin/godoc"
+
+       # bug 558818: install binaries in $GOROOT/bin to avoid file collisions
+       exeinto "$(go env GOROOT)/bin"
+       doexe bin/* "${T}/goroot/bin/godoc"
+       dodir /usr/bin
+       ln "${ED}$(go env GOROOT)/bin/godoc" "${ED}usr/bin/godoc" || die
 
        if has_version '<dev-lang/go-1.5'; then
                exeinto "$(go env GOTOOLDIR)"
@@ -89,7 +94,7 @@ src_install() {
                doexe "${T}/goroot/pkg/tool/$(go env GOOS)_$(go env GOARCH)/cover"
                doexe "${T}/goroot/pkg/tool/$(go env GOOS)_$(go env GOARCH)/vet"
        else
-               rm "${D}"/usr/bin/{cover,vet} ||
+               rm "${D}"$(go env GOROOT)/bin/{cover,vet} ||
                        die "unable to remove cover and vet"
        fi
 }