Control: retitle -1 libssh: parses libgcrypt version incorrectly
Control: tags -1 patch

Hi,

Andreas Metzler (one of libgcrypt maintainers) was kind enough to
investigate this bug and provide a patch for libssh (which is attached).

In a nutshell, libssh parses libgcrypt version incorrectly, which
prevents to compile the latest sources against the libgcrypt version
from Stretch.

Including this patch would allow to backport Remmina and its
build-dependencies without backporting libgcrypt too (see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771784).

Regards,

-- 
Raphaël Halimi
Description: Fix parsing of gcrypt version in CMake code.
  GCRYPT_VERSION does not necessarily match [0-9]+.[0-9]+.[0-9]+
  it can also have a -beta suffix ("1.7.6-beta"). Accept these strings
  but throw away the -beta.
  While we are at it fix the regex to match on "dot" instead of "any
  character".
Author: Andreas Metzler <[email protected]>
Origin: vendor
Forwarded: no
Last-Update: 2017-09-17

--- libssh-0.8.0~20170825.94fa1e38.orig/cmake/Modules/FindGCrypt.cmake
+++ libssh-0.8.0~20170825.94fa1e38/cmake/Modules/FindGCrypt.cmake
@@ -52,9 +52,9 @@ find_library(GCRYPT_LIBRARY
 set(GCRYPT_LIBRARIES ${GCRYPT_LIBRARY})
 
 if (GCRYPT_INCLUDE_DIR)
-    file(STRINGS "${GCRYPT_INCLUDE_DIR}/gcrypt.h" _gcrypt_version_str REGEX "^#define GCRYPT_VERSION \"[0-9]+.[0-9]+.[0-9]+\"")
+    file(STRINGS "${GCRYPT_INCLUDE_DIR}/gcrypt.h" _gcrypt_version_str REGEX "^#define GCRYPT_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]")
 
-    string(REGEX REPLACE "^.*GCRYPT_VERSION.*([0-9]+.[0-9]+.[0-9]+).*" "\\1" GCRYPT_VERSION "${_gcrypt_version_str}")
+    string(REGEX REPLACE "^.*GCRYPT_VERSION.*([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" GCRYPT_VERSION "${_gcrypt_version_str}")
 endif (GCRYPT_INCLUDE_DIR)
 
 include(FindPackageHandleStandardArgs)

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to