/[gentoo-x86]/dev-lang/go-bootstrap/go-bootstrap-1.4.2.ebuild
Gentoo

Contents of /dev-lang/go-bootstrap/go-bootstrap-1.4.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Mar 18 00:51:29 2015 UTC (4 years, 7 months ago) by williamh
Branch: MAIN
CVS Tags: HEAD
version bump

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $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 $
4
5 EAPI=5
6
7 export CTARGET=${CTARGET:-${CHOST}}
8
9 inherit eutils toolchain-funcs
10
11 SRC_URI="https://storage.googleapis.com/golang/go${PV}.src.tar.gz"
12 # Upstream only supports go on amd64, arm and x86 architectures.
13 KEYWORDS="-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos"
14
15 DESCRIPTION="Version of go compiler used for bootstrapping"
16 HOMEPAGE="http://www.golang.org"
17
18 LICENSE="BSD"
19 SLOT="0"
20 IUSE=""
21
22 DEPEND=""
23 RDEPEND=""
24
25 # The go tools should not cause the multilib-strict check to fail.
26 QA_MULTILIB_PATHS="usr/lib/go1.4/pkg/tool/.*/.*"
27
28 # The go language uses *.a files which are _NOT_ libraries and should not be
29 # stripped.
30 STRIP_MASK="/usr/lib/go1.4/pkg/linux*/*.a
31 /usr/lib/go1.4/pkg/freebsd*/*.a /usr/lib/go1.4/pkg/darwin*/*.a"
32
33 S="${WORKDIR}"/go
34
35 src_prepare()
36 {
37 sed -i -e 's/"-Werror",//g' src/cmd/dist/build.c
38 }
39
40 src_compile()
41 {
42 export GOROOT_FINAL="${EPREFIX}"/usr/lib/go1.4
43 export GOROOT="$(pwd)"
44 export GOBIN="${GOROOT}/bin"
45 if [[ $CTARGET = armv5* ]]
46 then
47 export GOARM=5
48 fi
49 tc-export CC
50
51 cd src
52 ./make.bash || die "build failed"
53 }
54
55 src_test()
56 {
57 cd src
58 PATH="${GOBIN}:${PATH}" \
59 ./run.bash --no-rebuild --banner || die "tests failed"
60 }
61
62 src_install()
63 {
64 dodir /usr/lib/go1.4
65 exeinto /usr/lib/go1.4/bin
66 doexe bin/*
67 insinto /usr/lib/go1.4
68 doins -r lib pkg src
69 fperms -R +x /usr/lib/go1.4/pkg/tool
70 }
71
72 pkg_postinst()
73 {
74 # If the go tool sees a package file timestamped older than a dependancy it
75 # will rebuild that file. So, in order to stop go from rebuilding lots of
76 # packages for every build we need to fix the timestamps. The compiler and
77 # linker are also checked - so we need to fix them too.
78 ebegin "fixing timestamps to avoid unnecessary rebuilds"
79 tref="usr/lib/go1.4/pkg/*/runtime.a"
80 find "${EROOT}"usr/lib/go1.4 -type f \
81 -exec touch -r "${EROOT}"${tref} {} \;
82 eend $?
83 }

  ViewVC Help
Powered by ViewVC 1.1.20