python-curl: remove hardcoded dependency on mbedtls
authorVal Kulkov <redacted>
Tue, 14 May 2019 05:47:09 +0000 (01:47 -0400)
committerVal Kulkov <redacted>
Tue, 14 May 2019 05:47:09 +0000 (01:47 -0400)
Fixes issue #8978. If libcurl's SSL library is set to an SSL
library other than libmbedtls, compilation fails. This patch
configures python-curl to use the currently selected SSL library
for libcurl.

Signed-off-by: Val Kulkov <redacted>
lang/python/python-curl/Makefile

index a5b4f54d407c7b4d1d9b9bea54a322e0a502999a..ec364aa8820c59a06d9d76d3c79751681f970ed4 100644 (file)
@@ -55,8 +55,20 @@ $(call Package/python-curl/description)
 (Variant for Python3)
 endef
 
-PYTHON_PKG_SETUP_ARGS:=--with-mbedtls
-PYTHON3_PKG_SETUP_ARGS:=--with-mbedtls
+ifdef CONFIG_LIBCURL_OPENSSL
+  PYTHON_PKG_SETUP_ARGS:=--with-openssl
+  PYTHON3_PKG_SETUP_ARGS:=--with-openssl
+endif
+
+ifdef CONFIG_LIBCURL_GNUTLS
+  PYTHON_PKG_SETUP_ARGS:=--with-gnutls
+  PYTHON3_PKG_SETUP_ARGS:=--with-gnutls
+endif
+
+ifdef CONFIG_LIBCURL_MBEDTLS
+  PYTHON_PKG_SETUP_ARGS:=--with-mbedtls
+  PYTHON3_PKG_SETUP_ARGS:=--with-mbedtls
+endif
 
 $(eval $(call PyPackage,python-curl))
 $(eval $(call BuildPackage,python-curl))
git clone https://git.99rst.org/PROJECT