summaryrefslogtreecommitdiff
path: root/devel/py-grpcio-tools/files/patch-setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'devel/py-grpcio-tools/files/patch-setup.py')
-rw-r--r--devel/py-grpcio-tools/files/patch-setup.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/devel/py-grpcio-tools/files/patch-setup.py b/devel/py-grpcio-tools/files/patch-setup.py
new file mode 100644
index 000000000000..05e7375feb7d
--- /dev/null
+++ b/devel/py-grpcio-tools/files/patch-setup.py
@@ -0,0 +1,29 @@
+--- setup.py.orig 2022-10-01 13:52:51 UTC
++++ setup.py
+@@ -149,7 +149,7 @@ if EXTRA_ENV_COMPILE_ARGS is None:
+ # We need to statically link the C++ Runtime, only the C runtime is
+ # available dynamically
+ EXTRA_ENV_COMPILE_ARGS += ' /MT'
+- elif "linux" in sys.platform or "darwin" in sys.platform:
++ elif "linux" in sys.platform or "darwin" in sys.platform or "freebsd" in sys.platform:
+ EXTRA_ENV_COMPILE_ARGS += ' -fno-wrapv -frtti'
+ if EXTRA_ENV_LINK_ARGS is None:
+ EXTRA_ENV_LINK_ARGS = ''
+@@ -175,7 +175,7 @@ if EXTRA_ENV_LINK_ARGS is None:
+ if "darwin" in sys.platform:
+ EXTRA_ENV_LINK_ARGS += ' -Wl,-exported_symbol,_{}'.format(
+ _EXT_INIT_SYMBOL)
+- if "linux" in sys.platform or "darwin" in sys.platform:
++ if "linux" in sys.platform or "darwin" in sys.platform or "freebsd" in sys.platform:
+ EXTRA_ENV_LINK_ARGS += ' -lpthread'
+ if check_linker_need_libatomic():
+ EXTRA_ENV_LINK_ARGS += ' -latomic'
+@@ -206,7 +206,7 @@ if "win32" in sys.platform:
+ DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1),)
+ if '64bit' in platform.architecture()[0]:
+ DEFINE_MACROS += (('MS_WIN64', 1),)
+-elif "linux" in sys.platform or "darwin" in sys.platform:
++elif "linux" in sys.platform or "darwin" in sys.platform or "freebsd" in sys.platform:
+ DEFINE_MACROS += (('HAVE_PTHREAD', 1),)
+
+ # By default, Python3 distutils enforces compatibility of