1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit git-r3 cmake-multilib
7 DESCRIPTION="Library implementing the SSH2 protocol"
8 HOMEPAGE="https://www.libssh2.org"
9 EGIT_REPO_URI="https://github.com/libssh2/libssh2"
14 IUSE="gcrypt libressl mbedtls zlib"
15 REQUIRED_USE="?? ( gcrypt mbedtls )"
19 gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
21 mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] )
23 !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
24 libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
27 zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
34 "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch
37 multilib_src_configure() {
38 local crypto_backend=OpenSSL
40 crypto_backend=Libgcrypt
41 elif use mbedtls; then
42 crypto_backend=mbedTLS
46 -DBUILD_SHARED_LIBS=ON
47 -DCRYPTO_BACKEND=${crypto_backend}
48 -DENABLE_ZLIB_COMPRESSION=$(usex zlib)
50 cmake-utils_src_configure
53 multilib_src_install_all() {
55 find "${ED}" -name '*.la' -delete || die