diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-06-14 19:49:59 -0700 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-06-14 19:50:43 -0700 |
commit | a275799528a1109e58d7191ead0959a8a570cd7a (patch) | |
tree | 08360befd232148c506ad2c2cc9a2f4e99ce53ec /dev-python/grpcio | |
parent | x11-apps/fonttosfnt: Version bump to 1.2.2 (diff) | |
download | gentoo-a275799528a1109e58d7191ead0959a8a570cd7a.tar.gz gentoo-a275799528a1109e58d7191ead0959a8a570cd7a.tar.bz2 gentoo-a275799528a1109e58d7191ead0959a8a570cd7a.zip |
dev-python/grpcio: don't pass gnu99 to cxx
Closes: https://bugs.gentoo.org/730228
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-python/grpcio')
-rw-r--r-- | dev-python/grpcio/files/1.37.1-cc-flag-test-fix.patch | 26 | ||||
-rw-r--r-- | dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch | 35 | ||||
-rw-r--r-- | dev-python/grpcio/grpcio-1.37.1.ebuild | 5 | ||||
-rw-r--r-- | dev-python/grpcio/grpcio-1.38.0.ebuild | 2 |
4 files changed, 68 insertions, 0 deletions
diff --git a/dev-python/grpcio/files/1.37.1-cc-flag-test-fix.patch b/dev-python/grpcio/files/1.37.1-cc-flag-test-fix.patch new file mode 100644 index 000000000000..0869c57dd113 --- /dev/null +++ b/dev-python/grpcio/files/1.37.1-cc-flag-test-fix.patch @@ -0,0 +1,26 @@ +From c21ddf679bf46c0a13046060f17d7a87608923e3 Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev <gyakovlev@gentoo.org> +Date: Mon, 14 Jun 2021 19:38:37 -0700 +Subject: [PATCH] fix cc flag test + +--- + src/python/grpcio/commands.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py +index df8fc46..de71ea5 100644 +--- a/src/python/grpcio/commands.py ++++ b/src/python/grpcio/commands.py +@@ -234,7 +234,8 @@ class BuildExt(build_ext.build_ext): + """ + try: + # TODO(lidiz) Remove the generated a.out for success tests. +- cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'], ++ cc = os.environ.get('CC', 'cc') ++ cc_test = subprocess.Popen([cc, '-x', 'c', '-std=c++11', '-'], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) +-- +2.32.0 + diff --git a/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch b/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch new file mode 100644 index 000000000000..71e02eafeb65 --- /dev/null +++ b/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch @@ -0,0 +1,35 @@ +From 05ae3c5a87ba1037bd4c7a94e6b574c8df847065 Mon Sep 17 00:00:00 2001 +From: Lidi Zheng <lidiz@google.com> +Date: Tue, 6 Apr 2021 06:50:40 -0700 +Subject: [PATCH] Remove -std=gnu99 CFlag when compiling C++ with clang + (#25778) + +* Remove -std=gnu99 CFlag when compiling C++ with clang + +* Use endswith instead of hard-coded slices + +* Fix a typo +--- + src/python/grpcio/commands.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py +index f4a3d2bdc041..df8fc46a3cad 100644 +--- a/src/python/grpcio/commands.py ++++ b/src/python/grpcio/commands.py +@@ -258,10 +258,14 @@ def compiler_ok_with_extra_std(): + old_compile = self.compiler._compile + + def new_compile(obj, src, ext, cc_args, extra_postargs, pp_opts): +- if src[-2:] == '.c': ++ if src.endswith('.c'): + extra_postargs = [ + arg for arg in extra_postargs if not '-std=c++' in arg + ] ++ elif src.endswith('.cc') or src.endswith('.cpp'): ++ extra_postargs = [ ++ arg for arg in extra_postargs if not '-std=gnu99' in arg ++ ] + return old_compile(obj, src, ext, cc_args, extra_postargs, + pp_opts) + diff --git a/dev-python/grpcio/grpcio-1.37.1.ebuild b/dev-python/grpcio/grpcio-1.37.1.ebuild index 9516150c7991..4c178de93a22 100644 --- a/dev-python/grpcio/grpcio-1.37.1.ebuild +++ b/dev-python/grpcio/grpcio-1.37.1.ebuild @@ -27,6 +27,11 @@ RDEPEND=" DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}/1.37.1-cxx-no-gnu99.patch" + "${FILESDIR}/1.37.1-cc-flag-test-fix.patch" +) + python_prepare_all() { distutils-r1_python_prepare_all hprefixify setup.py diff --git a/dev-python/grpcio/grpcio-1.38.0.ebuild b/dev-python/grpcio/grpcio-1.38.0.ebuild index 9a037a3b070e..016123e41945 100644 --- a/dev-python/grpcio/grpcio-1.38.0.ebuild +++ b/dev-python/grpcio/grpcio-1.38.0.ebuild @@ -27,6 +27,8 @@ RDEPEND=" DEPEND="${RDEPEND}" +PATCHES=( "${FILESDIR}/1.37.1-cc-flag-test-fix.patch" ) + python_prepare_all() { distutils-r1_python_prepare_all hprefixify setup.py |