1 |
commit: 6c95887964743f14f9af8b75929408df60691fc7 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 12 18:37:36 2018 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 12 18:56:45 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c958879 |
7 |
|
8 |
net-libs/grpc: version bump to 1.14.2 |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
11 |
|
12 |
net-libs/grpc/Manifest | 1 + |
13 |
net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch | 83 +++++++++++ |
14 |
net-libs/grpc/grpc-1.14.2.ebuild | 173 +++++++++++++++++++++++ |
15 |
3 files changed, 257 insertions(+) |
16 |
|
17 |
diff --git a/net-libs/grpc/Manifest b/net-libs/grpc/Manifest |
18 |
index c694829ef8a..2f11312e5db 100644 |
19 |
--- a/net-libs/grpc/Manifest |
20 |
+++ b/net-libs/grpc/Manifest |
21 |
@@ -2,4 +2,5 @@ DIST grpc-1.12.0.tar.gz 13692310 BLAKE2B 86b9063416140453718c51df4f238bb3d5ac854 |
22 |
DIST grpc-1.12.1.tar.gz 13692045 BLAKE2B d35706b553917d0f27e4474509f361ec7962b738031f11ca814d7ec33429f848b3b3356cae9a28b9a0cb376df5a6348d312c80ed4eeb51b81e68b317584a2e4a SHA512 9dd6d8c4b4e2713cf27ed55b1e97fdf5ed6d80f43b798b83f08e2f4646387dfd0696b21d4f44dbd99a061d388790dc15da49ac5afb0bb06116cfd6f07b7d6962 |
23 |
DIST grpc-1.13.0.tar.gz 13755973 BLAKE2B 533f0a7d4eb606b8a55f12aade503285dbff2cfa29ff2af71d407e3df25f3ec4b7572335c455d5dd0069eb343f18f8641a4f9326065cc118922942f77d2d2403 SHA512 25a489cd67d12219696c397afa75282eb702bd0af418381990b2eeb4b56483a46276d05314710582dd17be04c80aaf9bb16e01e2c1729d9a59d84ff273baa254 |
24 |
DIST grpc-1.13.1.tar.gz 13757818 BLAKE2B 9387efb980a0cff20c36d7653f24fb7982809428f7f35af0819786753d6cf380a581af81bde72f3682fcdfb3f41c71d628e5ef3b6b83663c8d3d182b4fdb6272 SHA512 f44028299d47865814ada2b8b93dc98dc51c8729bedc9c30dd79c04f6ecc3789ff06bbe7555e5d3512d9aec027751761ae10a80a09a94cf85bbd3260d651b356 |
25 |
+DIST grpc-1.14.2.tar.gz 13891112 BLAKE2B 2d8baa2d248fb9e319ac6f1a9cb1eb0c4f7ce20cfaa51254cb6d43db8d101fd4df03779b24e52a2cd00d7e14a415d928d51039c31cdde2c3272feee664861ea1 SHA512 1fca05a01fcae3bcaa8aeb57fb8e4a69d92d4d4d42e0612e9a7b3652a3f4e1b006a7559aea95cadae614479f4ac6ed14876b81fca0365967d246a5b7888a8385 |
26 |
DIST protobuf-3.5.2.tar.gz 4584659 BLAKE2B f582212169d802a5844574eb900c9f8cbb343b7e73f2074e5ff0bfc544ebd13f4bc2b78271fb70f4465d78fdc39972ed68339f453c0d3ffe98d8564fbf520544 SHA512 09d10cf0c07a0ba249428bbf20f5dbed840965fa06b3c09682f286a4dee9d84bb96f3b5b50e993d48ef1f20440531255ce7d0e60a648bf3fe536a5f2b0b74181 |
27 |
|
28 |
diff --git a/net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch b/net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..cb61b5f26fe |
31 |
--- /dev/null |
32 |
+++ b/net-libs/grpc/files/grpc-1.14.2-gcc8-fixes.patch |
33 |
@@ -0,0 +1,83 @@ |
34 |
+From 9c7db45da9a6ddc5d65cd19704539579eb31d2ce Mon Sep 17 00:00:00 2001 |
35 |
+From: Georgy Yakovlev <gyakovlev@g.o> |
36 |
+Date: Wed, 12 Sep 2018 10:35:45 -0700 |
37 |
+Subject: [PATCH] Fix failures with gcc-8 |
38 |
+ |
39 |
+Based on this PR https://github.com/grpc/grpc/pull/15443 |
40 |
+--- |
41 |
+ src/core/ext/filters/client_channel/client_channel.cc | 2 +- |
42 |
+ .../client_channel/lb_policy/grpclb/load_balancer_api.cc | 3 ++- |
43 |
+ src/core/ext/transport/chttp2/transport/flow_control.cc | 2 +- |
44 |
+ src/core/lib/surface/channel.cc | 2 +- |
45 |
+ src/core/tsi/alts_transport_security.cc | 2 +- |
46 |
+ 5 files changed, 6 insertions(+), 5 deletions(-) |
47 |
+ |
48 |
+diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc |
49 |
+index d2bf4f388d..503fb1ac87 100644 |
50 |
+--- a/src/core/ext/filters/client_channel/client_channel.cc |
51 |
++++ b/src/core/ext/filters/client_channel/client_channel.cc |
52 |
+@@ -457,7 +457,7 @@ get_service_config_from_resolver_result_locked(channel_data* chand) { |
53 |
+ grpc_uri* uri = grpc_uri_parse(server_uri, true); |
54 |
+ GPR_ASSERT(uri->path[0] != '\0'); |
55 |
+ service_config_parsing_state parsing_state; |
56 |
+- memset(&parsing_state, 0, sizeof(parsing_state)); |
57 |
++ memset(reinterpret_cast<void *>(&parsing_state), 0, sizeof(parsing_state)); |
58 |
+ parsing_state.server_name = |
59 |
+ uri->path[0] == '/' ? uri->path + 1 : uri->path; |
60 |
+ service_config->ParseGlobalParams(parse_retry_throttle_params, |
61 |
+diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc |
62 |
+index f24281a5bf..74baf430f1 100644 |
63 |
+--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc |
64 |
++++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc |
65 |
+@@ -68,7 +68,8 @@ grpc_grpclb_request* grpc_grpclb_request_create(const char* lb_service_name) { |
66 |
+ req->has_initial_request = true; |
67 |
+ req->initial_request.has_name = true; |
68 |
+ strncpy(req->initial_request.name, lb_service_name, |
69 |
+- GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH); |
70 |
++ GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH-1); |
71 |
++ req->initial_request.name[GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH] = '\0'; |
72 |
+ return req; |
73 |
+ } |
74 |
+ |
75 |
+diff --git a/src/core/ext/transport/chttp2/transport/flow_control.cc b/src/core/ext/transport/chttp2/transport/flow_control.cc |
76 |
+index 53932bcb7f..4b1862735d 100644 |
77 |
+--- a/src/core/ext/transport/chttp2/transport/flow_control.cc |
78 |
++++ b/src/core/ext/transport/chttp2/transport/flow_control.cc |
79 |
+@@ -190,7 +190,7 @@ TransportFlowControl::TransportFlowControl(const grpc_chttp2_transport* t, |
80 |
+ uint32_t TransportFlowControl::MaybeSendUpdate(bool writing_anyway) { |
81 |
+ FlowControlTrace trace("t updt sent", this, nullptr); |
82 |
+ const uint32_t target_announced_window = |
83 |
+- static_cast<const uint32_t>(target_window()); |
84 |
++ static_cast<uint32_t>(target_window()); |
85 |
+ if ((writing_anyway || announced_window_ <= target_announced_window / 2) && |
86 |
+ announced_window_ != target_announced_window) { |
87 |
+ const uint32_t announce = static_cast<uint32_t> GPR_CLAMP( |
88 |
+diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc |
89 |
+index 82635d3c21..f9d89657b3 100644 |
90 |
+--- a/src/core/lib/surface/channel.cc |
91 |
++++ b/src/core/lib/surface/channel.cc |
92 |
+@@ -100,7 +100,7 @@ grpc_channel* grpc_channel_create_with_builder( |
93 |
+ return channel; |
94 |
+ } |
95 |
+ |
96 |
+- memset(channel, 0, sizeof(*channel)); |
97 |
++ memset(reinterpret_cast<void *>(channel), 0, sizeof(*channel)); |
98 |
+ channel->target = target; |
99 |
+ channel->is_client = grpc_channel_stack_type_is_client(channel_stack_type); |
100 |
+ size_t channel_tracer_max_nodes = 0; // default to off |
101 |
+diff --git a/src/core/tsi/alts_transport_security.cc b/src/core/tsi/alts_transport_security.cc |
102 |
+index 2fd408103b..51f9e9e85b 100644 |
103 |
+--- a/src/core/tsi/alts_transport_security.cc |
104 |
++++ b/src/core/tsi/alts_transport_security.cc |
105 |
+@@ -45,7 +45,7 @@ void grpc_tsi_alts_signal_for_cq_destroy() { |
106 |
+ } |
107 |
+ |
108 |
+ void grpc_tsi_alts_init() { |
109 |
+- memset(&g_alts_resource, 0, sizeof(alts_shared_resource)); |
110 |
++ memset(reinterpret_cast<void *>(&g_alts_resource), 0, sizeof(alts_shared_resource)); |
111 |
+ gpr_mu_init(&g_alts_resource.mu); |
112 |
+ gpr_cv_init(&g_alts_resource.cv); |
113 |
+ } |
114 |
+-- |
115 |
+2.18.0 |
116 |
+ |
117 |
|
118 |
diff --git a/net-libs/grpc/grpc-1.14.2.ebuild b/net-libs/grpc/grpc-1.14.2.ebuild |
119 |
new file mode 100644 |
120 |
index 00000000000..f7ac68eea64 |
121 |
--- /dev/null |
122 |
+++ b/net-libs/grpc/grpc-1.14.2.ebuild |
123 |
@@ -0,0 +1,173 @@ |
124 |
+# Copyright 1999-2018 Gentoo Foundation |
125 |
+# Distributed under the terms of the GNU General Public License v2 |
126 |
+ |
127 |
+EAPI=6 |
128 |
+ |
129 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
130 |
+DISTUTILS_OPTIONAL=1 |
131 |
+ |
132 |
+inherit distutils-r1 flag-o-matic toolchain-funcs |
133 |
+ |
134 |
+# should match pinned git submodule version of third_party/protobuf |
135 |
+# look it up here https://github.com/grpc/grpc/tree/v"${PV}"/third_party |
136 |
+# also should >=depend on same version of dev-libs/protobuf below |
137 |
+PROTOBUF_VERSION="3.5.2" |
138 |
+ |
139 |
+DESCRIPTION="Modern open source high performance RPC framework" |
140 |
+HOMEPAGE="http://www.grpc.io" |
141 |
+SRC_URI=" |
142 |
+ https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz |
143 |
+ tools? ( https://github.com/google/protobuf/archive/v${PROTOBUF_VERSION}.tar.gz -> protobuf-${PROTOBUF_VERSION}.tar.gz ) |
144 |
+" |
145 |
+ |
146 |
+LICENSE="Apache-2.0" |
147 |
+SLOT="0" |
148 |
+KEYWORDS="~amd64 ~x86" |
149 |
+IUSE="examples doc python systemtap static-libs tools" |
150 |
+ |
151 |
+REQUIRED_USE=" |
152 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
153 |
+ tools? ( python ) |
154 |
+" |
155 |
+ |
156 |
+RDEPEND=" |
157 |
+ >=dev-libs/openssl-1.0.2:0=[-bindist] |
158 |
+ >=dev-libs/protobuf-${PROTOBUF_VERSION}:= |
159 |
+ dev-util/google-perftools |
160 |
+ net-dns/c-ares:= |
161 |
+ sys-libs/zlib:= |
162 |
+ python? ( ${PYTHON_DEPS} |
163 |
+ dev-python/cython[${PYTHON_USEDEP}] |
164 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
165 |
+ dev-python/six[${PYTHON_USEDEP}] |
166 |
+ virtual/python-enum34[${PYTHON_USEDEP}] |
167 |
+ virtual/python-futures[${PYTHON_USEDEP}] |
168 |
+ tools? ( >=dev-python/protobuf-python-${PROTOBUF_VERSION}:=[${PYTHON_USEDEP}] ) |
169 |
+ ) |
170 |
+ systemtap? ( dev-util/systemtap ) |
171 |
+" |
172 |
+ |
173 |
+DEPEND="${RDEPEND} |
174 |
+ virtual/pkgconfig |
175 |
+ doc? ( |
176 |
+ python? ( |
177 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
178 |
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] |
179 |
+ ) |
180 |
+ ) |
181 |
+" |
182 |
+ |
183 |
+PATCHES=( |
184 |
+ "${FILESDIR}/0001-grpc-1.13.0-fix-host-ar-handling.patch" |
185 |
+ "${FILESDIR}/0002-grpc-1.3.0-Fix-unsecure-.pc-files.patch" |
186 |
+ "${FILESDIR}/0003-grpc-1.3.0-Don-t-run-ldconfig.patch" |
187 |
+ "${FILESDIR}/0004-grpc-1.11.0-fix-cpp-so-version.patch" |
188 |
+ "${FILESDIR}/0005-grpc-1.11.0-pkgconfig-libdir.patch" |
189 |
+ "${FILESDIR}/grpc-1.14.2-gcc8-fixes.patch" |
190 |
+) |
191 |
+ |
192 |
+src_prepare() { |
193 |
+ sed -i 's@$(prefix)/lib@$(prefix)/$(INSTALL_LIBDIR)@g' Makefile || die "fix libdir" |
194 |
+ default |
195 |
+ use python && distutils-r1_src_prepare |
196 |
+} |
197 |
+ |
198 |
+python_prepare() { |
199 |
+ if use tools; then |
200 |
+ rm -r third_party/protobuf || die "removing empty protobuf dir failed" |
201 |
+ ln -s "${S}"/../protobuf-"${PROTOBUF_VERSION}" third_party/protobuf || die |
202 |
+ pushd tools/distrib/python/grpcio_tools >/dev/null || die |
203 |
+ # absolute symlinks will fail |
204 |
+ # ./src -> ${S}/src |
205 |
+ ln -s ../../../../src ./ || die |
206 |
+ # ./third_party -> ${S}/third_party |
207 |
+ ln -s ../../../../third_party ./ || die |
208 |
+ # ./grpc_root -> ${S} |
209 |
+ ln -s ../../../../ ./grpc_root || die |
210 |
+ # prevent above symlinks creating huge SOURCES.TXT files, bug #661244 |
211 |
+ echo "prune grpc_root/tools/distrib/python/grpcio_tools" >> MANIFEST.in |
212 |
+ popd >/dev/null || die |
213 |
+ fi |
214 |
+} |
215 |
+ |
216 |
+src_compile() { |
217 |
+ tc-export CC CXX PKG_CONFIG |
218 |
+ |
219 |
+ emake \ |
220 |
+ V=1 \ |
221 |
+ prefix=/usr \ |
222 |
+ INSTALL_LIBDIR="$(get_libdir)" \ |
223 |
+ AR="$(tc-getAR)" \ |
224 |
+ AROPTS="rcs" \ |
225 |
+ CFLAGS="${CFLAGS}" \ |
226 |
+ CXXFLAGS="${CXXFLAGS}" \ |
227 |
+ LD="${CC}" \ |
228 |
+ LDXX="${CXX}" \ |
229 |
+ STRIP=/bin/true \ |
230 |
+ HOST_CC="$(tc-getBUILD_CC)" \ |
231 |
+ HOST_CXX="$(tc-getBUILD_CXX)" \ |
232 |
+ HOST_LD="$(tc-getBUILD_CC)" \ |
233 |
+ HOST_LDXX="$(tc-getBUILD_CXX)" \ |
234 |
+ HOST_AR="$(tc-getBUILD_AR)" \ |
235 |
+ HAS_SYSTEMTAP="$(usex systemtap true false)" |
236 |
+ |
237 |
+ use python && distutils-r1_src_compile |
238 |
+} |
239 |
+ |
240 |
+python_compile() { |
241 |
+ export GRPC_PYTHON_BUILD_SYSTEM_CARES=1 |
242 |
+ export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 |
243 |
+ export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 |
244 |
+ export GRPC_PYTHON_BUILD_WITH_CYTHON=1 |
245 |
+ distutils-r1_python_compile |
246 |
+ |
247 |
+ if use tools; then |
248 |
+ pushd tools/distrib/python/grpcio_tools >/dev/null || die |
249 |
+ distutils-r1_python_compile |
250 |
+ popd >/dev/null || die |
251 |
+ fi |
252 |
+} |
253 |
+ |
254 |
+python_compile_all() { |
255 |
+ if use doc; then |
256 |
+ esetup.py doc |
257 |
+ mv doc/build doc/html || die |
258 |
+ fi |
259 |
+} |
260 |
+ |
261 |
+src_install() { |
262 |
+ emake \ |
263 |
+ prefix="${D}"/usr \ |
264 |
+ INSTALL_LIBDIR="$(get_libdir)" \ |
265 |
+ STRIP=/bin/true \ |
266 |
+ install |
267 |
+ |
268 |
+ use static-libs || find "${ED}" -name '*.a' -delete |
269 |
+ |
270 |
+ if use examples; then |
271 |
+ find examples -name '.gitignore' -delete || die |
272 |
+ dodoc -r examples |
273 |
+ docompress -x /usr/share/doc/${PF}/examples |
274 |
+ fi |
275 |
+ |
276 |
+ # only define DOCS array if requested, otherwise portage default is fine |
277 |
+ if use doc; then |
278 |
+ find doc -name '.gitignore' -delete || die |
279 |
+ local DOCS=( AUTHORS README.md TROUBLESHOOTING.md doc/. ) |
280 |
+ fi |
281 |
+ |
282 |
+ einstalldocs |
283 |
+ |
284 |
+ use python && distutils-r1_src_install |
285 |
+ |
286 |
+} |
287 |
+ |
288 |
+python_install() { |
289 |
+ distutils-r1_python_install |
290 |
+ |
291 |
+ if use tools; then |
292 |
+ pushd tools/distrib/python/grpcio_tools >/dev/null || die |
293 |
+ distutils-r1_python_install |
294 |
+ popd >/dev/null || die |
295 |
+ fi |
296 |
+} |