aboutsummaryrefslogtreecommitdiff
path: root/libs/libssh2
diff options
context:
space:
mode:
authorSebastian Kemper <sebastian_ml@gmx.net>2020-05-08 21:34:47 +0200
committerSebastian Kemper <sebastian_ml@gmx.net>2020-05-11 20:28:57 +0200
commitc0da37b1cd21c244b988698cdf81e85a7d424495 (patch)
tree64b933fb164d61b03822f5e1e6a90a1089ebd975 /libs/libssh2
parent234eb30b38bf56d05942d6129871909a77e772fe (diff)
libssh2: switch default to OpenSSL and fix depends
All packages in the tree that depend on libssh2 _and_ have their own dependency on a TLS library, depend on OpenSSL by default. It makes sense for the libssh2 package to default to OpenSSL as well. This way it does not pull in a second TLS library. Also, the OpenSSL dependency is changed to "+!LIBSSH2_MBEDTLS:libopenssl", which fixes build issues in case libssh2 is not selected but built anyway. And last, Config.in file is removed and its content added to the Makefile instead. Closes #12108 Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Diffstat (limited to 'libs/libssh2')
-rw-r--r--libs/libssh2/Config.in15
-rw-r--r--libs/libssh2/Makefile26
2 files changed, 17 insertions, 24 deletions
diff --git a/libs/libssh2/Config.in b/libs/libssh2/Config.in
deleted file mode 100644
index 708c07bad..000000000
--- a/libs/libssh2/Config.in
+++ /dev/null
@@ -1,15 +0,0 @@
-if PACKAGE_libssh2
-
-choice
- prompt "Choose crypto backend"
- default LIBSSH2_MBEDTLS
-
- config LIBSSH2_MBEDTLS
- bool "mbedtls"
-
- config LIBSSH2_OPENSSL
- bool "openssl"
-
-endchoice
-
-endif
diff --git a/libs/libssh2/Makefile b/libs/libssh2/Makefile
index f619f37ee..12d3b2bd8 100644
--- a/libs/libssh2/Makefile
+++ b/libs/libssh2/Makefile
@@ -35,7 +35,7 @@ define Package/libssh2
CATEGORY:=Libraries
TITLE:=SSH2 library
URL:=https://www.libssh2.org/
- DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +LIBSSH2_OPENSSL:libopenssl +zlib
+ DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +!LIBSSH2_MBEDTLS:libopenssl +zlib
ABI_VERSION:=1
endef
@@ -44,20 +44,28 @@ define Package/libssh2/description
endef
define Package/libssh2/config
- source "$(SOURCE)/Config.in"
+if PACKAGE_libssh2
+
+choice
+ prompt "Choose crypto backend"
+ default LIBSSH2_OPENSSL
+
+ config LIBSSH2_OPENSSL
+ bool "openssl"
+
+ config LIBSSH2_MBEDTLS
+ bool "mbedtls"
+endchoice
+
+endif
endef
CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DENABLE_ZLIB_COMPRESSION=ON \
- -DCLEAR_MEMORY=ON
-
-ifeq ($(CONFIG_LIBSSH2_OPENSSL),y)
- CMAKE_OPTIONS += -DCRYPTO_BACKEND=OpenSSL
-else
- CMAKE_OPTIONS += -DCRYPTO_BACKEND=mbedTLS
-endif
+ -DCLEAR_MEMORY=ON \
+ -DCRYPTO_BACKEND=$(if $(CONFIG_LIBSSH2_MBEDTLS),mbedTLS,OpenSSL)
define Package/libssh2/install
$(INSTALL_DIR) $(1)/usr/lib