commit:     90a3eef594bfb10cc5f79612714b6d03e816608e
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 18 22:20:40 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Mar 18 22:20:49 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90a3eef5

net-libs/libssh2: Update live ebuild

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-libs/libssh2/libssh2-9999.ebuild | 64 ++++++++++++++++++++----------------
 1 file changed, 35 insertions(+), 29 deletions(-)

diff --git a/net-libs/libssh2/libssh2-9999.ebuild 
b/net-libs/libssh2/libssh2-9999.ebuild
index 4ed00d50973..456ca920385 100644
--- a/net-libs/libssh2/libssh2-9999.ebuild
+++ b/net-libs/libssh2/libssh2-9999.ebuild
@@ -1,50 +1,56 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit autotools git-r3 multilib-minimal
+inherit git-r3 cmake-multilib
 
-EGIT_REPO_URI="https://github.com/libssh2/libssh2";
 DESCRIPTION="Library implementing the SSH2 protocol"
 HOMEPAGE="https://www.libssh2.org";
-SRC_URI=""
+EGIT_REPO_URI="https://github.com/libssh2/libssh2";
 
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS=""
-IUSE="gcrypt libressl static-libs test zlib"
+IUSE="gcrypt libressl mbedtls zlib"
+REQUIRED_USE="
+       ?? ( gcrypt libressl mbedtls )
+"
+RESTRICT="test"
 
-DEPEND="
-       !gcrypt? (
-               !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] 
)
-               libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
-       )
+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[${MULTILIB_USEDEP}] )
        zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
 "
-RDEPEND="${DEPEND}"
-
-DOCS=( NEWS README )
-
-src_prepare() {
-       default
-
-       sed -i -e 's|mansyntax.sh||g' tests/Makefile.am || die
-       ln -s ../src/libssh2_config.h.in example/libssh2_config.h.in || die
+DEPEND="
+       ${RDEPEND}
+"
 
-       eautoreconf
-}
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch
+)
 
 multilib_src_configure() {
-       # Disable tests that require extra permissions (bug #333319)
-       use test && local -x ac_cv_path_SSHD=
-
-       local crypto
+       local crypto_backend=OpenSSL
        if use gcrypt; then
-               crypto=libgcrypt
-       else
-               crypto=openssl
+               crypto_backend=Libgcrypt
+       elif use mbedtls; then
+               crypto_backend=mbedTLS
        fi
 
-       ECONF_SOURCE="${S}" econf --with-crypto=${crypto}
+       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 "${ED}" -name '*.la' -delete || die
+       mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF}/ || die
+       rm -r "${ED}"/usr/share/doc/${PN}/ || die
 }

Reply via email to