aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-02-26 20:12:18 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-02-26 22:05:42 +0100
commitac2d5de3dae5a1854f27e1a0b4c09f71001cb91a (patch)
treeef78437f60eec836a4ec47989608344d5d1c3966
parent56a44e2d5b16ff9b54468f0f48d8fa679b8163ed (diff)
downloadpatches-ac2d5de3dae5a1854f27e1a0b4c09f71001cb91a.tar
patches-ac2d5de3dae5a1854f27e1a0b4c09f71001cb91a.tar.gz
gnu: libssh2: Fix build failure after 1.8.0 upgrade.
* gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ssh.scm (libssh2)[source]: Use it. [arguments]: Add 'autoreconf' phase. [native-inputs]: Add AUTOCONF and AUTOMAKE.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch33
-rw-r--r--gnu/packages/ssh.scm12
3 files changed, 44 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index dc210c7662..3d9ad7065c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -692,6 +692,7 @@ dist_patch_DATA = \
%D%/packages/patches/libmad-frame-length.patch \
%D%/packages/patches/libmad-mips-newgcc.patch \
%D%/packages/patches/libssh-0.6.5-CVE-2016-0739.patch \
+ %D%/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch \
%D%/packages/patches/libtar-CVE-2013-4420.patch \
%D%/packages/patches/libtheora-config-guess.patch \
%D%/packages/patches/libtiff-CVE-2016-10092.patch \
diff --git a/gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch b/gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch
new file mode 100644
index 0000000000..4133be7fc9
--- /dev/null
+++ b/gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch
@@ -0,0 +1,33 @@
+This fixes a regression introduced in 1.8.0 where libssh2 fails to build
+with the gcrypt backend.
+
+Upstream bug URL:
+
+https://github.com/libssh2/libssh2/issues/150
+
+Patch copied from upstream source repository:
+
+https://github.com/libssh2/libssh2/commit/ced924b78a40126606797ef57a74066eb3b4b83f
+
+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
+
+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/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index c48e3e6f90..2e502fe7fc 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -93,13 +93,21 @@ remote applications.")
version ".tar.gz"))
(sha256
(base32
- "1m3n8spv79qhjq4yi0wgly5s5rc8783jb1pyra9bkx1md0plxwrr"))))
+ "1m3n8spv79qhjq4yi0wgly5s5rc8783jb1pyra9bkx1md0plxwrr"))
+ (patches
+ (search-patches "libssh2-fix-build-failure-with-gcrypt.patch"))))
(build-system gnu-build-system)
;; The installed libssh2.pc file does not include paths to libgcrypt and
;; zlib libraries, so we need to propagate the inputs.
(propagated-inputs `(("libgcrypt" ,libgcrypt)
("zlib" ,zlib)))
- (arguments '(#:configure-flags `("--with-libgcrypt")))
+ (arguments '(#:configure-flags `("--with-libgcrypt")
+ #:phases (modify-phases %standard-phases
+ (add-before 'configure 'autoreconf
+ (lambda _
+ (zero? (system* "autoreconf" "-v")))))))
+ (native-inputs `(("autoconf" ,autoconf)
+ ("automake" ,automake)))
(synopsis "Client-side C library implementing the SSH2 protocol")
(description
"libssh2 is a library intended to allow software developers access to