commit:     332e46acba122c73d23f74ac2f8be6ed9cb61d56
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 15 06:08:30 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 06:08:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=332e46ac

net-libs/libssh2: Switch to multilib-minimal.eclass.

Package-Manager: Portage-2.3.7, Repoman-2.3.3

 .../files/libssh2-1.8.0-libgcrypt-prefix.patch     | 52 +++++++---------------
 .../libssh2/files/libssh2-1.8.0-mansyntax_sh.patch | 41 +++++++++++++++++
 net-libs/libssh2/libssh2-1.8.0-r1.ebuild           | 50 +++++++++++++++++++++
 3 files changed, 106 insertions(+), 37 deletions(-)

diff --git a/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch 
b/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch
index 38541feceeb..10065626fe2 100644
--- a/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch
+++ b/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch
@@ -1,37 +1,3 @@
-From ad5223220aa83e2439657ddce6ffca4445f08f8c Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <[email protected]>
-Date: Mon, 31 Oct 2016 09:04:33 +0000
-Subject: [PATCH] acinclude.m4: fix ./configure --with-libgcrypt
-
-The change fixes passing of bogus gcrypt prefix.
-Reproducible as:
-
-    $ ./configure --with-libgcrypt
-    $ make V=1
-    ...
-    /bin/sh ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Iyes/include 
-version-info 1:1:0 -no-undefined -export-symbols-regex '^libssh2_.*' -lgcrypt  
-lz -Lyes/lib -o libssh2.la -rpath /usr/local/lib channel.lo comp.lo crypt.lo 
hostkey.lo kex.lo mac.lo misc.lo packet.lo publickey.lo scp.lo session.lo 
sftp.lo userauth.lo transport.lo version.lo knownhost.lo agent.lo libgcrypt.lo 
pem.lo keepalive.lo global.lo   -lgcrypt
-    ../libtool: line 7475: cd: yes/lib: No such file or directory
-    libtool:   error: cannot determine absolute directory name of 'yes/lib'
-
-These
-    -Iyes/include
-    -Lyes/lib
-come from libgcrypt code autodetection:
-  if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
-     LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
-     CFLAGS="$CFLAGS -I$use_libgcrypt/include"
-
-I assume it's a typo to use yes/no flag as a prefix and changed
-it to '$with_libgcrypt_prefix'.
-
-Reported-by: Mikhail Pukhlikov <[email protected]>
-Signed-off-by: Sergei Trofimovich <[email protected]>
----
- acinclude.m4 | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 734ef07..c78260c 100644
 --- a/acinclude.m4
 +++ b/acinclude.m4
 @@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [
@@ -47,6 +13,18 @@ index 734ef07..c78260c 100644
    fi
    AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [
      #include <gcrypt.h>
--- 
-2.10.1
-
+--- a/configure
++++ b/configure
+@@ -14250,9 +14235,9 @@
+ 
+   old_LDFLAGS=$LDFLAGS
+   old_CFLAGS=$CFLAGS
+-  if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
+-    LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
+-    CFLAGS="$CFLAGS -I$use_libgcrypt/include"
++  if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then
++    LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib"
++    CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include"
+   fi
+ 
+ 

diff --git a/net-libs/libssh2/files/libssh2-1.8.0-mansyntax_sh.patch 
b/net-libs/libssh2/files/libssh2-1.8.0-mansyntax_sh.patch
new file mode 100644
index 00000000000..3a33bf74416
--- /dev/null
+++ b/net-libs/libssh2/files/libssh2-1.8.0-mansyntax_sh.patch
@@ -0,0 +1,41 @@
+--- a/tests/mansyntax.sh
++++ b/tests/mansyntax.sh
+@@ -1,37 +1,2 @@
+ #!/bin/sh
+-set -e
+-
+-# Written by Mikhail Gusarov
+-#
+-# Run syntax checks for all manpages in the documentation tree.
+-#
+-
+-srcdir=${srcdir:-$PWD}
+-dstdir=${builddir:-$PWD}
+-mandir=${srcdir}/../docs
+-
+-#
+-# Only test if suitable man is available
+-#
+-if ! man --help | grep -q warnings; then
+-  echo "man version not suitable, skipping tests"
+-  exit 0
+-fi
+-
+-ec=0
+-
+-trap "rm -f $dstdir/man3" EXIT
+-
+-ln -sf "$mandir" "$dstdir/man3"
+-
+-for manpage in $mandir/libssh2_*.*; do
+-  echo "$manpage"
+-  warnings=$(LANG=en_US.UTF-8 MANWIDTH=80 man -M "$dstdir" --warnings \
+-    -E UTF-8 -l "$manpage" 2>&1 >/dev/null)
+-  if [ -n "$warnings" ]; then
+-    echo "$warnings"
+-    ec=1
+-  fi
+-done
+-
+-exit $ec
++:

diff --git a/net-libs/libssh2/libssh2-1.8.0-r1.ebuild 
b/net-libs/libssh2/libssh2-1.8.0-r1.ebuild
new file mode 100644
index 00000000000..af51f92f415
--- /dev/null
+++ b/net-libs/libssh2/libssh2-1.8.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit ltprune multilib-minimal
+
+DESCRIPTION="Library implementing the SSH2 protocol"
+HOMEPAGE="http://www.libssh2.org/";
+SRC_URI="http://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 static-libs test zlib"
+
+DEPEND="
+       !gcrypt? (
+               !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] 
)
+               libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+       )
+       gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
+       zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+       ${DEPEND}
+"
+
+DOCS=(
+       NEWS README
+)
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch
+       "${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=
+
+       ECONF_SOURCE=${S} econf \
+               $(use_with zlib libz) \
+               $(usex gcrypt --with-libgcrypt --with-openssl) \
+               $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+       einstalldocs
+
+       prune_libtool_files
+}

Reply via email to