Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh2/, net-libs/libssh2/files/
Date: Mon, 31 Oct 2016 09:20:13
Message-Id: 1477905592.17b438ee01bc4626a203581cf539eebcee394dc1.slyfox@gentoo
1 commit: 17b438ee01bc4626a203581cf539eebcee394dc1
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 31 09:19:35 2016 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 31 09:19:52 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17b438ee
7
8 net-libs/libssh2: fix USE=gcrypt build failure
9
10 $ ./configure --with-libgcrypt
11 triggered injection of
12 -Iyes/include
13 -Lyes/lib
14 commandline flags.
15
16 Fix uses '$with_libgcrypt_prefix' to specify prefix.
17
18 Reported-by: Mikhail Pukhlikov <cynede <AT> gentoo.org>
19
20 Package-Manager: portage-2.3.2
21
22 .../files/libssh2-1.8.0-libgcrypt-prefix.patch | 52 ++++++++++++++++++++++
23 net-libs/libssh2/libssh2-1.8.0.ebuild | 2 +
24 net-libs/libssh2/libssh2-9999.ebuild | 4 +-
25 3 files changed, 56 insertions(+), 2 deletions(-)
26
27 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
28 new file mode 100644
29 index 00000000..38541fe
30 --- /dev/null
31 +++ b/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch
32 @@ -0,0 +1,52 @@
33 +From ad5223220aa83e2439657ddce6ffca4445f08f8c Mon Sep 17 00:00:00 2001
34 +From: Sergei Trofimovich <siarheit@××××××.com>
35 +Date: Mon, 31 Oct 2016 09:04:33 +0000
36 +Subject: [PATCH] acinclude.m4: fix ./configure --with-libgcrypt
37 +
38 +The change fixes passing of bogus gcrypt prefix.
39 +Reproducible as:
40 +
41 + $ ./configure --with-libgcrypt
42 + $ make V=1
43 + ...
44 + /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
45 + ../libtool: line 7475: cd: yes/lib: No such file or directory
46 + libtool: error: cannot determine absolute directory name of 'yes/lib'
47 +
48 +These
49 + -Iyes/include
50 + -Lyes/lib
51 +come from libgcrypt code autodetection:
52 + if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
53 + LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
54 + CFLAGS="$CFLAGS -I$use_libgcrypt/include"
55 +
56 +I assume it's a typo to use yes/no flag as a prefix and changed
57 +it to '$with_libgcrypt_prefix'.
58 +
59 +Reported-by: Mikhail Pukhlikov <cynede@g.o>
60 +Signed-off-by: Sergei Trofimovich <siarheit@××××××.com>
61 +---
62 + acinclude.m4 | 6 +++---
63 + 1 file changed, 3 insertions(+), 3 deletions(-)
64 +
65 +diff --git a/acinclude.m4 b/acinclude.m4
66 +index 734ef07..c78260c 100644
67 +--- a/acinclude.m4
68 ++++ b/acinclude.m4
69 +@@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [
70 +
71 + old_LDFLAGS=$LDFLAGS
72 + old_CFLAGS=$CFLAGS
73 +- if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
74 +- LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
75 +- CFLAGS="$CFLAGS -I$use_libgcrypt/include"
76 ++ if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then
77 ++ LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib"
78 ++ CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include"
79 + fi
80 + AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [
81 + #include <gcrypt.h>
82 +--
83 +2.10.1
84 +
85
86 diff --git a/net-libs/libssh2/libssh2-1.8.0.ebuild b/net-libs/libssh2/libssh2-1.8.0.ebuild
87 index 023e8a3..36df0cc 100644
88 --- a/net-libs/libssh2/libssh2-1.8.0.ebuild
89 +++ b/net-libs/libssh2/libssh2-1.8.0.ebuild
90 @@ -32,6 +32,8 @@ DOCS=(
91 README
92 )
93
94 +PATCHES=( "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch )
95 +
96 src_prepare() {
97 sed -i -e 's|mansyntax.sh||g' tests/Makefile.am || die
98 autotools-multilib_src_prepare
99
100 diff --git a/net-libs/libssh2/libssh2-9999.ebuild b/net-libs/libssh2/libssh2-9999.ebuild
101 index 8d3718b..29287af 100644
102 --- a/net-libs/libssh2/libssh2-9999.ebuild
103 +++ b/net-libs/libssh2/libssh2-9999.ebuild
104 @@ -1,4 +1,4 @@
105 -# Copyright 1999-2015 Gentoo Foundation
106 +# Copyright 1999-2016 Gentoo Foundation
107 # Distributed under the terms of the GNU General Public License v2
108 # $Id$
109
110 @@ -28,7 +28,7 @@ RDEPEND="${DEPEND}"
111
112 DOCS=( README )
113
114 -PATCHES=( "${FILESDIR}"/${PN}-1.4.2-pkgconfig.patch )
115 +PATCHES=( "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch )
116
117 src_prepare() {
118 sed -i -e 's|mansyntax.sh||g' tests/Makefile.am || die