2013-08-30 16:09:44 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libssh2
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_VERSION = 616fd4d1b3e4a55de67c48819fefca83132126b5
|
|
|
|
LIBSSH2_SITE = $(call github,libssh2,libssh2,$(LIBSSH2_VERSION))
|
2013-08-30 16:09:44 +02:00
|
|
|
LIBSSH2_LICENSE = BSD
|
|
|
|
LIBSSH2_LICENSE_FILES = COPYING
|
|
|
|
LIBSSH2_INSTALL_STAGING = YES
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBSSH2_CONF_OPTS = --disable-examples-build
|
2013-08-30 16:09:44 +02:00
|
|
|
|
2017-10-31 18:56:30 +01:00
|
|
|
# building from a git clone
|
|
|
|
LIBSSH2_AUTORECONF = YES
|
|
|
|
|
package/libssh2: Add selectable crypto libraries
Currently, the selection of the backend is based on a priority order,
which is not always desirable: not all features are available for all
backends, as reported upstream:
https://github.com/libssh2/libssh2/issues/213
In that particular case, the problem is that libgcrypt is unable to
read encrypted certificates created with openssl, but it is likely
that other incompatibilities exist as well.
As such, allow a user to select the backend most appropriate to their
use-case.
Note that this changes the defaults: previously, if openssl was already
selected and we additionally select libssh2, openssl would be used as
a backend. Now, mbedtls is the default so if the user doesn't change
it, mbedtls will be used.
Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
[Arnout: remove now-unneeded comment in .mk file]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-11-01 17:22:56 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBSSH2_MBEDTLS),y)
|
2017-07-10 19:35:54 +02:00
|
|
|
LIBSSH2_DEPENDENCIES += mbedtls
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libmbedcrypto-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-crypto=mbedtls
|
package/libssh2: Add selectable crypto libraries
Currently, the selection of the backend is based on a priority order,
which is not always desirable: not all features are available for all
backends, as reported upstream:
https://github.com/libssh2/libssh2/issues/213
In that particular case, the problem is that libgcrypt is unable to
read encrypted certificates created with openssl, but it is likely
that other incompatibilities exist as well.
As such, allow a user to select the backend most appropriate to their
use-case.
Note that this changes the defaults: previously, if openssl was already
selected and we additionally select libssh2, openssl would be used as
a backend. Now, mbedtls is the default so if the user doesn't change
it, mbedtls will be used.
Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
[Arnout: remove now-unneeded comment in .mk file]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-11-01 17:22:56 +01:00
|
|
|
else ifeq ($(BR2_PACKAGE_LIBSSH2_LIBGCRYPT),y)
|
2013-08-30 16:09:44 +02:00
|
|
|
LIBSSH2_DEPENDENCIES += libgcrypt
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libgcrypt-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-crypto=libgcrypt
|
2014-11-18 15:31:33 +01:00
|
|
|
# configure.ac forgets to link to dependent libraries of gcrypt breaking static
|
|
|
|
# linking
|
2015-07-12 16:35:26 +02:00
|
|
|
LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`"
|
package/libssh2: Add selectable crypto libraries
Currently, the selection of the backend is based on a priority order,
which is not always desirable: not all features are available for all
backends, as reported upstream:
https://github.com/libssh2/libssh2/issues/213
In that particular case, the problem is that libgcrypt is unable to
read encrypted certificates created with openssl, but it is likely
that other incompatibilities exist as well.
As such, allow a user to select the backend most appropriate to their
use-case.
Note that this changes the defaults: previously, if openssl was already
selected and we additionally select libssh2, openssl would be used as
a backend. Now, mbedtls is the default so if the user doesn't change
it, mbedtls will be used.
Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
[Arnout: remove now-unneeded comment in .mk file]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-11-01 17:22:56 +01:00
|
|
|
else ifeq ($(BR2_PACKAGE_LIBSSH2_OPENSSL),y)
|
2013-08-30 16:09:44 +02:00
|
|
|
LIBSSH2_DEPENDENCIES += openssl
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libssl-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-crypto=openssl
|
2013-08-30 16:09:44 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Add zlib support if enabled
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
LIBSSH2_DEPENDENCIES += zlib
|
2015-02-14 18:38:28 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libz \
|
|
|
|
--with-libz-prefix=$(STAGING_DIR)/usr
|
2013-08-30 16:09:44 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBSSH2_CONF_OPTS += --without-libz
|
2013-08-30 16:09:44 +02:00
|
|
|
endif
|
|
|
|
|
2018-02-04 19:07:44 +01:00
|
|
|
HOST_LIBSSH2_DEPENDENCIES += host-openssl
|
|
|
|
HOST_LIBSSH2_CONF_OPTS += --with-openssl \
|
|
|
|
--with-libssl-prefix=$(HOST_DIR)/usr \
|
|
|
|
--without-libgcrypt
|
|
|
|
|
2013-08-30 16:09:44 +02:00
|
|
|
$(eval $(autotools-package))
|
2018-02-04 19:07:44 +01:00
|
|
|
$(eval $(host-autotools-package))
|