perl-net-ssh2: add support for libgcrypt crypto backend
authorThomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Mon, 23 Jul 2018 20:06:28 +0000 (22:06 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 25 Jul 2018 21:04:09 +0000 (23:04 +0200)
Fix usage of libgcrypt as crypto backend to libssh2, when building
perl-net-ssh2. In order to achieve that, we need to use 'depends on' the
libssh2 backends, which means the user will first need to enable libssh2 and
one of the supported backends, before being able to enable perl-net-ssh2.

Fixes
http://autobuild.buildroot.net/results/6ee18e7dd17f168c52f79e49cb5e94cf3aa3df1a/

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/perl-net-ssh2/Config.in
package/perl-net-ssh2/perl-net-ssh2.mk

index 8f359b701567b0050b56f4ed08beee391d4509d1..4dfd6e1dd3bee245a6224dbc4f7fd0416bcd0872 100644 (file)
@@ -1,12 +1,18 @@
 config BR2_PACKAGE_PERL_NET_SSH2
        bool "perl-net-ssh2"
        depends on !BR2_STATIC_LIBS
-       select BR2_PACKAGE_LIBSSH2
+       depends on BR2_PACKAGE_LIBSSH2_OPENSSL || BR2_PACKAGE_LIBSSH2_LIBGCRYPT
        select BR2_PACKAGE_ZLIB
        help
          Support for the SSH 2 protocol via libssh2.
 
+         Note: only the OpenSSL and Libgcrypt backends of libssh2 are
+         supported.
+
          https://metacpan.org/release/Net-SSH2
 
 comment "perl-net-ssh2 needs a toolchain w/ dynamic library"
        depends on BR2_STATIC_LIBS
+
+comment "perl-net-ssh2 needs libssh2 with OpenSSL or Libgcrypt backend"
+       depends on !(BR2_PACKAGE_LIBSSH2_OPENSSL || BR2_PACKAGE_LIBSSH2_LIBGCRYPT)
index 77d39edef5b62c57206410c8c14a3d46c6425088..ebd580382613f3fd8f4e098a5c81038a7dd63f96 100644 (file)
@@ -15,4 +15,8 @@ PERL_NET_SSH2_CONF_OPTS += \
        lib="$(STAGING_DIR)/usr/lib" \
        inc="$(STAGING_DIR)/usr/include"
 
+ifeq ($(BR2_PACKAGE_LIBSSH2_LIBGCRYPT),y)
+PERL_NET_SSH2_CONF_OPTS += gcrypt
+endif
+
 $(eval $(perl-package))