libssh2.mk 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ################################################################################
  2. #
  3. # libssh2
  4. #
  5. ################################################################################
  6. LIBSSH2_VERSION = 1.11.0
  7. LIBSSH2_SOURCE= libssh2-$(LIBSSH2_VERSION).tar.xz
  8. LIBSSH2_SITE = https://www.libssh2.org/download
  9. LIBSSH2_LICENSE = BSD
  10. LIBSSH2_LICENSE_FILES = COPYING
  11. LIBSSH2_CPE_ID_VENDOR = libssh2
  12. LIBSSH2_INSTALL_STAGING = YES
  13. LIBSSH2_CONF_OPTS = --disable-examples-build --disable-rpath
  14. # 0002-src-add-strict-KEX-to-fix-CVE-2023-48795-Terrapin-Attack.patch
  15. LIBSSH2_IGNORE_CVES += CVE-2023-48795
  16. ifeq ($(BR2_PACKAGE_LIBSSH2_MBEDTLS),y)
  17. LIBSSH2_DEPENDENCIES += mbedtls
  18. LIBSSH2_CONF_OPTS += --with-libmbedcrypto-prefix=$(STAGING_DIR)/usr \
  19. --with-crypto=mbedtls
  20. else ifeq ($(BR2_PACKAGE_LIBSSH2_LIBGCRYPT),y)
  21. LIBSSH2_DEPENDENCIES += libgcrypt
  22. LIBSSH2_CONF_OPTS += --with-libgcrypt-prefix=$(STAGING_DIR)/usr \
  23. --with-crypto=libgcrypt
  24. # configure.ac forgets to link to dependent libraries of gcrypt breaking static
  25. # linking
  26. LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`"
  27. else ifeq ($(BR2_PACKAGE_LIBSSH2_OPENSSL),y)
  28. LIBSSH2_DEPENDENCIES += host-pkgconf openssl
  29. LIBSSH2_CONF_OPTS += --with-libssl-prefix=$(STAGING_DIR)/usr \
  30. --with-crypto=openssl
  31. # configure.ac forgets to link to dependent libraries of openssl breaking static
  32. # linking
  33. LIBSSH2_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
  34. endif
  35. # Add zlib support if enabled
  36. ifeq ($(BR2_PACKAGE_ZLIB),y)
  37. LIBSSH2_DEPENDENCIES += zlib
  38. LIBSSH2_CONF_OPTS += --with-libz \
  39. --with-libz-prefix=$(STAGING_DIR)/usr
  40. else
  41. LIBSSH2_CONF_OPTS += --without-libz
  42. endif
  43. HOST_LIBSSH2_DEPENDENCIES += host-openssl
  44. HOST_LIBSSH2_CONF_OPTS += --with-openssl \
  45. --with-libssl-prefix=$(HOST_DIR) \
  46. --without-libgcrypt
  47. $(eval $(autotools-package))
  48. $(eval $(host-autotools-package))