Merge pull request #1259 from glevand/for-merge-1

dev-lang/go: Updates for arm64
This commit is contained in:
Michael Marineau 2015-05-15 16:08:26 -07:00
commit 627bd7f038
7 changed files with 249 additions and 0 deletions

View File

@ -44,6 +44,7 @@ RDEPEND="${RDEPEND}
dev-lang/swig
dev-lang/yasm
dev-lang/go
dev-lang/go-bootstrap
dev-libs/dbus-glib
>=dev-libs/glib-2.26.1
dev-libs/libgcrypt

View File

@ -0,0 +1,17 @@
# 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.2 2015/03/18 00:51:29 williamh Exp $
*go-bootstrap-1.4.2 (18 Mar 2015)
18 Mar 2015; William Hubbs <williamh@gentoo.org> +go-bootstrap-1.4.2.ebuild:
version bump
*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.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
DIST go1.4.1.src.tar.gz 10921282 SHA256 3d9bb27ad4be51f60dc44f3d0026036ef07142797b1df1b5ae816277e6c31bb3 SHA512 47cbd67cdca8d67e8d09fee6d9a9fd5ddfa65f59413bd583c83b27c598f7b1b23e51e894888c10202bada560a16758eb847bff963d77726724aefecaea5cf644 WHIRLPOOL 0e63fce9674204c79dafad2daea1b8e097370ae7a5b5ee0e463235925cec4a3e74fa0980de8fe6fa1adbc072c2921cef494c5eafe251fe4e26a0f1586bd217e0
DIST go1.4.2.src.tar.gz 10921896 SHA256 299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b SHA512 cda1a29d4418875dffaf3324004ddae8e1bbb573f7668e6e0c03d8b61284f4db7fca244c181f2859f8ccdd3db6391fb21e0d98a1a9fc15096c15883249d48a9c WHIRLPOOL d06c27f6ff3a6499a6c7cb3c5eccd53eb588896c4d837e1fe9855c22ee3caa5cc48fd68cbeceff105b7c47fafbbf0eb3dc28ee3af7196692c5bf18511c6760ef
EBUILD go-bootstrap-1.4.1.ebuild 2066 SHA256 5c5ff9487daf58cb540674f4f1251bad65153d90bd5fa1797dd81b8a9d8e7db4 SHA512 b3c9e44ea9cdc43fa1376642182b9164792f11dcc75661e330a439384344a334c62a2e5e049839c1d5b6a4e2ce008154dc93ed1cc97bcd11267f1eb78f03e629 WHIRLPOOL 780b64ce3a0f722cd1599756d7708a029cf6ba23617763bb690216d56a9fd134d9d1d2200818cb3965c7ac35e7abe638af8fc56f76d99b06e24f0061345fd6f7
EBUILD go-bootstrap-1.4.2.ebuild 2066 SHA256 91ed737ba74a5fca23420812f1f62a636b02542b0630a7606b6fb5289865c2c7 SHA512 eea3725f87e88f66827f0f794aa2945d37fed5117503c756077613fdd86306a285e7b008b5fb2be899a004dd745c1b688b9a8343f2d2c32b8d6486ae3d7dc09e WHIRLPOOL cdc2eab3371b3bed591f31c187b508cd4035af2cdacbb69893f2d16d2cc8638b3fe766218a0ac39f5ecc5157f198e1a719d87353757e07052c52d89642fd6a78
MISC ChangeLog 686 SHA256 da1550391b5cf7590987efdb8a40e2b94cb831ed2ecf44667d91d079c3e41ab1 SHA512 0215a663d9aa55a5fa3082b33e106b75d1ffc87a8677dfd8dea6e313084df6878d5b55d2438809d3d2bd459efc5a2c5d645fefad859dff98a09692a95cdaa396 WHIRLPOOL 40b583494fee7f46ec1a7f2dc220558d72c857d7984a758d0fca31f95d06f8a7010f33a80224ba7bc8364e874bd7bb2ddb9dcc82016e5f14338dfe055c3f5b44
MISC metadata.xml 467 SHA256 3f0e04fc62e643abd20c541d2739faa9ac03a72add79b873ad5e705dbb154820 SHA512 ce1062602cc5c6391154c9ea7d0c2c4b68e91a904fae059867a77e54d74d2e4a648176d12606ab558a509c3a3dc45b533258ae7ba9b15fa138d5faf6a4d8069b WHIRLPOOL 5fac459140bc77aa26d20c57103be488e690d04ac9c1868fbb2314a4ec84a06b9a5ded3a4ee5860c74d777e9f5cf450da4e5d22b94cb7841e7ba7dda0c741643
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEAREIAAYFAlUIzBkACgkQblQW9DDEZTj1tgCgkOZUl162QKS3mbqJWevqDczb
5aMAnjpvMl/rsnq15bsxnQnD/qkb0i6S
=vjg4
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,86 @@
# 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.2.ebuild,v 1.1 2015/03/18 00:51:29 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
# Fix-up for dev-lang/go file collisions when FEATURES=splitdebug.
rm src/debug/dwarf/testdata/typedef.elf
}
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 $?
}

View File

@ -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>

View File

@ -0,0 +1,106 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit eutils toolchain-funcs
EGIT_REPO_URI="git://github.com/golang/go.git"
inherit git-r3
KEYWORDS="-* ~amd64 arm64"
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
HOMEPAGE="http://www.golang.org"
LICENSE="BSD"
SLOT="0"
IUSE=""
DEPEND=""
RDEPEND=""
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
# The go language uses *.a files which are _NOT_ libraries and should not be
# stripped.
STRIP_MASK="/usr/lib/go/pkg/linux*/*.a /usr/lib/go/pkg/freebsd*/*.a /usr/lib/go/pkg/darwin*/*.a"
build_arch()
{
case "$CBUILD" in
aarch64*) echo arm64;;
x86_64*) echo amd64;;
esac
}
same_arch()
{
[[ "${ARCH}" = "$(build_arch)" ]]
}
src_prepare()
{
epatch_user
}
src_compile()
{
export GOOS="linux"
export GOARCH="${ARCH}"
export GOROOT_BOOTSTRAP="/usr/lib/go1.4"
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
export GOROOT="$(pwd)"
export GOBIN=${GOROOT}/bin
cd src
./make.bash || die "build failed"
}
src_test()
{
$(same_arch) || return 0;
cd src
PATH="${GOBIN}:${PATH}" \
./run.bash --no-rebuild --banner || die "tests failed"
}
src_install()
{
local bin_path
if $(same_arch); then
bin_path=${GOBIN}
else
bin_path=${GOBIN}/${GOOS}_${GOARCH}
fi
dobin ${bin_path}/*
dodoc AUTHORS CONTRIBUTORS PATENTS README.md
dodir /usr/lib/go
insinto /usr/lib/go
# There is a known issue which requires the source tree to be installed [1].
# Once this is fixed, we can consider using the doc use flag to control
# installing the doc and src directories.
# [1] https://golang.org/issue/2775
doins -r doc lib pkg src
fperms -R +x /usr/lib/go/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/go/pkg/*/runtime.a"
find "${EROOT}"usr/lib/go -type f \
-exec touch -r "${EROOT}"${tref} {} \;
eend $?
}

View File

@ -0,0 +1,10 @@
DEFINED_PHASES=compile install postinst prepare test
DESCRIPTION=Version of go compiler used for bootstrapping
EAPI=5
HOMEPAGE=http://www.golang.org
KEYWORDS=-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos
LICENSE=BSD
SLOT=0
SRC_URI=https://storage.googleapis.com/golang/go1.4.2.src.tar.gz
_eclasses_=eutils 9fb270e417e0e83d64ca52586c4a79de multilib 3bf24e6abb9b76d9f6c20600f0b716bf toolchain-funcs c961250d50160cd37d6b7fd9e8429c92
_md5_=e3c6f52a6ddcbaed7a0d6856e7136727