diff --git a/net-libs/libssh/libssh-0.10.5.recipe b/net-libs/libssh/libssh-0.11.2.recipe similarity index 67% rename from net-libs/libssh/libssh-0.10.5.recipe rename to net-libs/libssh/libssh-0.11.2.recipe index 00b3022ba..d23069f24 100644 --- a/net-libs/libssh/libssh-0.10.5.recipe +++ b/net-libs/libssh/libssh-0.11.2.recipe @@ -4,29 +4,18 @@ protocol on client and server side. With libssh, you can remotely execute \ programs, transfer files, use a secure and transparent tunnel, manage public \ keys and much more..." HOMEPAGE="https://www.libssh.org/" -COPYRIGHT="1995 Tatu Ylonen - 2000 Markus Friedl - 2003-2014 Aris Adamantiadis - 2006 Alexander Neundorf - 2007 Daniel Gollub - 2007-2018 Andreas Schneider - 2012 Dmitriy Kuznetsov - 2017 Sartura d.o.o. - 2017 Jan-Lukas Wynen - 2018-2019 Anderson Toshiyuki Sasaki - 2018-2019 Red Hat, Inc. - 2019 Simo Sorce" +COPYRIGHT="2003-2025 Aris Adamantiadis, Andreas Schneider and libssh contributors" LICENSE="GNU LGPL v2.1 BSD (2-clause)" -REVISION="2" +REVISION="1" SOURCE_URI="https://www.libssh.org/files/${portVersion%.*}/libssh-$portVersion.tar.xz" -CHECKSUM_SHA256="b60e2ff7f367b9eee2b5634d3a63303ddfede0e6a18dfca88c44a8770e7e4234" +CHECKSUM_SHA256="69529fc18f5b601f0baf0e5a4501a2bc26df5e2f116f5f8f07f19fafaa6d04e7" PATCHES="libssh-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" -libVersion="4.9.5" +libVersion="4.10.2" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" @@ -48,6 +37,12 @@ REQUIRES_devel=" libssh$secondaryArchSuffix == $portVersion base " +ARCHITECTURES_doc="any" + +PROVIDES_doc=" + libssh_doc = $portVersion + " + BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libcmocka$secondaryArchSuffix @@ -58,6 +53,7 @@ BUILD_REQUIRES=" " BUILD_PREREQUIRES=" cmd:cmake + cmd:doxygen cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix cmd:make @@ -65,32 +61,11 @@ BUILD_PREREQUIRES=" cmd:sshd " -if [ -z "$secondaryArchSuffix" ]; then - ARCHITECTURES_doc="any" - - PROVIDES_doc=" - libssh_doc = $portVersion - " - - BUILD_PREREQUIRES+=" - cmd:doxygen - " -fi - defineDebugInfoPackage libssh$secondaryArchSuffix \ "$libDir"/libssh.so.$libVersion PATCH() { - # Requires: https://review.haiku-os.org/c/haiku/+/632 - sed -i \ - -e '/torture_threads_pki_rsa/d' \ - -e '/torture_rand/d' \ - -e '/torture_threads_init/d' \ - -e '/torture_threads_buffer/d' \ - -e '/torture_threads_crypto/d' \ - tests/unittests/CMakeLists.txt - # Doesn't work in chroot, probably due to the lack of the passwd database sed -i 's/cmocka_unit_test(torture_path_expand_tilde_unix),//' \ tests/unittests/torture_misc.c @@ -109,9 +84,7 @@ BUILD() "${_maybe_pie[@]}" make -C build $jobArgs - if [ -z "$secondaryArchSuffix" ]; then - make -C build docs - fi + make -C build docs } INSTALL() @@ -123,8 +96,7 @@ INSTALL() ln -sr $libDir/libssh.so.$libVersion $libDir/libssh.so - sed -i \ - -e "/INTERFACE_INCLUDE_DIRECTORIES/c INTERFACE_INCLUDE_DIRECTORIES \"$includeDir;\"" \ + sed -i "s,\/include,\/$relativeIncludeDir,g" \ "$libDir"/cmake/libssh/libssh-config.cmake # devel package @@ -132,11 +104,9 @@ INSTALL() "$developDir" \ "$libDir"/cmake - if [ -z "$secondaryArchSuffix" ]; then - install -d -m 755 "$developDocDir" - cp -rT build/doc/html "$developDocDir" - packageEntries doc "$developDir" - fi + install -d -m 755 "$developDocDir" + cp -rT build/doc/html "$developDocDir" + packageEntries doc "$developDir" } TEST() diff --git a/net-libs/libssh/patches/libssh-0.10.5.patchset b/net-libs/libssh/patches/libssh-0.10.5.patchset deleted file mode 100644 index eaf811eeb..000000000 --- a/net-libs/libssh/patches/libssh-0.10.5.patchset +++ /dev/null @@ -1,97 +0,0 @@ -From 764ce1740ddb3df2fea1206fcc2fd507531d2642 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Sat, 22 Sep 2018 16:20:25 +0200 -Subject: Haiku networking functions lives in lnetwork - - -diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake -index 9de1022..1e0b363 100644 ---- a/ConfigureChecks.cmake -+++ b/ConfigureChecks.cmake -@@ -239,6 +239,11 @@ if (UNIX) - set(HAVE_GETADDRINFO TRUE) - set(_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} socket) - endif (HAVE_LIBSOCKET) -+ check_library_exists(network getaddrinfo "" HAVE_LIBNETWORK) -+ if (HAVE_LIBNETWORK) -+ set(HAVE_GETADDRINFO TRUE) -+ set(_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} network) -+ endif (HAVE_LIBNETWORK) - - # libnsl/inet_pton (Solaris) - check_library_exists(nsl inet_pton "" HAVE_LIBNSL) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index d6245c0..e596c93 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -9,6 +9,13 @@ set(LIBSSH_LINK_LIBRARIES - ${LIBSSH_REQUIRED_LIBRARIES} - ) - -+if (HAVE_LIBNETWORK) -+ set(LIBSSH_LINK_LIBRARIES -+ ${LIBSSH_LINK_LIBRARIES} -+ network -+ ) -+endif (HAVE_LIBNETWORK) -+ - if (OPENSSL_CRYPTO_LIBRARIES) - set(LIBSSH_PRIVATE_INCLUDE_DIRS - ${LIBSSH_PRIVATE_INCLUDE_DIRS} --- -2.45.2 - - -From 4ba126b58167eaa7ad64f52d960ec47cbe5c6cbe Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sat, 6 May 2023 18:37:22 +0200 -Subject: disable x11 example - - -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 72ceed2..22dbe51 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -35,9 +35,11 @@ if (UNIX AND NOT WIN32) - target_compile_options(ssh-client PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) - target_link_libraries(ssh-client ssh::ssh) - -- add_executable(ssh-X11-client ssh_X11_client.c ${examples_SRCS}) -- target_compile_options(ssh-X11-client PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) -- target_link_libraries(ssh-X11-client ssh::ssh) -+ if (NOT HAIKU) -+ add_executable(ssh-X11-client ssh_X11_client.c ${examples_SRCS}) -+ target_compile_options(ssh-X11-client PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) -+ target_link_libraries(ssh-X11-client ssh::ssh) -+ endif (NOT HAIKU) - - if (WITH_SERVER AND (ARGP_LIBRARIES OR HAVE_ARGP_H)) - if (HAVE_LIBUTIL) --- -2.45.2 - - -From ea844cc8bc871197ee4c4ac2c8a8cde901f7afee Mon Sep 17 00:00:00 2001 -From: Schrijvers Luc -Date: Sun, 1 Sep 2024 17:09:27 +0200 -Subject: Silence some deprecated warnings - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c3565f0..850bcc1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -35,6 +35,10 @@ include(GNUInstallDirs) - - include(CompilerChecks.cmake) - -+if (HAIKU) -+ add_definitions(-Wno-deprecated-declarations) # TODO too much spam for now -+endif() -+ - # disallow in-source build - include(MacroEnsureOutOfSourceBuild) - macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.") --- -2.45.2 - diff --git a/net-libs/libssh/patches/libssh-0.11.2.patchset b/net-libs/libssh/patches/libssh-0.11.2.patchset new file mode 100644 index 000000000..d8a6859ca --- /dev/null +++ b/net-libs/libssh/patches/libssh-0.11.2.patchset @@ -0,0 +1,158 @@ +From b7131b0ea1d22f48ca751ddcda62b5f1dce7a8b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sat, 22 Sep 2018 16:20:25 +0200 +Subject: Haiku networking functions lives in lnetwork + + +diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake +index 8765dc6..f769b33 100644 +--- a/ConfigureChecks.cmake ++++ b/ConfigureChecks.cmake +@@ -191,6 +191,13 @@ if (UNIX) + set(_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} socket) + endif (HAVE_LIBSOCKET) + ++ # libnetwork (Haiku) ++ check_library_exists(network getaddrinfo "" HAVE_LIBNETWORK) ++ if (HAVE_LIBNETWORK) ++ set(HAVE_GETADDRINFO TRUE) ++ set(_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} network) ++ endif (HAVE_LIBNETWORK) ++ + # libnsl/inet_pton (Solaris) + check_library_exists(nsl inet_pton "" HAVE_LIBNSL) + if (HAVE_LIBNSL) +-- +2.48.1 + + +From 43367ca571bc7a790001e039a2fba7c8ef134134 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 6 May 2023 18:37:22 +0200 +Subject: disable x11 example + + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 4fb842b..c5fe284 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -41,9 +41,11 @@ if (UNIX AND NOT WIN32) + target_compile_options(ssh-client PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) + target_link_libraries(ssh-client ssh::ssh) + +- add_executable(ssh-X11-client ssh_X11_client.c ${examples_SRCS}) +- target_compile_options(ssh-X11-client PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) +- target_link_libraries(ssh-X11-client ssh::ssh) ++ if (NOT HAIKU) ++ add_executable(ssh-X11-client ssh_X11_client.c ${examples_SRCS}) ++ target_compile_options(ssh-X11-client PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) ++ target_link_libraries(ssh-X11-client ssh::ssh) ++ endif (NOT HAIKU) + + if (WITH_SERVER AND (ARGP_LIBRARIES OR HAVE_ARGP_H)) + if (HAVE_LIBUTIL) +-- +2.48.1 + + +From d5bd5a4b56c2d1d80347d1e5fe663218d1260d87 Mon Sep 17 00:00:00 2001 +From: Schrijvers Luc +Date: Sun, 1 Sep 2024 17:09:27 +0200 +Subject: Silence some deprecated warnings + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9877cd7..63f31d9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,6 +34,10 @@ include(GNUInstallDirs) + + include(CompilerChecks.cmake) + ++if (HAIKU) ++ add_definitions(-Wno-deprecated-declarations) # TODO too much spam for now ++endif() ++ + # disallow in-source build + include(MacroEnsureOutOfSourceBuild) + macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.") +-- +2.48.1 + + +From 575e97ceb6dd58f3748b176fc0669f93bc48baf2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Sun, 20 Jul 2025 21:06:10 +0200 +Subject: link with libbsd for strsep + + +diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake +index f769b33..2b01f7b 100644 +--- a/ConfigureChecks.cmake ++++ b/ConfigureChecks.cmake +@@ -206,6 +206,12 @@ if (UNIX) + + # librt + check_library_exists(rt nanosleep "" HAVE_LIBRT) ++ ++ # libbsd (Haiku) ++ check_library_exists(bsd strsep "" HAVE_LIBBSD) ++ if (HAVE_LIBBSD) ++ set(_REQUIRED_LIBRARIES ${_REQUIRED_LIBRARIES} bsd) ++ endif (HAVE_LIBNETWORK) + endif (NOT LINUX) + + check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME) +-- +2.48.1 + + +From bad5e7395d4acd3e4b48896290bfc57edffead4c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Sun, 20 Jul 2025 21:06:48 +0200 +Subject: disable termios flags which Haiku doesn't support + + +diff --git a/src/ttyopts.c b/src/ttyopts.c +index a1ab31f..12ff855 100644 +--- a/src/ttyopts.c ++++ b/src/ttyopts.c +@@ -222,7 +222,9 @@ encode_termios_opts(struct termios *attr, unsigned char *buf, size_t buflen) + SSH_ENCODE_INPUT_OPT(IXON) + SSH_ENCODE_INPUT_OPT(IXANY) + SSH_ENCODE_INPUT_OPT(IXOFF) ++#ifdef IMAXBEL + SSH_ENCODE_INPUT_OPT(IMAXBEL) ++#endif + #ifdef IUTF8 + SSH_ENCODE_INPUT_OPT(IUTF8) + #endif +@@ -283,9 +285,15 @@ encode_termios_opts(struct termios *attr, unsigned char *buf, size_t buflen) + #ifdef VDSUSP + SSH_ENCODE_CC_OPT(VDSUSP) + #endif ++#ifdef VREPRINT + SSH_ENCODE_CC_OPT(VREPRINT) ++#endif ++#ifdef VWERASE + SSH_ENCODE_CC_OPT(VWERASE) ++#endif ++#ifdef VLNEXT + SSH_ENCODE_CC_OPT(VLNEXT) ++#endif + #ifdef VFLUSH + SSH_ENCODE_CC_OPT(VFLUSH) + #endif +@@ -295,7 +303,9 @@ encode_termios_opts(struct termios *attr, unsigned char *buf, size_t buflen) + #ifdef VSTATUS + SSH_ENCODE_CC_OPT(VSTATUS) + #endif ++#ifdef VDISCARD + SSH_ENCODE_CC_OPT(VDISCARD) ++#endif + #undef SSH_ENCODE_CC_OPT + + SSH_ENCODE_OPT(TTY_OP_ISPEED, baud2speed(cfgetispeed(attr))) +-- +2.48.1 +