python-curl: fix build on macos
authorSergey V. Lobanov <sergey@lobanov.in>
Fri, 14 Jan 2022 17:45:31 +0000 (20:45 +0300)
committerRosen Penev <rosenp@gmail.com>
Wed, 19 Jan 2022 02:09:35 +0000 (18:09 -0800)
setup.py detects macos (darwin) and adds -flat_namespace flag. This
flag is not compatible with GCC that is used to compile target.

This patch patch disables darwin detection

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
lang/python/python-curl/Makefile
lang/python/python-curl/patches/100_macos_compat.patch [new file with mode: 0644]

index 0e64335d2fdf6771b4f797be97db27b59b41df8f..630ccd941f37133bfb6c9ddce77645f75cca1491 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pycurl
 PKG_VERSION:=7.44.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=2ce9905626d8ceafcbadee666e2f45397e29c7618ddcdc63fc22d85e5046c6d6
diff --git a/lang/python/python-curl/patches/100_macos_compat.patch b/lang/python/python-curl/patches/100_macos_compat.patch
new file mode 100644 (file)
index 0000000..fc233da
--- /dev/null
@@ -0,0 +1,15 @@
+Support build on MacOS
+This patch should be deleted after resolving https://github.com/pycurl/pycurl/issues/727
+---
+--- a/setup.py
++++ b/setup.py
+@@ -347,9 +347,6 @@ manually. For other SSL backends please
+         if not self.libraries:
+             self.libraries.append("curl")
+-        # Add extra compile flag for MacOS X
+-        if sys.platform.startswith('darwin'):
+-            self.extra_link_args.append("-flat_namespace")
+         # Recognize --avoid-stdio on Unix so that it can be tested
+         self.check_avoid_stdio()