commit:     094f32ab9d1649e49161bd69deb483d58ee7dc57
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu May 22 18:23:13 2025 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Thu May 22 18:23:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=094f32ab

net-libs/libssh: sync ::gentoo

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../libssh/files/libssh-0.11.1-openssh-10.patch    | 48 ++++++++++++++++++++++
 net-libs/libssh/libssh-0.11.1-r1.ebuild            |  5 ++-
 2 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/net-libs/libssh/files/libssh-0.11.1-openssh-10.patch 
b/net-libs/libssh/files/libssh-0.11.1-openssh-10.patch
new file mode 100644
index 0000000..e8c9d64
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.11.1-openssh-10.patch
@@ -0,0 +1,48 @@
+https://gitlab.com/libssh/libssh-mirror/-/issues/298
+https://gitlab.com/libssh/libssh-mirror/-/commit/af10857aa3216f40c5c2e5d7116803fb03c166f9
+
+From af10857aa3216f40c5c2e5d7116803fb03c166f9 Mon Sep 17 00:00:00 2001
+From: Norbert Pocs <[email protected]>
+Date: Fri, 11 Apr 2025 09:04:40 +0200
+Subject: [PATCH] CmakeLists: Fix multiple digit major version for OpenSSH
+
+Signed-off-by: Norbert Pocs <[email protected]>
+Reviewed-by: Jakub Jelen <[email protected]>
+---
+ tests/CMakeLists.txt | 13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 8d4e94b69..e8b196b83 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -104,9 +104,10 @@ add_subdirectory(unittests)
+ find_program(SSH_EXECUTABLE NAMES ssh)
+ if (SSH_EXECUTABLE)
+     execute_process(COMMAND ${SSH_EXECUTABLE} -V ERROR_VARIABLE 
OPENSSH_VERSION_STR)
+-    string(REGEX REPLACE "^.*OpenSSH_([0-9]).[0-9].*$" "\\1" 
OPENSSH_VERSION_MAJOR "${OPENSSH_VERSION_STR}")
+-    string(REGEX REPLACE "^.*OpenSSH_[0-9].([0-9]).*$" "\\1" 
OPENSSH_VERSION_MINOR "${OPENSSH_VERSION_STR}")
++    string(REGEX REPLACE "^.*OpenSSH_([0-9]+).[0-9].*$" "\\1" 
OPENSSH_VERSION_MAJOR "${OPENSSH_VERSION_STR}")
++    string(REGEX REPLACE "^.*OpenSSH_[0-9]+.([0-9]).*$" "\\1" 
OPENSSH_VERSION_MINOR "${OPENSSH_VERSION_STR}")
+     set(OPENSSH_VERSION "${OPENSSH_VERSION_MAJOR}.${OPENSSH_VERSION_MINOR}")
++    add_definitions(-DOPENSSH_VERSION_MAJOR=${OPENSSH_VERSION_MAJOR} 
-DOPENSSH_VERSION_MINOR=${OPENSSH_VERSION_MINOR})
+     if("${OPENSSH_VERSION}" VERSION_LESS "6.3")
+         # ssh - Q was introduced in 6.3
+         message("Version less than 6.3, hardcoding cipher list")
+@@ -207,14 +208,6 @@ if (CLIENT_TESTING OR SERVER_TESTING)
+                     /usr/bin
+                     /usr/local/bin)
+ 
+-    find_program(SSH_EXECUTABLE NAMES ssh)
+-    if (SSH_EXECUTABLE)
+-        execute_process(COMMAND ${SSH_EXECUTABLE} -V ERROR_VARIABLE 
OPENSSH_VERSION_STR)
+-        string(REGEX REPLACE "^.*OpenSSH_([0-9]).[0-9].*$" "\\1" 
OPENSSH_VERSION_MAJOR "${OPENSSH_VERSION_STR}")
+-        string(REGEX REPLACE "^.*OpenSSH_[0-9].([0-9]).*$" "\\1" 
OPENSSH_VERSION_MINOR "${OPENSSH_VERSION_STR}")
+-        add_definitions(-DOPENSSH_VERSION_MAJOR=${OPENSSH_VERSION_MAJOR} 
-DOPENSSH_VERSION_MINOR=${OPENSSH_VERSION_MINOR})
+-    endif()
+-
+     set(LOCAL_USER "nobody")
+     set(LOCAL_UID "65533")
+     find_program(ID_EXECUTABLE NAMES id)
+-- 
+GitLab

diff --git a/net-libs/libssh/libssh-0.11.1-r1.ebuild 
b/net-libs/libssh/libssh-0.11.1-r1.ebuild
index 5a5eee6..2f37fa9 100644
--- a/net-libs/libssh/libssh-0.11.1-r1.ebuild
+++ b/net-libs/libssh/libssh-0.11.1-r1.ebuild
@@ -39,7 +39,10 @@ BDEPEND="doc? ( app-text/doxygen[dot] )"
 
 DOCS=( AUTHORS CHANGELOG README )
 
-PATCHES=( "${FILESDIR}"/${PN}-0.11.1-libressl.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.11.1-openssh-10.patch
+       "${FILESDIR}"/${PN}-0.11.1-libressl.patch
+)
 
 src_prepare() {
        cmake_src_prepare

Reply via email to