logo

overlay

My (experimental) gentoo overlay
commit: 3d86933cb16e3ac896f9a913fb05043f388dfeca
parent: ae04d4ee6051f6bbd60191509b7c4424d85071a7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 17 Jul 2018 01:21:27 +0200

dev-lang/go-boostrap: New package

Based on https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/go-bootstrap/go-bootstrap-1.4.3.ebuild?id=a38a13471d533a35741eddca7968f3b78b813aaa

Diffstat:

Adev-lang/go-boostrap/Manifest1+
Adev-lang/go-boostrap/go-boostrap-20171003.ebuild72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-lang/go-boostrap/metadata.xml8++++++++
3 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/dev-lang/go-boostrap/Manifest b/dev-lang/go-boostrap/Manifest @@ -0,0 +1 @@ +DIST go-boostrap-20171003.tar.gz 11009739 BLAKE2B 44653911a8276767ba5b357c1e759d8ab3c39b964c44e0c263a4a6a4d77a7dc8f8b31a56c51386e36ae2f749f406673e89ba8f6ade1bbe015ead79eb005aa709 SHA512 2f65d5035d2b4ae8610c3337e0fcba64692c63953b54bf735f634da3532c6573ed08927865bf068b00a3885663815c5efc7dbd9a1b3d6337c9a0c62168aabca7 diff --git a/dev-lang/go-boostrap/go-boostrap-20171003.ebuild b/dev-lang/go-boostrap/go-boostrap-20171003.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils toolchain-funcs + +DESCRIPTION="Boostrap Go from C (useful for musl libc)" +HOMEPAGE="https://golang.org/doc/install/source" +SRC_URI="https://dl.google.com/go/go1.4-bootstrap-${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +RESTRICT="mirror" + +# 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. The test data objects should also be left alone and unstripped. +STRIP_MASK="/usr/lib/go1.4/pkg/*.a + /usr/lib/go1.4/src/debug/elf/testdata/* + /usr/lib/go1.4/src/debug/dwarf/testdata/* + /usr/lib/go1.4/src/runtime/race/*.syso +" + +S="${WORKDIR}/go" + +src_prepare() { + sed -i -e 's/"-Werror",//g' src/cmd/dist/build.c + + default +} + +src_compile() { + export GOROOT_FINAL="${EPREFIX}/usr/lib/go1.4" + export GOROOT="$(pwd)" + export GOBIN="${GOROOT}/bin" + export CGO_ENABLED=0 + + tc-export CC + + cd src + ./make.bash || die "build 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-boostrap/metadata.xml b/dev-lang/go-boostrap/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> +</maintainer> +</pkgmetadata>