diff options
author | Jeroen Roovers <jer@gentoo.org> | 2018-10-01 13:45:43 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2018-10-01 13:46:10 +0200 |
commit | d866d4705e1e4a092579a31df2815e3407950a19 (patch) | |
tree | a76806352d47e3eb5c3f4334f8db164c4aebdc78 /net-libs/libssh2 | |
parent | www-client/firefox: x86 stable (bug #666760) (diff) | |
download | gentoo-d866d4705e1e4a092579a31df2815e3407950a19.tar.gz gentoo-d866d4705e1e4a092579a31df2815e3407950a19.tar.bz2 gentoo-d866d4705e1e4a092579a31df2815e3407950a19.zip |
net-libs/libssh2: Add USE=mbedtls, switch to cmake for building
* Add support for net-libs/mbedtls
* Switch to cmake as the autotools build is even more broken
* Remove USE=static-libs as that inhibits building shared libs
* Use REQUIRED_USE to force choosing a crypto backend
Package-Manager: Portage-2.3.50, Repoman-2.3.11
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-libs/libssh2')
-rw-r--r-- | net-libs/libssh2/libssh2-1.8.0-r2.ebuild | 56 | ||||
-rw-r--r-- | net-libs/libssh2/metadata.xml | 2 |
2 files changed, 58 insertions, 0 deletions
diff --git a/net-libs/libssh2/libssh2-1.8.0-r2.ebuild b/net-libs/libssh2/libssh2-1.8.0-r2.ebuild new file mode 100644 index 000000000000..daf148cbce65 --- /dev/null +++ b/net-libs/libssh2/libssh2-1.8.0-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit cmake-utils multilib-minimal + +DESCRIPTION="Library implementing the SSH2 protocol" +HOMEPAGE="https://www.libssh2.org" +SRC_URI="https://www.${PN}.org/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" +IUSE="gcrypt libressl mbedtls test zlib" +REQUIRED_USE=" + ?? ( gcrypt libressl mbedtls ) +" + +RDEPEND=" + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + mbedtls? ( net-libs/mbedtls ) + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch + "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch + "${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch + "${FILESDIR}"/${PN}-1.8.0-openssl11.patch +) + +multilib_src_configure() { + local crypto_backend=OpenSSL + if use gcrypt; then + crypto_backend=Libgcrypt + elif use mbedtls; then + crypto_backend=mbedTLS + fi + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DCRYPTO_BACKEND=${crypto_backend} + -DENABLE_ZLIB_COMPRESSION=$(usex zlib) + ) + cmake-utils_src_configure +} + +multilib_src_install_all() { + einstalldocs + find "${D}" -name '*.la' -delete || die + mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF}/ || die + rm -r "${D}"/usr/share/doc/${PN}/ || die +} diff --git a/net-libs/libssh2/metadata.xml b/net-libs/libssh2/metadata.xml index e9e734ab02f9..2149f2ed0c6f 100644 --- a/net-libs/libssh2/metadata.xml +++ b/net-libs/libssh2/metadata.xml @@ -10,5 +10,7 @@ </maintainer> <use> <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> instead of <pkg>dev-libs/openssl</pkg></flag> + <flag name="libressl">Use <pkg>dev-libs/libressl</pkg> instead of <pkg>dev-libs/openssl</pkg></flag> + <flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> instead of <pkg>dev-libs/openssl</pkg></flag> </use> </pkgmetadata> |