pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/wireshark wireshark: fix libssh detection



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dc3d182de569
branches:  trunk
changeset: 439255:dc3d182de569
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Tue Sep 15 10:19:20 2020 +0000

description:
wireshark: fix libssh detection

>From upstream fd7739de6b via Michael Forney via tech-pkg

diffstat:

 net/wireshark/distinfo                                     |   5 +-
 net/wireshark/patches/patch-CMakeLists.txt                 |   4 +-
 net/wireshark/patches/patch-cmake_modules_FindLIBSSH.cmake |  31 ++++++++++++++
 3 files changed, 36 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r a8cf1fc949a1 -r dc3d182de569 net/wireshark/distinfo
--- a/net/wireshark/distinfo    Tue Sep 15 09:48:49 2020 +0000
+++ b/net/wireshark/distinfo    Tue Sep 15 10:19:20 2020 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.132 2020/08/13 08:21:52 adam Exp $
+$NetBSD: distinfo,v 1.133 2020/09/15 10:19:20 wiz Exp $
 
 SHA1 (wireshark-3.2.6.tar.xz) = e8f3e6cb9072670c8bdbbff7e5fe3ccd5203d35e
 RMD160 (wireshark-3.2.6.tar.xz) = 09dcd3a088aa339e18871b053c9c8d8414b25a6a
 SHA512 (wireshark-3.2.6.tar.xz) = 71905836370b916a92e7a76e4f93cb10a658374c7a95aa47b607b2b142abebdb0d1562f642782a5a946a167dfb28169572330a7603cf0d7ab6016ce7f12fac78
 Size (wireshark-3.2.6.tar.xz) = 31635628 bytes
-SHA1 (patch-CMakeLists.txt) = 399adad3434a00d6eaf6e36afe8e96ddb0812d68
+SHA1 (patch-CMakeLists.txt) = 8faf8f63d75d5733a69b52ce9fbf291bd90a5575
+SHA1 (patch-cmake_modules_FindLIBSSH.cmake) = fc8d508bd21290b1705a219056f9b2338ec15116
diff -r a8cf1fc949a1 -r dc3d182de569 net/wireshark/patches/patch-CMakeLists.txt
--- a/net/wireshark/patches/patch-CMakeLists.txt        Tue Sep 15 09:48:49 2020 +0000
+++ b/net/wireshark/patches/patch-CMakeLists.txt        Tue Sep 15 10:19:20 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-CMakeLists.txt,v 1.3 2020/04/09 14:37:15 adam Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.4 2020/09/15 10:19:20 wiz Exp $
 
 Do not make application bundle on Darwin.
 Avoid
@@ -6,7 +6,7 @@
        install FILES given directory
        "${WRKDIR}/.buildlink/cmake-Modules" to install.
 
---- CMakeLists.txt.orig        2020-04-08 22:27:01.000000000 +0000
+--- CMakeLists.txt.orig        2020-08-12 17:53:19.000000000 +0000
 +++ CMakeLists.txt
 @@ -1359,7 +1359,7 @@ else ()
        set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extcap" CACHE INTERNAL "The extcap dir")
diff -r a8cf1fc949a1 -r dc3d182de569 net/wireshark/patches/patch-cmake_modules_FindLIBSSH.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/wireshark/patches/patch-cmake_modules_FindLIBSSH.cmake        Tue Sep 15 10:19:20 2020 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-cmake_modules_FindLIBSSH.cmake,v 1.1 2020/09/15 10:19:20 wiz Exp $
+
+Fix detection of libssh >= 0.9.5. Upstream commit fd7739de6b.
+
+--- cmake/modules/FindLIBSSH.cmake.orig        Wed Aug 12 17:53:19 2020
++++ cmake/modules/FindLIBSSH.cmake
+@@ -59,15 +59,21 @@ else ()
+       ${LIBSSH_LIBRARY}
+     )
+ 
+-    file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR
++    # libssh >= 0.9.5 has libssh_version.h
++    set(_libssh_version_header "${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h")
++    if(NOT EXISTS "${_libssh_version_header}")
++        set(_libssh_version_header "${LIBSSH_INCLUDE_DIR}/libssh/libssh.h")
++    endif()
++
++    file(STRINGS "${_libssh_version_header}" LIBSSH_VERSION_MAJOR
+       REGEX "#define[ ]+LIBSSH_VERSION_MAJOR[ ]+[0-9]+")
+     # Older versions of libssh like libssh-0.2 have LIBSSH_VERSION but not LIBSSH_VERSION_MAJOR
+     if(LIBSSH_VERSION_MAJOR)
+       string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MAJOR ${LIBSSH_VERSION_MAJOR})
+-      file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MINOR
++      file(STRINGS "${_libssh_version_header}" LIBSSH_VERSION_MINOR
+         REGEX "#define[ ]+LIBSSH_VERSION_MINOR[ ]+[0-9]+")
+       string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MINOR ${LIBSSH_VERSION_MINOR})
+-      file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_PATCH
++      file(STRINGS "${_libssh_version_header}" LIBSSH_VERSION_PATCH
+         REGEX "#define[ ]+LIBSSH_VERSION_MICRO[ ]+[0-9]+")
+       string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_PATCH ${LIBSSH_VERSION_PATCH})
+       set(LIBSSH_VERSION ${LIBSSH_VERSION_MAJOR}.${LIBSSH_VERSION_MINOR}.${LIBSSH_VERSION_PATCH})



Home | Main Index | Thread Index | Old Index