Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/go: go-1.2.2.ebuild ChangeLog
Date: Thu, 05 Jun 2014 07:43:19
Message-Id: 20140605074315.24A2B2004E@flycatcher.gentoo.org
1 patrick 14/06/05 07:43:15
2
3 Modified: ChangeLog
4 Added: go-1.2.2.ebuild
5 Log:
6 Bump
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.34 dev-lang/go/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/go/ChangeLog?rev=1.34&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/go/ChangeLog?rev=1.34&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/go/ChangeLog?r1=1.33&r2=1.34
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/go/ChangeLog,v
20 retrieving revision 1.33
21 retrieving revision 1.34
22 diff -u -r1.33 -r1.34
23 --- ChangeLog 28 Mar 2014 14:08:40 -0000 1.33
24 +++ ChangeLog 5 Jun 2014 07:43:14 -0000 1.34
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/go
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/ChangeLog,v 1.33 2014/03/28 14:08:40 grobian Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/ChangeLog,v 1.34 2014/06/05 07:43:14 patrick Exp $
30 +
31 +*go-1.2.2 (05 Jun 2014)
32 +
33 + 05 Jun 2014; Patrick Lauer <patrick@g.o> +go-1.2.2.ebuild:
34 + Bump
35
36 28 Mar 2014; Fabian Groffen <grobian@g.o> go-1.2.ebuild,
37 go-9999.ebuild:
38
39
40
41 1.1 dev-lang/go/go-1.2.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/go/go-1.2.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/go/go-1.2.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: go-1.2.2.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.2.2.ebuild,v 1.1 2014/06/05 07:43:14 patrick Exp $
51
52 EAPI=5
53
54 export CTARGET=${CTARGET:-${CHOST}}
55
56 inherit bash-completion-r1 elisp-common eutils
57
58 if [[ ${PV} = 9999 ]]; then
59 EHG_REPO_URI="https://go.googlecode.com/hg"
60 inherit mercurial
61 else
62 SRC_URI="https://storage.googleapis.com/golang/go${PV}.src.tar.gz"
63 # Upstream only supports go on amd64, arm and x86 architectures.
64 KEYWORDS="-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
65 fi
66
67 DESCRIPTION="A concurrent garbage collected and typesafe programming language"
68 HOMEPAGE="http://www.golang.org"
69
70 LICENSE="BSD"
71 SLOT="0"
72 IUSE="bash-completion emacs vim-syntax zsh-completion"
73
74 DEPEND=""
75 RDEPEND="bash-completion? ( app-shells/bash-completion )
76 emacs? ( virtual/emacs )
77 vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
78 zsh-completion? ( app-shells/zsh-completion )"
79
80 # The tools in /usr/lib/go should not cause the multilib-strict check to fail.
81 QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
82
83 # The go language uses *.a files which are _NOT_ libraries and should not be
84 # stripped.
85 STRIP_MASK="/usr/lib/go/pkg/linux*/*.a /usr/lib/go/pkg/freebsd*/*.a"
86
87 if [[ ${PV} != 9999 ]]; then
88 S="${WORKDIR}"/go
89 fi
90
91 src_prepare()
92 {
93 if [[ ${PV} != 9999 ]]; then
94 epatch "${FILESDIR}"/${PN}-1.2-no-Werror.patch
95 fi
96 epatch_user
97 }
98
99 src_compile()
100 {
101 export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
102 export GOROOT="$(pwd)"
103 export GOBIN="${GOROOT}/bin"
104 if [[ $CTARGET = armv5* ]]
105 then
106 export GOARM=5
107 fi
108
109 cd src
110 ./make.bash || die "build failed"
111 cd ..
112
113 if use emacs; then
114 elisp-compile misc/emacs/*.el
115 fi
116 }
117
118 src_test()
119 {
120 cd src
121 PATH="${GOBIN}:${PATH}" \
122 ./run.bash --no-rebuild --banner || die "tests failed"
123 }
124
125 src_install()
126 {
127 dobin bin/*
128 dodoc AUTHORS CONTRIBUTORS PATENTS README
129
130 dodir /usr/lib/go
131 insinto /usr/lib/go
132
133 # There is a known issue which requires the source tree to be installed [1].
134 # Once this is fixed, we can consider using the doc use flag to control
135 # installing the doc and src directories.
136 # [1] http://code.google.com/p/go/issues/detail?id=2775
137 doins -r doc include lib pkg src
138
139 if use bash-completion; then
140 dobashcomp misc/bash/go
141 fi
142
143 if use emacs; then
144 elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc
145 fi
146
147 if use vim-syntax; then
148 insinto /usr/share/vim/vimfiles
149 doins -r misc/vim/ftdetect
150 doins -r misc/vim/ftplugin
151 doins -r misc/vim/syntax
152 doins -r misc/vim/plugin
153 doins -r misc/vim/indent
154 fi
155
156 if use zsh-completion; then
157 insinto /usr/share/zsh/site-functions
158 doins misc/zsh/go
159 fi
160
161 fperms -R +x /usr/lib/go/pkg/tool
162 }
163
164 pkg_postinst()
165 {
166 if use emacs; then
167 elisp-site-regen
168 fi
169
170 # If the go tool sees a package file timestamped older than a dependancy it
171 # will rebuild that file. So, in order to stop go from rebuilding lots of
172 # packages for every build we need to fix the timestamps. The compiler and
173 # linker are also checked - so we need to fix them too.
174 ebegin "fixing timestamps to avoid unnecessary rebuilds"
175 tref="usr/lib/go/pkg/*/runtime.a"
176 find "${EROOT}"usr/lib/go -type f \
177 -exec touch -r "${EROOT}"${tref} {} \;
178 eend $?
179
180 if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} &&
181 ${REPLACING_VERSIONS} != ${PV} ]]; then
182 elog "Release notes are located at http://golang.org/doc/go${PV}"
183 fi
184 }
185
186 pkg_postrm()
187 {
188 if use emacs; then
189 elisp-site-regen
190 fi
191 }