Initial commit of go-bootstrap for bug #536960.
authorWilliam Hubbs <williamh@gentoo.org>
Tue, 20 Jan 2015 03:39:51 +0000 (03:39 +0000)
committerWilliam Hubbs <williamh@gentoo.org>
Tue, 20 Jan 2015 03:39:51 +0000 (03:39 +0000)
go-bootstrap is intended only as a build time dependency used to build
newer versions of go.
See https://golang.org/s/go15bootstrap for how this works.

Package-Manager: portage-2.2.15/cvs/Linux x86_64
Manifest-Sign-Key: 0x30C46538

dev-lang/go-bootstrap/ChangeLog [new file with mode: 0644]
dev-lang/go-bootstrap/Manifest [new file with mode: 0644]
dev-lang/go-bootstrap/go-bootstrap-1.4.1.ebuild [new file with mode: 0644]
dev-lang/go-bootstrap/metadata.xml [new file with mode: 0644]

diff --git a/dev-lang/go-bootstrap/ChangeLog b/dev-lang/go-bootstrap/ChangeLog
new file mode 100644 (file)
index 0000000..cc212d7
--- /dev/null
@@ -0,0 +1,13 @@
+# ChangeLog for dev-lang/go-bootstrap
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/go-bootstrap/ChangeLog,v 1.1 2015/01/20 03:39:35 williamh Exp $
+
+*go-bootstrap-1.4.1 (20 Jan 2015)
+
+  20 Jan 2015; William Hubbs <williamh@gentoo.org> +go-bootstrap-1.4.1.ebuild,
+  +metadata.xml:
+  Initial commit of go-bootstrap for bug #536960.
+  go-bootstrap is intended only as a build time dependency used to build
+  newer versions of go.
+  See https://golang.org/s/go15bootstrap for how this works.
+
diff --git a/dev-lang/go-bootstrap/Manifest b/dev-lang/go-bootstrap/Manifest
new file mode 100644 (file)
index 0000000..a78b6af
--- /dev/null
@@ -0,0 +1,14 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST go1.4.1.src.tar.gz 10921282 SHA256 3d9bb27ad4be51f60dc44f3d0026036ef07142797b1df1b5ae816277e6c31bb3 SHA512 47cbd67cdca8d67e8d09fee6d9a9fd5ddfa65f59413bd583c83b27c598f7b1b23e51e894888c10202bada560a16758eb847bff963d77726724aefecaea5cf644 WHIRLPOOL 0e63fce9674204c79dafad2daea1b8e097370ae7a5b5ee0e463235925cec4a3e74fa0980de8fe6fa1adbc072c2921cef494c5eafe251fe4e26a0f1586bd217e0
+EBUILD go-bootstrap-1.4.1.ebuild 2066 SHA256 5c5ff9487daf58cb540674f4f1251bad65153d90bd5fa1797dd81b8a9d8e7db4 SHA512 b3c9e44ea9cdc43fa1376642182b9164792f11dcc75661e330a439384344a334c62a2e5e049839c1d5b6a4e2ce008154dc93ed1cc97bcd11267f1eb78f03e629 WHIRLPOOL 780b64ce3a0f722cd1599756d7708a029cf6ba23617763bb690216d56a9fd134d9d1d2200818cb3965c7ac35e7abe638af8fc56f76d99b06e24f0061345fd6f7
+MISC ChangeLog 557 SHA256 fc8e308a7226f0e211b588cb8ae4850646f95e452b37d7a195d55bddcb2b70e0 SHA512 2633652f16d0d495ad8fb4d8081c2440c8e24988715d3c7be447a7b7f32db93422303fe12074a741905c82b0b0d903836bf8d2d4dc31bb3957d8f3fbc0560986 WHIRLPOOL 92af527ae05c5df8d4a43ccac35acd128ddf6f15633ccb7c800cc3e4b6d5c521376486543798dbb4fdf715e240e03ba9a25c2f57f921687e762d4dd2e1fabde1
+MISC metadata.xml 467 SHA256 3f0e04fc62e643abd20c541d2739faa9ac03a72add79b873ad5e705dbb154820 SHA512 ce1062602cc5c6391154c9ea7d0c2c4b68e91a904fae059867a77e54d74d2e4a648176d12606ab558a509c3a3dc45b533258ae7ba9b15fa138d5faf6a4d8069b WHIRLPOOL 5fac459140bc77aa26d20c57103be488e690d04ac9c1868fbb2314a4ec84a06b9a5ded3a4ee5860c74d777e9f5cf450da4e5d22b94cb7841e7ba7dda0c741643
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iEYEAREIAAYFAlS9zgcACgkQblQW9DDEZTjZGACgsDs0N7u4SB+C4AR50PW9R1k6
+LbQAoKRFSZIVgY6uKUVdidtMIPYX4NkE
+=6lPq
+-----END PGP SIGNATURE-----
diff --git a/dev-lang/go-bootstrap/go-bootstrap-1.4.1.ebuild b/dev-lang/go-bootstrap/go-bootstrap-1.4.1.ebuild
new file mode 100644 (file)
index 0000000..bf0c3e1
--- /dev/null
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/go-bootstrap/go-bootstrap-1.4.1.ebuild,v 1.1 2015/01/20 03:39:35 williamh Exp $
+
+EAPI=5
+
+export CTARGET=${CTARGET:-${CHOST}}
+
+inherit eutils toolchain-funcs
+
+SRC_URI="https://storage.googleapis.com/golang/go${PV}.src.tar.gz"
+# Upstream only supports go on amd64, arm and x86 architectures.
+KEYWORDS="-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos"
+
+DESCRIPTION="Version of go compiler used for bootstrapping"
+HOMEPAGE="http://www.golang.org"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+# The go tools should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go1.4/pkg/tool/.*/.*"
+
+# The go language uses *.a files which are _NOT_ libraries and should not be
+# stripped.
+STRIP_MASK="/usr/lib/go1.4/pkg/linux*/*.a
+       /usr/lib/go1.4/pkg/freebsd*/*.a /usr/lib/go1.4/pkg/darwin*/*.a"
+
+S="${WORKDIR}"/go
+
+src_prepare()
+{
+       sed -i -e 's/"-Werror",//g' src/cmd/dist/build.c
+}
+
+src_compile()
+{
+       export GOROOT_FINAL="${EPREFIX}"/usr/lib/go1.4
+       export GOROOT="$(pwd)"
+       export GOBIN="${GOROOT}/bin"
+       if [[ $CTARGET = armv5* ]]
+       then
+               export GOARM=5
+       fi
+       tc-export CC
+
+       cd src
+       ./make.bash || die "build failed"
+}
+
+src_test()
+{
+       cd src
+       PATH="${GOBIN}:${PATH}" \
+               ./run.bash --no-rebuild --banner || die "tests failed"
+}
+
+src_install()
+{
+       dodir /usr/lib/go1.4
+       exeinto /usr/lib/go1.4/bin
+doexe bin/*
+       insinto /usr/lib/go1.4
+       doins -r lib pkg src
+       fperms -R +x /usr/lib/go1.4/pkg/tool
+}
+
+pkg_postinst()
+{
+       # If the go tool sees a package file timestamped older than a dependancy it
+       # will rebuild that file.  So, in order to stop go from rebuilding lots of
+       # packages for every build we need to fix the timestamps.  The compiler and
+       # linker are also checked - so we need to fix them too.
+       ebegin "fixing timestamps to avoid unnecessary rebuilds"
+       tref="usr/lib/go1.4/pkg/*/runtime.a"
+       find "${EROOT}"usr/lib/go1.4 -type f \
+               -exec touch -r "${EROOT}"${tref} {} \;
+       eend $?
+}
diff --git a/dev-lang/go-bootstrap/metadata.xml b/dev-lang/go-bootstrap/metadata.xml
new file mode 100644 (file)
index 0000000..afdfdb9
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer>
+               <email>williamh@gentoo.org</email>
+               <name>William Hubbs</name>
+       </maintainer>
+       <longdescription lang="en">
+               This package is only necessary until gccgo supports go-1.4. It
+               will be removed as soon as stable gcc supports this.
+               It is here so that >=dev-lang/go 1.5 can use it to bootstrap.
+       </longdescription>
+</pkgmetadata>