Contribs: update libssh2 to 1.8.0
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Apr 2017 17:00:50 +0000 (19:00 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Apr 2017 17:14:08 +0000 (19:14 +0200)
contrib/src/ssh2/SHA512SUMS
contrib/src/ssh2/ced924b78a40126606797ef57a74066eb3b4b83f.patch [new file with mode: 0644]
contrib/src/ssh2/configure-zlib.patch [deleted file]
contrib/src/ssh2/gpg-error-pc.patch [deleted file]
contrib/src/ssh2/rules.mak

index 15a23ba..4d156cd 100644 (file)
@@ -1 +1 @@
-707e0634b74fcf0f5ae4e46d9807907db7cd09328d553a67c49e9e11d852ae85843a7dcbe3f002e639eb2704e53e865c640c8fe85dcada330d0160708e8b5177  libssh2-1.4.3.tar.gz
+289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558  libssh2-1.8.0.tar.gz
diff --git a/contrib/src/ssh2/ced924b78a40126606797ef57a74066eb3b4b83f.patch b/contrib/src/ssh2/ced924b78a40126606797ef57a74066eb3b4b83f.patch
new file mode 100644 (file)
index 0000000..b8e908d
--- /dev/null
@@ -0,0 +1,49 @@
+From ced924b78a40126606797ef57a74066eb3b4b83f Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <siarheit@google.com>
+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 <cynede@gentoo.org>
+Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+---
+ 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], [
+   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
+   AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [
+     #include <gcrypt.h>
diff --git a/contrib/src/ssh2/configure-zlib.patch b/contrib/src/ssh2/configure-zlib.patch
deleted file mode 100644 (file)
index 78d1fd7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- ssh2/configure.ac  2015-02-24 10:09:30.662277334 +0100
-+++ ssh2/configure.ac.new      2015-02-24 10:08:57.658394756 +0100
-@@ -133,6 +133,7 @@
-     AC_MSG_NOTICE([Try --with-libz-prefix=PATH if you know you have it])
-   else
-     AC_DEFINE(LIBSSH2_HAVE_ZLIB, 1, [Compile in zlib support])
-+    LIBS="$LIBS -lz"
-   fi
- fi
diff --git a/contrib/src/ssh2/gpg-error-pc.patch b/contrib/src/ssh2/gpg-error-pc.patch
deleted file mode 100644 (file)
index 94a731b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- ssh2/configure.ac  2015-02-24 10:15:45.581842131 +0100
-+++ ssh2/configure.ac.new      2015-02-24 10:15:34.948332253 +0100
-@@ -102,7 +102,7 @@
- # Look for libgcrypt
- if test "$ac_cv_libssl" != "yes" && test "$use_libgcrypt" != "no"; then
-   AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [#include <gcrypt.h>])
--  LIBS="$LIBS -lgcrypt"
-+  LIBS="$LIBS -lgcrypt -lgpg-error"
- fi
- AC_SUBST(LIBSREQUIRED)
index 789ebfb..77aafdf 100644 (file)
@@ -1,6 +1,6 @@
 # ssh2
 
-LIBSSH2_VERSION := 1.4.3
+LIBSSH2_VERSION := 1.8.0
 LIBSSH2_URL := http://www.libssh2.org/download/libssh2-$(LIBSSH2_VERSION).tar.gz
 
 ifdef BUILD_NETWORK
@@ -22,8 +22,7 @@ $(TARBALLS)/libssh2-$(LIBSSH2_VERSION).tar.gz:
 ssh2: libssh2-$(LIBSSH2_VERSION).tar.gz .sum-ssh2
        $(UNPACK)
        $(APPLY) $(SRC)/ssh2/no-tests.patch
-       $(APPLY) $(SRC)/ssh2/configure-zlib.patch
-       $(APPLY) $(SRC)/ssh2/gpg-error-pc.patch
+       $(APPLY) $(SRC)/ssh2/ced924b78a40126606797ef57a74066eb3b4b83f.patch
 ifdef HAVE_WINSTORE
        $(APPLY) $(SRC)/ssh2/winrt-no-agent.patch
 endif
@@ -33,6 +32,6 @@ DEPS_ssh2 = gcrypt $(DEPS_gcrypt)
 
 .ssh2: ssh2
        $(RECONF)
-       cd $< && $(HOSTVARS) ./configure $(BROKEN_GCC_CFLAGS) $(HOSTCONF) --disable-examples-build --with-libgcrypt --without-openssl
+       cd $< && $(HOSTVARS) ./configure $(BROKEN_GCC_CFLAGS) $(HOSTCONF) --disable-examples-build --with-libgcrypt --without-openssl --without-mbedtls
        cd $< && $(MAKE) install
        touch $@