dev-qt/qtx11extras: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / net-libs / libssh2 / libssh2-9999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit git-r3 cmake-multilib
6
7 DESCRIPTION="Library implementing the SSH2 protocol"
8 HOMEPAGE="https://www.libssh2.org"
9 EGIT_REPO_URI="https://github.com/libssh2/libssh2"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS=""
14 IUSE="gcrypt libressl mbedtls zlib"
15 REQUIRED_USE="?? ( gcrypt mbedtls )"
16 RESTRICT="test"
17
18 RDEPEND="
19         gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
20         !gcrypt? (
21                 mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] )
22                 !mbedtls? (
23                         !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
24                         libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
25                 )
26         )
27         zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
28 "
29 DEPEND="
30         ${RDEPEND}
31 "
32
33 PATCHES=(
34         "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch
35 )
36
37 multilib_src_configure() {
38         local crypto_backend=OpenSSL
39         if use gcrypt; then
40                 crypto_backend=Libgcrypt
41         elif use mbedtls; then
42                 crypto_backend=mbedTLS
43         fi
44
45         local mycmakeargs=(
46                 -DBUILD_SHARED_LIBS=ON
47                 -DCRYPTO_BACKEND=${crypto_backend}
48                 -DENABLE_ZLIB_COMPRESSION=$(usex zlib)
49         )
50         cmake-utils_src_configure
51 }
52
53 multilib_src_install_all() {
54         einstalldocs
55         find "${ED}" -name '*.la' -delete || die
56 }