kumquat-buildroot/package/libssh/libssh.mk

41 lines
1.1 KiB
Makefile
Raw Normal View History

################################################################################
#
# libssh
#
################################################################################
LIBSSH_VERSION_MAJOR = 0.8
LIBSSH_VERSION = $(LIBSSH_VERSION_MAJOR).1
LIBSSH_SOURCE = libssh-$(LIBSSH_VERSION).tar.xz
LIBSSH_SITE = https://www.libssh.org/files/$(LIBSSH_VERSION_MAJOR)
LIBSSH_LICENSE = LGPL-2.1
LIBSSH_LICENSE_FILES = COPYING
LIBSSH_INSTALL_STAGING = YES
LIBSSH_SUPPORTS_IN_SOURCE_BUILD = NO
LIBSSH_CONF_OPTS = \
-DWITH_STACK_PROTECTOR=OFF \
-DWITH_SERVER=OFF \
-DWITH_EXAMPLES=OFF
# cmake older than 3.10 require this to avoid try_run() in FindThreads
LIBSSH_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
ifeq ($(BR2_PACKAGE_ZLIB),y)
LIBSSH_CONF_OPTS += -DWITH_ZLIB=ON
LIBSSH_DEPENDENCIES += zlib
else
LIBSSH_CONF_OPTS += -DWITH_ZLIB=OFF
endif
package/libssh: fix dependency on libgcrypt Since 2f89476 (package/libgpg-error: bump to version 1.23), libssh has inherited the dependency from libgcrypt (propagated from libgpg-error). However, since libssh can use either openssl or libgcrypt as a backend, the dependency should be relaxed when openssl is available. But the test is broken and inverted: it will make libssh unavailable as soon as openssl is enabled. This in itself is already incorrect, but that can cause further issues, as some packages (e.g. Kodi) will select (indirectly) openssl, and has an option to select libssh; enabling that option causes unmet direct dependencies of libssh: warning: (BR2_PACKAGE_KODI_LIBSSH) selects BR2_PACKAGE_LIBSSH which has unmet direct dependencies (BR2_USE_MMU && !BR2_STATIC_LIBS && BR2_TOOLCHAIN_HAS_THREADS && BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS && !BR2_PACKAGE_OPENSSL) Fix this dependency by doing what other similar packages do: select openssl if the other crypto backend (here libgcrypt) is not enabled. This also allows us to drop the propagated dependency on the arch condition. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Cc: Jörg Krause <joerg.krause@embedded.rocks> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Romain Naour <romain.naour@openwide.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-08 23:11:47 +02:00
# Dependency is either on libgcrypt or openssl, guaranteed in Config.in.
# Favour libgcrypt.
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
LIBSSH_CONF_OPTS += -DWITH_GCRYPT=ON
LIBSSH_DEPENDENCIES += libgcrypt
else
LIBSSH_CONF_OPTS += -DWITH_GCRYPT=OFF
LIBSSH_DEPENDENCIES += openssl
endif
$(eval $(cmake-package))