Skip to content

Commit

Permalink
dev-lang/go: make live ebuild use our provided bootstrap tarballs
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh committed Feb 23, 2016
1 parent 92000a4 commit 2302d6f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
8 changes: 8 additions & 0 deletions dev-lang/go/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
DIST go-darwin-amd64-bootstrap.tbz 48361403 SHA256 afb6cc976c404933e68ee3125fe8fbf94b57b9d8db8501d2bd1ce692468fbc9b SHA512 aefaad5abd58ed96cf5658bae2e931f162c2699fb248104837a279955dea6fe6cd4d582766379d2689c04bdc009c19a19f17585d8401d49d1fac772dcf385b93 WHIRLPOOL aa1c06103ae72f0b1c62cccd82b1fa88c5310d3baad2d9eddd173322c04ad7a7b7b9fb6ac9407c8002c6eebb8691cd415bca3d50a17548d52a5022001c6b93e2
DIST go-freebsd-386-bootstrap.tbz 47059629 SHA256 3cb5f0ce9f878682da458f266dc954829dec7cfc4c269c233abceaad4061e671 SHA512 39a48b78542095e1c2115e2d833ac6b4b4c9e03b8974ad3e5d48701f36cc383c9434d075e73b65343055677d2d83c4556e416ac90a71b3e2a4f0789adfa02888 WHIRLPOOL ff39a6ba507b9d200817a09dcfe045fd1a79fad03b824ed6cf3df8fa937d345ccc2d0d1dfad3f5cb38151b9674ab00b10aabe788ce8dd67a74251ab7aeae0209
DIST go-freebsd-amd64-bootstrap.tbz 48451024 SHA256 c5b16adab514352f49eb9ffef0d499e954d5d6bb6aefc8e98543d24e2a8fd7b7 SHA512 097a48c9b3b7541b6c4aab6fe9304b7df461e31543609b836842294a2acecf14243d0efc80282b2e442f6be92d7e189dddab6ffd4487b115d94113205452352e WHIRLPOOL 691cecccc01383bd874e687c3644ceab06c33d3c9c57da737c2c1f8208dcc6d99bc18968f50c4e466049069f219e39f34ee8a8b6af0f667f31ae011528f4c591
DIST go-linux-386-bootstrap.tbz 47156176 SHA256 ced390085b26074d805fe64a4bd4da618c5aa086fb5944d6df8df4a96aba05fc SHA512 d4236df8d71afa6afad0d90c1c84a3a27e7e9f4ab6a613a92ac52eeeed3303e097ab3f18a04af66928a6169c78bc73b85836755729695d2a0f65ddf0f6fde9ca WHIRLPOOL 30328edff5a8c4efac8a4f5336f09744d5fe8bc9ab2925eed5a5fc7a17c8e54f35badf6daf75a65e62237e4c2a52fe29a2baacd6c7463aa0c735a64bc5e91c0a
DIST go-linux-amd64-bootstrap.tbz 48722911 SHA256 0ab0842fb1f6cc6f10a85f225ff1a2b9e5e4b38128a7136d0c1896819421a986 SHA512 ce4dbc979b63a4612f4a8f7e7a6c5247e11bbc3a2d62ab0537a1b405ec8ab22f153012421d2240a7d6a4f91a79bb3f1370454f9e843fac43b99757c17134e5b7 WHIRLPOOL a94d0e0a1c44e3385d23f8973d15e6ef041450a3578c38987f158c4f9f231d315bc5204539d9dc7322cc9ecb96b7618b22d023f906474e1348c5d666792dff58
DIST go-linux-arm-bootstrap.tbz 46055976 SHA256 a44e33b95046e01fd7125c3cc3c34b13f83bbf692cddfd3e86e267da11de2a44 SHA512 a8cf3225dafd2f08b944e60d0fb6320b5e394646f5df2ca2464c76a2e6e6b72f4840ddcc65dc5f59c94907715780f1e25c73b480a79909d9455faad59ffd38d5 WHIRLPOOL 304bb37f94b8f5d0bd77c0d5faebed1cb627cc3b453c686d7297f6542ee3e0ddabc7139e13a21ee2f5a20caca273c63bcfbcbd4daf670b1dbfe77b599f8111ac
DIST go-linux-arm64-bootstrap.tbz 45369354 SHA256 810c998e6701580fe0f26d46c5796eefce648e252ff9d6d761304e60556b7fc0 SHA512 3f64869430c03efa77796ed74d07a337e2a205802485605cbdd67778a08e5ce041ce3925b7a5cca0a6b4ad24ab70e07ee54091b010f67ec7370a985022f5a21e WHIRLPOOL f6f470081d5f23c190310280aaf7454a4f58fe4e7545bbd219046711f8d27ce97cc5f5f1c207e777067d1f6332e4b3f2c819b178e899d21c2d5d1d466a42cc37
DIST go-linux-ppc64-bootstrap.tbz 45266082 SHA256 89902cebaf93b95dea225b7304eedcae101d6fb83bba0fcdfee001361b4868c0 SHA512 d013a1a5953207505a9f7e0c5cfdc7f463d4669fd18b36cf1df10126e9d4c012252bc4d207dd4503c34301e76197d8e89a9ed9d9d0b8a3b54b62e782b4c39d7b WHIRLPOOL 3ec868d94e8452a3cdb49a1292f9f32ebeb813ea297e419849cdee28c8d952887feb70e1095ce109ff6b8bb81dee47b7eb6f275b15bb6f46422095c3b260f968
DIST go1.4.2.src.tar.gz 10921896 SHA256 299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b SHA512 cda1a29d4418875dffaf3324004ddae8e1bbb573f7668e6e0c03d8b61284f4db7fca244c181f2859f8ccdd3db6391fb21e0d98a1a9fc15096c15883249d48a9c WHIRLPOOL d06c27f6ff3a6499a6c7cb3c5eccd53eb588896c4d837e1fe9855c22ee3caa5cc48fd68cbeceff105b7c47fafbbf0eb3dc28ee3af7196692c5bf18511c6760ef
DIST go1.5.3.src.tar.gz 12057623 SHA256 754e06dab1c31ab168fc9db9e32596734015ea9e24bc44cae7f237f417ce4efe SHA512 b348832ea7cb095cf793960cf9f4da5e9f6ca8de7b5262bb819de97efea4835643e30a18efd4a82d01ea3854a1905af9e134271716c4b68c9d2a8f6e15f65ff0 WHIRLPOOL aec869ec6af62601f6b83283417eef739141f99be938d419ef4a553028141e05ded7777fdff2a2d1a3e35e4976e4ec96a301b4875c509a370848d0df5dc9e0c8
DIST go1.6.src.tar.gz 12613308 SHA256 a96cce8ce43a9bf9b2a4c7d470bc7ee0cb00410da815980681c8353218dcf146 SHA512 59e9d72a80558fd5e3f176e068897a45333b36e35f6c00393647941a70e741168e65941b6059397378020c3b78ec3471a48809682f7efd97cf33eec6325fc3e8 WHIRLPOOL c6debe1a5039f0ca34c29b4a53f958503a724cae13715ea14f0237b5faacd26e09eb6405462e22abd6806540dd8fb9eb2fa08ff6e8676b0f6dffa267210f5eac
34 changes: 30 additions & 4 deletions dev-lang/go/go-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,35 @@ MY_PV=${PV/_/}

inherit toolchain-funcs

BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
SRC_URI="
kernel_Darwin? (
x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-bootstrap.tbz )
)
kernel_FreeBSD? (
amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-bootstrap.tbz )
x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-bootstrap.tbz )
)
kernel_linux? (
amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-bootstrap.tbz )
arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-bootstrap.tbz )
arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-bootstrap.tbz )
ppc64? ( ${BOOTSTRAP_DIST}/go-linux-ppc64-bootstrap.tbz )
x86? ( ${BOOTSTRAP_DIST}/go-linux-386-bootstrap.tbz )
)
"

if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="git://github.com/golang/go.git"
inherit git-r3
else
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz"
SRC_URI+="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz"
# go-bootstrap-1.4 only supports go on amd64, arm and x86 architectures.
# Allowing other bootstrap options would enable arm64 and ppc64 builds.
case ${PV} in
*9999*|*_rc*) ;;
*)
KEYWORDS="-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos"
KEYWORDS="-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
;;
esac
fi
Expand All @@ -33,7 +51,7 @@ LICENSE="BSD"
SLOT="0/${PV}"
IUSE=""

DEPEND=">=dev-lang/go-bootstrap-1.4.1"
DEPEND=""
RDEPEND="!<dev-go/go-tools-0_pre20150902"

# These test data objects have writable/executable stacks.
Expand Down Expand Up @@ -114,9 +132,17 @@ pkg_pretend()
fi
}

src_unpack()
{
if [[ ${PV} = 9999 ]]; then
git-r3_src_unpack
fi
default
}

src_compile()
{
export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go1.4
export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
export GOROOT="$(pwd)"
export GOBIN="${GOROOT}/bin"
Expand Down

0 comments on commit 2302d6f

Please sign in to comment.