diff options
Diffstat (limited to 'dev-go/go-tools')
-rw-r--r-- | dev-go/go-tools/Manifest | 11 | ||||
-rw-r--r-- | dev-go/go-tools/go-tools-0_pre20150823-r1.ebuild | 99 | ||||
-rw-r--r-- | dev-go/go-tools/go-tools-0_pre20150902.ebuild | 98 | ||||
-rw-r--r-- | dev-go/go-tools/go-tools-0_pre20160121.ebuild | 105 | ||||
-rw-r--r-- | dev-go/go-tools/go-tools-0_pre20160220.ebuild | 105 | ||||
-rw-r--r-- | dev-go/go-tools/go-tools-9999.ebuild | 99 | ||||
-rw-r--r-- | dev-go/go-tools/metadata.xml | 10 |
7 files changed, 527 insertions, 0 deletions
diff --git a/dev-go/go-tools/Manifest b/dev-go/go-tools/Manifest new file mode 100644 index 000000000000..910800e4ccd7 --- /dev/null +++ b/dev-go/go-tools/Manifest @@ -0,0 +1,11 @@ +DIST go-favicon.ico 1150 BLAKE2B 7cef9e0c7031531ceaddc56b9e7cb8c09cf3ebf08bbdd53876edcf48d412c55968268190b1fe1814e21efc5669618a5e07d30d7bdbb73b4cbeca9a31b3185fc5 SHA512 194c4b3c360321a10f714b6755d9155de6129682b4070d19b52d0d5706fcbd1d244ea38c33fd77fe1dec85b3e39720dd0a62f5b126803036fbc8337a9d72fea6 +DIST go-tools-0_pre20150823.tar.gz 1633447 BLAKE2B 00866c14139099821fc883ab3908b47481a3ea5af323977fdd84622f43e8998a6fcf6c0a4cbf0c6bb98494d1f4b1fdd0d281447b67a0766af1e5b4f68cf24e27 SHA512 6d906bae8433182e7a105a46b92c4f64ac145196ccc72f8934376fc49e5d554182931745e92229c4571323a6eba9ce2f680b5add3844ecb593a194cbbc1b0b63 +DIST go-tools-0_pre20150902.tar.gz 1630401 BLAKE2B 5f23e4d05c614584bfd2ac77d15ad4b464f083b489b1a687a823d014d848ce38ac5006a379eb46f37e7aba0419b7f1b4d48c053aae89c6ac912366e5ddc487c3 SHA512 437d5178ce5bf6c4d39ad638259e7c18150d2574dffb632003fa0b83a61a9103e666e562aecc6e8412d995e4b5ffacda6bc12b1cfbbea0b22a5ff680a0a7e3e1 +DIST go-tools-0_pre20160121.tar.gz 1768660 BLAKE2B ebc7622967dbb82c6578591c108bba8c96cb7df56360d445b02de1da905ac64b4901057acd36e3d2ab5ec51e5e2ff206efae6a9f9523180e53434adcdad278e3 SHA512 ca4b213a6f398f9bb61a81784fb6dcb4a82994e2d7a95134fc5203ce0f65848d192b2d7c8975a59199db873942c23562866a5607347e060ac0af370d72e067e2 +DIST go-tools-0_pre20160220.tar.gz 1827046 BLAKE2B 26b4080540958764c42fffc1cb6a1597705c0a7ea85357b5169f9a0bf6939d7c5475681f6fede8b46a88ef58c72afa9eaa9da3fb66a3bbbb19942d0a1887bbeb SHA512 95c9deb9b01b2f294818fcc847e457ab313d5831a839bf9cfeb1a00a0efd833de3fdfd3ecfe7ecfa2dd236ffcf963e73205d7b5b25fa41ab51c7601dc632bce1 +EBUILD go-tools-0_pre20150823-r1.ebuild 3217 BLAKE2B 1ac7bed44e714f46544857f3dbbea304d23a9de3c6c36962f52596e6b8546ba0d481a67e6b91887ebf3851ab7ec38be1179d1b2b30fd63cc48029d0bf2925730 SHA512 7d2841db649dbe546a455e806417c0c58ee3daec4e7b88412d5a685a2f8923a1a3333f5f24fc87c6adf5c53498119cc84086eeb68d60b1098020a08cb8440cc9 +EBUILD go-tools-0_pre20150902.ebuild 3070 BLAKE2B ab9142caa3795a49f3a6fbf8a8ead9cd15563f86d065237a510159b316f4c8131835fc2336ad81a7ad96f204ae62a471e369b9bc6bcebb95c4c529febcb2a54f SHA512 acebcbae352d8036010f5c0837c06d672285b2bff354dd306290c71e040d7564e1a871a47382c12a3ff7cf7b12983a6c2d756cda42086acaa71d14632a130972 +EBUILD go-tools-0_pre20160121.ebuild 3466 BLAKE2B e26e9b721cf2f51967a9d8eb4b748c5514f6fdae47adc1f86a4fb6841044cd4d8db9b8aa9a63e54664816435201ac3e66df17a0aa4b6898f7b99e60763e87faa SHA512 0fa231782f3702f1d5dc7aa9132958b3328a89b31468292c61021d55af40756e59ba0a299d64e86547eb506865e09dc11cc3c6530a0ca1f1510ca2f4cff809e5 +EBUILD go-tools-0_pre20160220.ebuild 3479 BLAKE2B 0c985cf0b27aee2600ad5099e126f306c8a1d4c96c810306cef20bb1cc450c88783cd2a818fedb474a2b5c58ac1223ef95ca3279441d6678ff4d13319a4820f8 SHA512 90edc996457245773d17ee74f14ab23902ba62e9d184fd1869b11e68d800e129b48bf2599a682a01bd4ad1d86123cc200f4a7f5524bbbf5263f14b9660b94643 +EBUILD go-tools-9999.ebuild 3217 BLAKE2B 1ac7bed44e714f46544857f3dbbea304d23a9de3c6c36962f52596e6b8546ba0d481a67e6b91887ebf3851ab7ec38be1179d1b2b30fd63cc48029d0bf2925730 SHA512 7d2841db649dbe546a455e806417c0c58ee3daec4e7b88412d5a685a2f8923a1a3333f5f24fc87c6adf5c53498119cc84086eeb68d60b1098020a08cb8440cc9 +MISC metadata.xml 303 BLAKE2B ca3493d6189da59891e1f4627c08bdeb6eddce60e7c9dc4a6b90118b76cccdc67d0be1b3ecc62acf37da168654b21f1a0dd0e8968901631850599f02caf3bcbc SHA512 cdcd8e3342ce58c499a670fa5ad75301d6f90dc6275b745d796dc8c0470005bfb37ccb6193c935f0d12cc6d4b9b9959b4fee7bdc7e660bef944d925c22393ccf diff --git a/dev-go/go-tools/go-tools-0_pre20150823-r1.ebuild b/dev-go/go-tools/go-tools-0_pre20150823-r1.ebuild new file mode 100644 index 000000000000..3fcfd947ef6d --- /dev/null +++ b/dev-go/go-tools/go-tools-0_pre20150823-r1.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +EGO_PN="golang.org/x/tools/..." +EGO_SRC="golang.org/x/tools" + +if [[ ${PV} = *9999* ]]; then + inherit golang-vcs +else + EGIT_COMMIT="6c9aff3" + 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/${PVR}" +IUSE="" +DEPEND="dev-go/go-net:=" +RDEPEND="" + +src_prepare() { + # disable broken tests + sed -e 's:TestWeb(:_\0:' \ + -i src/${EGO_SRC}/cmd/godoc/godoc_test.go || die + sed -e 's:TestVet(:_\0:' \ + -i src/${EGO_SRC}/cmd/vet/vet_test.go || die + sed -e 's:TestImport(:_\0:' \ + -i src/${EGO_SRC}/go/gcimporter/gcimporter_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${EGO_SRC}/go/importer/import_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/go/loader/stdlib_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/stdlib_test.go || die + sed -e 's:TestGorootTest(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -e 's:TestTestmainPackage(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/interp/interp_test.go || die + sed -e 's:TestBar(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/interp/testdata/a_test.go || die + sed -e 's:TestCheck(:_\0:' \ + -i src/${EGO_SRC}/go/types/check_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -e 's:TestStdFixed(:_\0:' \ + -e 's:TestStdKen(:_\0:' \ + -i src/${EGO_SRC}/go/types/stdlib_test.go || die + sed -e 's:TestRepoRootForImportPath(:_\0:' \ + -i src/${EGO_SRC}/go/vcs/vcs_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/refactor/lexical/lexical_test.go || die + + # 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 + + golang-build_src_compile +} + +src_install() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + + GOROOT="${T}/goroot" golang-build_src_install + + # 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)" + exeopts -m0755 -p # preserve timestamps for bug 551486 + 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}"$(go env GOROOT)/bin/{cover,vet} || + die "unable to remove cover and vet" + fi +} diff --git a/dev-go/go-tools/go-tools-0_pre20150902.ebuild b/dev-go/go-tools/go-tools-0_pre20150902.ebuild new file mode 100644 index 000000000000..552b4705291a --- /dev/null +++ b/dev-go/go-tools/go-tools-0_pre20150902.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +EGO_PN="golang.org/x/tools/..." + +if [[ ${PV} = *9999* ]]; then + inherit golang-vcs +else + EGIT_COMMIT="1330b28" + 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/${PVR}" +IUSE="" +DEPEND="dev-go/go-net:= + >=dev-lang/go-1.5" +RDEPEND="!<dev-lang/go-1.5" + +src_prepare() { + local go_src="${EGO_PN%/...}" + # disable broken tests + sed -e 's:TestWeb(:_\0:' \ + -i src/${go_src}/cmd/godoc/godoc_test.go || die + sed -e 's:TestVet(:_\0:' \ + -i src/${go_src}/cmd/vet/vet_test.go || die + sed -e 's:TestImport(:_\0:' \ + -i src/${go_src}/go/gcimporter/gcimporter_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${go_src}/go/importer/import_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${go_src}/go/loader/stdlib_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${go_src}/go/ssa/stdlib_test.go || die + sed -e 's:TestGorootTest(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -e 's:TestTestmainPackage(:_\0:' \ + -i src/${go_src}/go/ssa/interp/interp_test.go || die + sed -e 's:TestBar(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -i src/${go_src}/go/ssa/interp/testdata/a_test.go || die + sed -e 's:TestCheck(:_\0:' \ + -i src/${go_src}/go/types/check_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -e 's:TestStdFixed(:_\0:' \ + -e 's:TestStdKen(:_\0:' \ + -i src/${go_src}/go/types/stdlib_test.go || die + sed -e 's:TestRepoRootForImportPath(:_\0:' \ + -i src/${go_src}/go/vcs/vcs_test.go || die + + # Add favicon to the godoc web interface (bug 551030) + cp "${DISTDIR}"/go-favicon.ico "src/${go_src}/godoc/static/favicon.ico" || + die + sed -e 's:"example.html",:\0\n\t"favicon.ico",:' \ + -i src/${go_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/${go_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 + + golang-build_src_compile +} + +src_test() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + mkdir -p "${T}/goroot/test" || die + GOROOT="${T}/goroot" golang-build_src_test + rm -rf "${T}/goroot" +} + +src_install() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + + GOROOT="${T}/goroot" golang-build_src_install + + # 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 + + rm "${D}"$(go env GOROOT)/bin/{cover,vet} || die +} diff --git a/dev-go/go-tools/go-tools-0_pre20160121.ebuild b/dev-go/go-tools/go-tools-0_pre20160121.ebuild new file mode 100644 index 000000000000..2ab6225e7dbb --- /dev/null +++ b/dev-go/go-tools/go-tools-0_pre20160121.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +EGO_PN="golang.org/x/tools/..." + +if [[ ${PV} = *9999* ]]; then + inherit golang-vcs +else + EGIT_COMMIT="f3a63969dd29f8cfa913fdaea22f30c1ed537cb3" + 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/${PVR}" +IUSE="" +DEPEND="dev-go/go-net:= + >=dev-lang/go-1.5" +RDEPEND="!<dev-lang/go-1.5" + +src_prepare() { + local go_src="${EGO_PN%/...}" + # disable broken tests + sed -e 's:TestWeb(:_\0:' \ + -e 's:TestWebIndex(:_\0:' \ + -i src/${go_src}/cmd/godoc/godoc_test.go || die + sed -e 's:TestVet(:_\0:' \ + -e 's:TestDivergentPackagesExamples(:_\0:' \ + -e 's:TestIncompleteExamples(:_\0:' \ + -i src/${go_src}/cmd/vet/vet_test.go || die + sed -e 's:TestImport(:_\0:' \ + -i src/${go_src}/go/gcimporter/gcimporter_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${go_src}/go/gcimporter15/gcimporter_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${go_src}/go/importer/import_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${go_src}/go/loader/stdlib_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${go_src}/go/ssa/stdlib_test.go || die + sed -e 's:TestGorootTest(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -e 's:TestTestmainPackage(:_\0:' \ + -i src/${go_src}/go/ssa/interp/interp_test.go || die + sed -e 's:TestBar(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -i src/${go_src}/go/ssa/interp/testdata/a_test.go || die + sed -e 's:TestCheck(:_\0:' \ + -i src/${go_src}/go/types/check_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -e 's:TestStdFixed(:_\0:' \ + -e 's:TestStdKen(:_\0:' \ + -i src/${go_src}/go/types/stdlib_test.go || die + sed -e 's:TestRepoRootForImportPath(:_\0:' \ + -i src/${go_src}/go/vcs/vcs_test.go || die + + # Add favicon to the godoc web interface (bug 551030) + cp "${DISTDIR}"/go-favicon.ico "src/${go_src}/godoc/static/favicon.ico" || + die + sed -e 's:"example.html",:\0\n\t"favicon.ico",:' \ + -i src/${go_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/${go_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 + + golang-build_src_compile +} + +src_test() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + mkdir -p "${T}/goroot/test" || die + GOROOT="${T}/goroot" golang-build_src_test + rm -rf "${T}/goroot" +} + +src_install() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + cp -sR "$(get_golibdir_gopath)" "${T}/gopath" || die + + GOROOT="${T}/goroot" GOPATH="${WORKDIR}/${P}:${T}/gopath" go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die + golang_install_pkgs + + # 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 + + rm "${D}"$(go env GOROOT)/bin/{cover,vet} || die +} diff --git a/dev-go/go-tools/go-tools-0_pre20160220.ebuild b/dev-go/go-tools/go-tools-0_pre20160220.ebuild new file mode 100644 index 000000000000..da04f9371b08 --- /dev/null +++ b/dev-go/go-tools/go-tools-0_pre20160220.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +EGO_PN="golang.org/x/tools/..." + +if [[ ${PV} = *9999* ]]; then + inherit golang-vcs +else + EGIT_COMMIT="ee8cb08bfe4453a27a4bd7c86a917800d339c5ac" + 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/${PVR}" +IUSE="" +DEPEND="dev-go/go-net:= + >=dev-lang/go-1.5" +RDEPEND="!<dev-lang/go-1.5" + +src_prepare() { + local go_src="${EGO_PN%/...}" + # disable broken tests + rm src/${go_src}/cmd/bundle/main_test.go || die + sed -e 's:TestWeb(:_\0:' \ + -e 's:TestWebIndex(:_\0:' \ + -i src/${go_src}/cmd/godoc/godoc_test.go || die + sed -e 's:TestVet(:_\0:' \ + -e 's:TestDivergentPackagesExamples(:_\0:' \ + -e 's:TestIncompleteExamples(:_\0:' \ + -i src/${go_src}/cmd/vet/vet_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${go_src}/go/gcimporter15/gcimporter_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${go_src}/go/importer/import_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${go_src}/go/loader/stdlib_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${go_src}/go/ssa/stdlib_test.go || die + sed -e 's:TestGorootTest(:_\0:' \ + -e 's:TestTestmainPackage(:_\0:' \ + -i src/${go_src}/go/ssa/interp/interp_test.go || die + sed -e 's:TestBar(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -i src/${go_src}/go/ssa/interp/testdata/a_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -e 's:TestStdFixed(:_\0:' \ + -e 's:TestStdKen(:_\0:' \ + -i src/${go_src}/go/types/stdlib_test.go || die + sed -e 's:TestFindImportVendor(:_\0:' \ + -e 's:TestProcessVendor(:_\0:' \ + -i src/${go_src}/imports/fix_test.go || die + + # Add favicon to the godoc web interface (bug 551030) + cp "${DISTDIR}"/go-favicon.ico "src/${go_src}/godoc/static/favicon.ico" || + die + sed -e 's:"example.html",:\0\n\t"favicon.ico",:' \ + -i src/${go_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/${go_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 + + golang-build_src_compile +} + +src_test() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + mkdir -p "${T}/goroot/test" || die + GOROOT="${T}/goroot" golang-build_src_test + rm -rf "${T}/goroot" +} + +src_install() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + cp -sR "$(get_golibdir_gopath)" "${T}/gopath" || die + + GOROOT="${T}/goroot" GOPATH="${WORKDIR}/${P}:${T}/gopath" go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die + golang_install_pkgs + + # bug 558818: install binaries in $GOROOT/bin to avoid file collisions + exeinto "$(go env GOROOT)/bin" + doexe bin/* + # godoc location varies depending on whether or not it's + # installed on the system (bug 591656) + [[ -e bin/godoc ]] || doexe "${T}/goroot/bin/godoc" + dodir /usr/bin + ln "${ED}$(go env GOROOT)/bin/godoc" "${ED}usr/bin/godoc" || die + + rm "${D}"$(go env GOROOT)/bin/{cover,vet} || die +} diff --git a/dev-go/go-tools/go-tools-9999.ebuild b/dev-go/go-tools/go-tools-9999.ebuild new file mode 100644 index 000000000000..3fcfd947ef6d --- /dev/null +++ b/dev-go/go-tools/go-tools-9999.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +EGO_PN="golang.org/x/tools/..." +EGO_SRC="golang.org/x/tools" + +if [[ ${PV} = *9999* ]]; then + inherit golang-vcs +else + EGIT_COMMIT="6c9aff3" + 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/${PVR}" +IUSE="" +DEPEND="dev-go/go-net:=" +RDEPEND="" + +src_prepare() { + # disable broken tests + sed -e 's:TestWeb(:_\0:' \ + -i src/${EGO_SRC}/cmd/godoc/godoc_test.go || die + sed -e 's:TestVet(:_\0:' \ + -i src/${EGO_SRC}/cmd/vet/vet_test.go || die + sed -e 's:TestImport(:_\0:' \ + -i src/${EGO_SRC}/go/gcimporter/gcimporter_test.go || die + sed -e 's:TestImportStdLib(:_\0:' \ + -i src/${EGO_SRC}/go/importer/import_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/go/loader/stdlib_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/stdlib_test.go || die + sed -e 's:TestGorootTest(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -e 's:TestTestmainPackage(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/interp/interp_test.go || die + sed -e 's:TestBar(:_\0:' \ + -e 's:TestFoo(:_\0:' \ + -i src/${EGO_SRC}/go/ssa/interp/testdata/a_test.go || die + sed -e 's:TestCheck(:_\0:' \ + -i src/${EGO_SRC}/go/types/check_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -e 's:TestStdFixed(:_\0:' \ + -e 's:TestStdKen(:_\0:' \ + -i src/${EGO_SRC}/go/types/stdlib_test.go || die + sed -e 's:TestRepoRootForImportPath(:_\0:' \ + -i src/${EGO_SRC}/go/vcs/vcs_test.go || die + sed -e 's:TestStdlib(:_\0:' \ + -i src/${EGO_SRC}/refactor/lexical/lexical_test.go || die + + # 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 + + golang-build_src_compile +} + +src_install() { + # Create a writable GOROOT in order to avoid sandbox violations. + cp -sR "$(go env GOROOT)" "${T}/goroot" || die + + GOROOT="${T}/goroot" golang-build_src_install + + # 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)" + exeopts -m0755 -p # preserve timestamps for bug 551486 + 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}"$(go env GOROOT)/bin/{cover,vet} || + die "unable to remove cover and vet" + fi +} diff --git a/dev-go/go-tools/metadata.xml b/dev-go/go-tools/metadata.xml new file mode 100644 index 000000000000..4c43d451b579 --- /dev/null +++ b/dev-go/go-tools/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">golang/tools</remote-id> + </upstream> +</pkgmetadata> |