Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/grpc/, net-libs/grpc/files/
Date: Thu, 25 Oct 2018 06:40:48
Message-Id: 1540442943.92c71270024e7e9bf74eef6bd697eada65899c6c.gyakovlev@gentoo
1 commit: 92c71270024e7e9bf74eef6bd697eada65899c6c
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 22 00:34:55 2018 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 25 04:49:03 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92c71270
7
8 net-libs/grpc: version bump to 1.16.0
9
10 migrated python and tools useflags to
11 dev-python/{grpcio,grpcio-tools}
12
13 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
14 Package-Manager: Portage-2.3.51, Repoman-2.3.11
15
16 net-libs/grpc/Manifest | 1 +
17 net-libs/grpc/files/grpc-1.16.0-gcc8-fixes.patch | 46 +++++++++++
18 net-libs/grpc/grpc-1.16.0.ebuild | 101 +++++++++++++++++++++++
19 3 files changed, 148 insertions(+)
20
21 diff --git a/net-libs/grpc/Manifest b/net-libs/grpc/Manifest
22 index 565aa5cecfb..6e6e8dc9326 100644
23 --- a/net-libs/grpc/Manifest
24 +++ b/net-libs/grpc/Manifest
25 @@ -4,5 +4,6 @@ DIST grpc-1.13.0.tar.gz 13755973 BLAKE2B 533f0a7d4eb606b8a55f12aade503285dbff2cf
26 DIST grpc-1.13.1.tar.gz 13757818 BLAKE2B 9387efb980a0cff20c36d7653f24fb7982809428f7f35af0819786753d6cf380a581af81bde72f3682fcdfb3f41c71d628e5ef3b6b83663c8d3d182b4fdb6272 SHA512 f44028299d47865814ada2b8b93dc98dc51c8729bedc9c30dd79c04f6ecc3789ff06bbe7555e5d3512d9aec027751761ae10a80a09a94cf85bbd3260d651b356
27 DIST grpc-1.14.2.tar.gz 13891112 BLAKE2B 2d8baa2d248fb9e319ac6f1a9cb1eb0c4f7ce20cfaa51254cb6d43db8d101fd4df03779b24e52a2cd00d7e14a415d928d51039c31cdde2c3272feee664861ea1 SHA512 1fca05a01fcae3bcaa8aeb57fb8e4a69d92d4d4d42e0612e9a7b3652a3f4e1b006a7559aea95cadae614479f4ac6ed14876b81fca0365967d246a5b7888a8385
28 DIST grpc-1.15.0.tar.gz 14084394 BLAKE2B 133460868f347eb4bba6e761c2ad7d826017de4b3c52aafe1850a8a8811afb0a6ff3c084b5ff645556d0f14c7c60db89a9cb5dddfc9827b2ca2b32af09ecf43f SHA512 2a958d93bf737e074216b121bc8e65c9c5151e6f8cfd5a3e9f826413d2734fdcdbd5659482c8d0b2a5e9a4ae537f5c1dfb58ee8ecf844ec95fe46659fb937e06
29 +DIST grpc-1.16.0.tar.gz 14442543 BLAKE2B bceddb5cc9b3439523523f16e0a34b45ddcd1b4bfc00556639b6d0ea84b886c7a9b3204b73605181d76997b42ba1a3ec3ccb95f43a0396a5cb96c7ea7644a800 SHA512 af088500bb7055f91a856efc91a718f3363a3047bc568e6419dc5776037d9a20493772b34d75a78225fb6bfc339da6493881c6744f3f98607bf9d3c7f91bfb75
30 DIST protobuf-3.5.2.tar.gz 4584659 BLAKE2B f582212169d802a5844574eb900c9f8cbb343b7e73f2074e5ff0bfc544ebd13f4bc2b78271fb70f4465d78fdc39972ed68339f453c0d3ffe98d8564fbf520544 SHA512 09d10cf0c07a0ba249428bbf20f5dbed840965fa06b3c09682f286a4dee9d84bb96f3b5b50e993d48ef1f20440531255ce7d0e60a648bf3fe536a5f2b0b74181
31 DIST protobuf-3.6.1.tar.gz 4485582 BLAKE2B 546c49759df784018459809b9db692c5c94aef5d717183af5cd9edd96b4c658e759f23950cdcd5dddceaaad06ea1de2a2357b9fa8c496ed5d538fc5920174da0 SHA512 1bc175d24b49de1b1e41eaf39598194e583afffb924c86c8d2e569d935af21874be76b2cbd4d9655a1d38bac3d4cd811de88bc2c72d81bad79115e69e5b0d839
32
33 diff --git a/net-libs/grpc/files/grpc-1.16.0-gcc8-fixes.patch b/net-libs/grpc/files/grpc-1.16.0-gcc8-fixes.patch
34 new file mode 100644
35 index 00000000000..0afd8254dec
36 --- /dev/null
37 +++ b/net-libs/grpc/files/grpc-1.16.0-gcc8-fixes.patch
38 @@ -0,0 +1,46 @@
39 +From 807a938a576ec52bc8c971100b2da26b059d9347 Mon Sep 17 00:00:00 2001
40 +From: Tobias Jungel <tobias.jungel@×××××.com>
41 +Date: Wed, 22 Aug 2018 21:14:46 +0200
42 +Subject: [PATCH 1/2] mitigate gcc8 -Werror=ignored-qualifiers
43 +
44 +---
45 + src/core/ext/transport/chttp2/transport/flow_control.cc | 2 +-
46 + 1 file changed, 1 insertion(+), 1 deletion(-)
47 +
48 +diff --git a/src/core/ext/transport/chttp2/transport/flow_control.cc b/src/core/ext/transport/chttp2/transport/flow_control.cc
49 +index 53932bcb7f5..4b1862735d6 100644
50 +--- a/src/core/ext/transport/chttp2/transport/flow_control.cc
51 ++++ b/src/core/ext/transport/chttp2/transport/flow_control.cc
52 +@@ -190,7 +190,7 @@ TransportFlowControl::TransportFlowControl(const grpc_chttp2_transport* t,
53 + uint32_t TransportFlowControl::MaybeSendUpdate(bool writing_anyway) {
54 + FlowControlTrace trace("t updt sent", this, nullptr);
55 + const uint32_t target_announced_window =
56 +- static_cast<const uint32_t>(target_window());
57 ++ static_cast<uint32_t>(target_window());
58 + if ((writing_anyway || announced_window_ <= target_announced_window / 2) &&
59 + announced_window_ != target_announced_window) {
60 + const uint32_t announce = static_cast<uint32_t> GPR_CLAMP(
61 +
62 +From 5a03e7f10145c6591f313055907a9cf26ccb9234 Mon Sep 17 00:00:00 2001
63 +From: Tobias Jungel <tobias.jungel@×××××.com>
64 +Date: Wed, 22 Aug 2018 21:17:01 +0200
65 +Subject: [PATCH 2/2] mitigate gcc8 -Werror=stringop-truncation
66 +
67 +---
68 + .../client_channel/lb_policy/grpclb/load_balancer_api.cc | 3 ++-
69 + 1 file changed, 2 insertions(+), 1 deletion(-)
70 +
71 +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
72 +index f24281a5bfb..8c064214729 100644
73 +--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
74 ++++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
75 +@@ -68,7 +68,8 @@ grpc_grpclb_request* grpc_grpclb_request_create(const char* lb_service_name) {
76 + req->has_initial_request = true;
77 + req->initial_request.has_name = true;
78 + strncpy(req->initial_request.name, lb_service_name,
79 +- GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH);
80 ++ GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH - 1);
81 ++ req->initial_request.name[GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH - 1] = '\0';
82 + return req;
83 + }
84 +
85
86 diff --git a/net-libs/grpc/grpc-1.16.0.ebuild b/net-libs/grpc/grpc-1.16.0.ebuild
87 new file mode 100644
88 index 00000000000..31caf4ced50
89 --- /dev/null
90 +++ b/net-libs/grpc/grpc-1.16.0.ebuild
91 @@ -0,0 +1,101 @@
92 +# Copyright 1999-2018 Gentoo Authors
93 +# Distributed under the terms of the GNU General Public License v2
94 +
95 +EAPI=7
96 +
97 +inherit flag-o-matic toolchain-funcs
98 +
99 +MY_PV="${PV//_pre/-pre}"
100 +
101 +DESCRIPTION="Modern open source high performance RPC framework"
102 +HOMEPAGE="http://www.grpc.io"
103 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
104 +
105 +LICENSE="Apache-2.0"
106 +SLOT="0"
107 +KEYWORDS="~amd64 ~x86"
108 +IUSE="examples doc systemtap static-libs"
109 +
110 +RDEPEND="
111 + >=dev-libs/openssl-1.0.2:0=[-bindist]
112 + dev-libs/protobuf:=
113 + dev-util/google-perftools
114 + net-dns/c-ares:=
115 + sys-libs/zlib:=
116 + systemtap? ( dev-util/systemtap )
117 +"
118 +
119 +DEPEND="${RDEPEND}
120 + virtual/pkgconfig
121 +"
122 +
123 +PATCHES=(
124 + "${FILESDIR}/0001-grpc-1.13.0-fix-host-ar-handling.patch"
125 + "${FILESDIR}/0003-grpc-1.3.0-Don-t-run-ldconfig.patch"
126 + "${FILESDIR}/0005-grpc-1.11.0-pkgconfig-libdir.patch"
127 + "${FILESDIR}/grpc-1.15.0-fix-cpp-so-version.patch"
128 + "${FILESDIR}/grpc-1.16.0-gcc8-fixes.patch"
129 +)
130 +
131 +S="${WORKDIR}/${PN}-${MY_PV}"
132 +
133 +src_prepare() {
134 + sed -i 's@$(prefix)/lib@$(prefix)/$(INSTALL_LIBDIR)@g' Makefile || die "fix libdir"
135 + default
136 +}
137 +
138 +src_compile() {
139 + tc-export CC CXX PKG_CONFIG
140 +
141 + emake \
142 + V=1 \
143 + prefix=/usr \
144 + INSTALL_LIBDIR="$(get_libdir)" \
145 + AR="$(tc-getAR)" \
146 + AROPTS="rcs" \
147 + CFLAGS="${CFLAGS}" \
148 + CXXFLAGS="${CXXFLAGS}" \
149 + LD="${CC}" \
150 + LDXX="${CXX}" \
151 + STRIP=/bin/true \
152 + HOST_CC="$(tc-getBUILD_CC)" \
153 + HOST_CXX="$(tc-getBUILD_CXX)" \
154 + HOST_LD="$(tc-getBUILD_CC)" \
155 + HOST_LDXX="$(tc-getBUILD_CXX)" \
156 + HOST_AR="$(tc-getBUILD_AR)" \
157 + HAS_SYSTEMTAP="$(usex systemtap true false)"
158 +}
159 +
160 +src_install() {
161 + emake \
162 + prefix="${D}"/usr \
163 + INSTALL_LIBDIR="$(get_libdir)" \
164 + STRIP=/bin/true \
165 + install
166 +
167 + use static-libs || find "${ED}" -name '*.a' -delete
168 +
169 + if use examples; then
170 + find examples -name '.gitignore' -delete || die
171 + dodoc -r examples
172 + docompress -x /usr/share/doc/${PF}/examples
173 + fi
174 +
175 + if use doc; then
176 + find doc -name '.gitignore' -delete || die
177 + local DOCS=( AUTHORS README.md TROUBLESHOOTING.md doc/. )
178 + fi
179 +
180 + einstalldocs
181 +}
182 +
183 +pkg_postinst() {
184 + local v
185 + for v in ${REPLACING_VERSIONS}; do
186 + if ver_test "${v}" -lt 1.16.0; then
187 + ewarn "python bindings and tools moved to separate independent packages"
188 + ewarn "check dev-python/grpcio and dev-python/grpcio-tools"
189 + fi
190 + done
191 +
192 +}