1 |
commit: d79c4095a579f9f218f8075d940767428e4fa2e2 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 17 02:25:28 2019 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 17 02:59:53 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d79c4095 |
7 |
|
8 |
dev-python/grpcio: bump to 1.23.0 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/691836 |
11 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
12 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
13 |
|
14 |
dev-python/grpcio/Manifest | 1 + |
15 |
.../files/grpc-1.22.1-glibc-2.30-compat.patch | 78 ++++++++++++++++++++++ |
16 |
dev-python/grpcio/grpcio-1.23.0.ebuild | 40 +++++++++++ |
17 |
3 files changed, 119 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/grpcio/Manifest b/dev-python/grpcio/Manifest |
20 |
index 64ee49ad70a..d799ec48bb7 100644 |
21 |
--- a/dev-python/grpcio/Manifest |
22 |
+++ b/dev-python/grpcio/Manifest |
23 |
@@ -5,3 +5,4 @@ DIST grpcio-1.19.0.tar.gz 14621509 BLAKE2B b756ba60d317baa089b8ee57c458bc68fb72e |
24 |
DIST grpcio-1.20.1.tar.gz 13882426 BLAKE2B 4211d9dedc7ba858a5124798f17b3b158f255d055f32f5947191fcb5fd45cca9c97aa3f8c4966e7195add5289ba3747a77b2f0c01a35762ffbeba6938c76046d SHA512 0ac126d8b2c25204bb03daccfc9b17016bc18dd31f89f6e208f2ae39d7e6fd17ae04a8178367a5334421d959b14fd3d31ac71a692b48a060d98f983553fcc3e2 |
25 |
DIST grpcio-1.21.1.tar.gz 13919484 BLAKE2B dcad98da8db4aa588facc30d1b010ec1e4d5f8085751422277631329f1c4949ba3e2c3882829354025a845992ba9972df1c48a277df93caef9015969f9423aef SHA512 0ea20490ce5e776a6253d4b89dd9d9091afb7462d6bd6bd9d2d3329979d61360a3e31abbd043b90d0908512cf7ff2668bb21cb472fbf0ad5a3b5963073850dd7 |
26 |
DIST grpcio-1.22.0.tar.gz 13925872 BLAKE2B 96cb2244e6fe11c628349b21026906336981d51661474f4e871ad33125cd183255cd9eb2de2eca9af00f80ddd1989dde80e60cdbe5bc833225980c63e12c92fc SHA512 912672209e2192fadaef79fe6cd79575d386e54ca0362f43e8e7138ca1f3673ea6a55f884257e9fb1780bae78664816675279a7f5ee799cc5d25ae43287729b1 |
27 |
+DIST grpcio-1.23.0.tar.gz 13977223 BLAKE2B b9f95aaf397eae9610280937980e4b2694af98e6cd5f80015dd83c67ec6bf9c41e76474f873627d6c6cc35fe9af3b45f14aabb6ea809b51cf5f0bb0f3b702794 SHA512 ff3cd9d2380a158ea7a49ba2c9cd5bd1ec98194aa48cf2d45596ab93f0e8a6d6ed0291e5dfc52bca79c62950e6a0ce387819d19f036c0dd1e6dc7b737c1ee97f |
28 |
|
29 |
diff --git a/dev-python/grpcio/files/grpc-1.22.1-glibc-2.30-compat.patch b/dev-python/grpcio/files/grpc-1.22.1-glibc-2.30-compat.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..90bd9115893 |
32 |
--- /dev/null |
33 |
+++ b/dev-python/grpcio/files/grpc-1.22.1-glibc-2.30-compat.patch |
34 |
@@ -0,0 +1,78 @@ |
35 |
+From d1d017390b799c59d6fdf7b8afa6136d218bdd61 Mon Sep 17 00:00:00 2001 |
36 |
+From: Benjamin Peterson <benjamin@×××××××.com> |
37 |
+Date: Fri, 3 May 2019 08:11:00 -0700 |
38 |
+Subject: [PATCH] Rename gettid() functions. |
39 |
+ |
40 |
+glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts. |
41 |
+--- |
42 |
+ src/core/lib/gpr/log_linux.cc | 4 ++-- |
43 |
+ src/core/lib/gpr/log_posix.cc | 4 ++-- |
44 |
+ src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- |
45 |
+ 3 files changed, 6 insertions(+), 6 deletions(-) |
46 |
+ |
47 |
+diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc |
48 |
+index 561276f0c20..8b597b4cf2f 100644 |
49 |
+--- a/src/core/lib/gpr/log_linux.cc |
50 |
++++ b/src/core/lib/gpr/log_linux.cc |
51 |
+@@ -40,7 +40,7 @@ |
52 |
+ #include <time.h> |
53 |
+ #include <unistd.h> |
54 |
+ |
55 |
+-static long gettid(void) { return syscall(__NR_gettid); } |
56 |
++static long sys_gettid(void) { return syscall(__NR_gettid); } |
57 |
+ |
58 |
+ void gpr_log(const char* file, int line, gpr_log_severity severity, |
59 |
+ const char* format, ...) { |
60 |
+@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) { |
61 |
+ gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); |
62 |
+ struct tm tm; |
63 |
+ static __thread long tid = 0; |
64 |
+- if (tid == 0) tid = gettid(); |
65 |
++ if (tid == 0) tid = sys_gettid(); |
66 |
+ |
67 |
+ timer = static_cast<time_t>(now.tv_sec); |
68 |
+ final_slash = strrchr(args->file, '/'); |
69 |
+diff --git a/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc |
70 |
+index b6edc14ab6b..2f7c6ce3760 100644 |
71 |
+--- a/src/core/lib/gpr/log_posix.cc |
72 |
++++ b/src/core/lib/gpr/log_posix.cc |
73 |
+@@ -31,7 +31,7 @@ |
74 |
+ #include <string.h> |
75 |
+ #include <time.h> |
76 |
+ |
77 |
+-static intptr_t gettid(void) { return (intptr_t)pthread_self(); } |
78 |
++static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); } |
79 |
+ |
80 |
+ void gpr_log(const char* file, int line, gpr_log_severity severity, |
81 |
+ const char* format, ...) { |
82 |
+@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) { |
83 |
+ char* prefix; |
84 |
+ gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]", |
85 |
+ gpr_log_severity_string(args->severity), time_buffer, |
86 |
+- (int)(now.tv_nsec), gettid(), display_file, args->line); |
87 |
++ (int)(now.tv_nsec), sys_gettid(), display_file, args->line); |
88 |
+ |
89 |
+ fprintf(stderr, "%-70s %s\n", prefix, args->message); |
90 |
+ gpr_free(prefix); |
91 |
+diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc |
92 |
+index 08116b3ab53..76f59844312 100644 |
93 |
+--- a/src/core/lib/iomgr/ev_epollex_linux.cc |
94 |
++++ b/src/core/lib/iomgr/ev_epollex_linux.cc |
95 |
+@@ -1102,7 +1102,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, |
96 |
+ } |
97 |
+ |
98 |
+ #ifndef NDEBUG |
99 |
+-static long gettid(void) { return syscall(__NR_gettid); } |
100 |
++static long sys_gettid(void) { return syscall(__NR_gettid); } |
101 |
+ #endif |
102 |
+ |
103 |
+ /* pollset->mu lock must be held by the caller before calling this. |
104 |
+@@ -1122,7 +1122,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset, |
105 |
+ #define WORKER_PTR (&worker) |
106 |
+ #endif |
107 |
+ #ifndef NDEBUG |
108 |
+- WORKER_PTR->originator = gettid(); |
109 |
++ WORKER_PTR->originator = sys_gettid(); |
110 |
+ #endif |
111 |
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) { |
112 |
+ gpr_log(GPR_INFO, |
113 |
|
114 |
diff --git a/dev-python/grpcio/grpcio-1.23.0.ebuild b/dev-python/grpcio/grpcio-1.23.0.ebuild |
115 |
new file mode 100644 |
116 |
index 00000000000..62916667f92 |
117 |
--- /dev/null |
118 |
+++ b/dev-python/grpcio/grpcio-1.23.0.ebuild |
119 |
@@ -0,0 +1,40 @@ |
120 |
+# Copyright 1999-2019 Gentoo Authors |
121 |
+# Distributed under the terms of the GNU General Public License v2 |
122 |
+ |
123 |
+EAPI=7 |
124 |
+ |
125 |
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) |
126 |
+inherit distutils-r1 multiprocessing |
127 |
+ |
128 |
+DESCRIPTION="High-performance RPC framework (python libraries)" |
129 |
+HOMEPAGE="https://grpc.io" |
130 |
+SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz" |
131 |
+ |
132 |
+LICENSE="Apache-2.0" |
133 |
+SLOT="0" |
134 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
135 |
+ |
136 |
+RDEPEND=">=dev-libs/openssl-1.0.2:0=[-bindist] |
137 |
+ >=dev-python/cython-0.28.3[${PYTHON_USEDEP}] |
138 |
+ dev-python/protobuf-python[${PYTHON_USEDEP}] |
139 |
+ dev-python/six[${PYTHON_USEDEP}] |
140 |
+ net-dns/c-ares:= |
141 |
+ !<net-libs/grpc-1.16.0[python] |
142 |
+ sys-libs/zlib:= |
143 |
+ virtual/python-enum34[${PYTHON_USEDEP}] |
144 |
+ virtual/python-futures[${PYTHON_USEDEP}] |
145 |
+" |
146 |
+DEPEND="${RDEPEND} |
147 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
148 |
+" |
149 |
+ |
150 |
+PATCHES=( "${FILESDIR}/grpc-1.22.1-glibc-2.30-compat.patch" ) |
151 |
+ |
152 |
+python_configure_all() { |
153 |
+ export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1 |
154 |
+ export GRPC_PYTHON_BUILD_SYSTEM_CARES=1 |
155 |
+ export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 |
156 |
+ export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 |
157 |
+ export GRPC_PYTHON_BUILD_WITH_CYTHON=1 |
158 |
+ export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)" |
159 |
+} |