Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-go/go-protobuf: metadata.xml go-protobuf-0_pre20150727.ebuild go-protobuf-9999.ebuild ChangeLog
Date: Thu, 30 Jul 2015 06:09:34
Message-Id: 20150730060925.6214F110@oystercatcher.gentoo.org
1 zmedico 15/07/30 06:09:25
2
3 Added: metadata.xml go-protobuf-0_pre20150727.ebuild
4 go-protobuf-9999.ebuild ChangeLog
5 Log:
6 Add go-protobuf.
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key FDE8EF85AE5719A3)
9
10 Revision Changes Path
11 1.1 dev-go/go-protobuf/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/metadata.xml?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/metadata.xml?rev=1.1&content-type=text/plain
15
16 Index: metadata.xml
17 ===================================================================
18 <?xml version="1.0" encoding="UTF-8"?>
19 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
20 <pkgmetadata>
21 <maintainer>
22 <email>zmedico@g.o</email>
23 </maintainer>
24 <upstream>
25 <remote-id type="github">golang/protobuf</remote-id>
26 </upstream>
27 </pkgmetadata>
28
29
30
31 1.1 dev-go/go-protobuf/go-protobuf-0_pre20150727.ebuild
32
33 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/go-protobuf-0_pre20150727.ebuild?rev=1.1&view=markup
34 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/go-protobuf-0_pre20150727.ebuild?rev=1.1&content-type=text/plain
35
36 Index: go-protobuf-0_pre20150727.ebuild
37 ===================================================================
38 # Copyright 1999-2015 Gentoo Foundation
39 # Distributed under the terms of the GNU General Public License v2
40 # $Header: /var/cvsroot/gentoo-x86/dev-go/go-protobuf/go-protobuf-0_pre20150727.ebuild,v 1.1 2015/07/30 06:09:25 zmedico Exp $
41
42 EAPI=5
43
44 EGO_SRC=github.com/golang/protobuf
45 EGO_PN=${EGO_SRC}/...
46
47
48 if [[ ${PV} = *9999* ]]; then
49 inherit golang-vcs
50 else
51 KEYWORDS="~amd64"
52 EGIT_COMMIT="68c687dc49948540b356a6b47931c9be4fcd0245"
53 SRC_URI="https://${EGO_SRC}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
54 fi
55 inherit golang-build
56
57 DESCRIPTION="Go support for Google's protocol buffers"
58 HOMEPAGE="https://${EGO_SRC}"
59 LICENSE="BSD"
60 SLOT="0/${PV}"
61 IUSE=""
62 DEPEND=""
63 RDEPEND=""
64
65 if [[ ${PV} != *9999* ]]; then
66 src_unpack() {
67 local f
68
69 for f in ${A}
70 do
71 case "${f}" in
72 *.tar|*.tar.gz|*.tar.bz2|*.tar.xz)
73 local destdir=${WORKDIR}/${P}/src/${EGO_SRC}
74
75 debug-print "${FUNCNAME}: unpacking ${f} to ${destdir}"
76
77 # XXX: check whether the directory structure inside is
78 # fine? i.e. if the tarball has actually a parent dir.
79 mkdir -p "${destdir}" || die
80 tar -C "${destdir}" -x --strip-components 1 \
81 -f "${DISTDIR}/${f}" || die
82 ;;
83 *)
84 debug-print "${FUNCNAME}: falling back to unpack for ${f}"
85
86 # fall back to the default method
87 unpack "${f}"
88 ;;
89 esac
90 done
91 }
92 fi
93
94 src_test() {
95 # Create a writable GOROOT in order to avoid sandbox violations.
96 cp -sR "$(go env GOROOT)" "${T}/goroot" || die
97 if [ -d "${T}/goroot/src/${EGO_SRC}" ]; then
98 rm -rf "${T}/goroot/src/${EGO_SRC}" || die
99 fi
100 if [ -d "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" ]; then
101 rm -rf "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" ||
102 die
103 fi
104
105 GOROOT="${T}/goroot" golang-build_src_test
106 }
107
108 src_install() {
109 rm -rf src/${EGO_SRC}/.git* || die
110 golang-build_src_install
111 dobin bin/*
112 }
113
114
115
116 1.1 dev-go/go-protobuf/go-protobuf-9999.ebuild
117
118 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/go-protobuf-9999.ebuild?rev=1.1&view=markup
119 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/go-protobuf-9999.ebuild?rev=1.1&content-type=text/plain
120
121 Index: go-protobuf-9999.ebuild
122 ===================================================================
123 # Copyright 1999-2015 Gentoo Foundation
124 # Distributed under the terms of the GNU General Public License v2
125 # $Header: /var/cvsroot/gentoo-x86/dev-go/go-protobuf/go-protobuf-9999.ebuild,v 1.1 2015/07/30 06:09:25 zmedico Exp $
126
127 EAPI=5
128
129 EGO_SRC=github.com/golang/protobuf
130 EGO_PN=${EGO_SRC}/...
131
132
133 if [[ ${PV} = *9999* ]]; then
134 inherit golang-vcs
135 else
136 KEYWORDS="~amd64"
137 EGIT_COMMIT="68c687dc49948540b356a6b47931c9be4fcd0245"
138 SRC_URI="https://${EGO_SRC}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
139 fi
140 inherit golang-build
141
142 DESCRIPTION="Go support for Google's protocol buffers"
143 HOMEPAGE="https://${EGO_SRC}"
144 LICENSE="BSD"
145 SLOT="0/${PV}"
146 IUSE=""
147 DEPEND=""
148 RDEPEND=""
149
150 if [[ ${PV} != *9999* ]]; then
151 src_unpack() {
152 local f
153
154 for f in ${A}
155 do
156 case "${f}" in
157 *.tar|*.tar.gz|*.tar.bz2|*.tar.xz)
158 local destdir=${WORKDIR}/${P}/src/${EGO_SRC}
159
160 debug-print "${FUNCNAME}: unpacking ${f} to ${destdir}"
161
162 # XXX: check whether the directory structure inside is
163 # fine? i.e. if the tarball has actually a parent dir.
164 mkdir -p "${destdir}" || die
165 tar -C "${destdir}" -x --strip-components 1 \
166 -f "${DISTDIR}/${f}" || die
167 ;;
168 *)
169 debug-print "${FUNCNAME}: falling back to unpack for ${f}"
170
171 # fall back to the default method
172 unpack "${f}"
173 ;;
174 esac
175 done
176 }
177 fi
178
179 src_test() {
180 # Create a writable GOROOT in order to avoid sandbox violations.
181 cp -sR "$(go env GOROOT)" "${T}/goroot" || die
182 if [ -d "${T}/goroot/src/${EGO_SRC}" ]; then
183 rm -rf "${T}/goroot/src/${EGO_SRC}" || die
184 fi
185 if [ -d "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" ]; then
186 rm -rf "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" ||
187 die
188 fi
189
190 GOROOT="${T}/goroot" golang-build_src_test
191 }
192
193 src_install() {
194 rm -rf src/${EGO_SRC}/.git* || die
195 golang-build_src_install
196 dobin bin/*
197 }
198
199
200
201 1.1 dev-go/go-protobuf/ChangeLog
202
203 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/ChangeLog?rev=1.1&view=markup
204 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-go/go-protobuf/ChangeLog?rev=1.1&content-type=text/plain
205
206 Index: ChangeLog
207 ===================================================================
208 # ChangeLog for dev-go/go-protobuf
209 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
210 # $Header: /var/cvsroot/gentoo-x86/dev-go/go-protobuf/ChangeLog,v 1.1 2015/07/30 06:09:25 zmedico Exp $
211
212 *go-protobuf-0_pre20150727 (30 Jul 2015)
213 *go-protobuf-9999 (30 Jul 2015)
214
215 30 Jul 2015; Zac Medico <zmedico@g.o>
216 +go-protobuf-0_pre20150727.ebuild, +go-protobuf-9999.ebuild, +metadata.xml:
217 Add go-protobuf.