Skip to content

Commit

Permalink
[cppfs,curl] Update libssh2 targets
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Oct 19, 2024
1 parent 6ad3144 commit 699685e
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions ports/cppfs/ssh-dependencies.diff
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ index aa37eda..d29176a 100644

-find_package(LibSSH2)
-find_package(LibCrypto)
+find_package(LibSSH2 NAMES Libssh2)
+find_package(LibSSH2 NAMES libssh2)
find_package(ZLIB)
find_package(OpenSSL)
+set(LibCrypto_FOUND "${OpenSSL_FOUND}")
Expand All @@ -36,7 +36,7 @@ index aa37eda..d29176a 100644
- ${LIBCRYPTO_LIBRARY}
- ${ZLIB_LIBRARY}
+ OpenSSL::SSL
+ $<IF:$<TARGET_EXISTS:Libssh2::libssh2_shared>,Libssh2::libssh2_shared,Libssh2::libssh2_static>
+ libssh2::libssh2
+ OpenSSL::Crypto
+ ZLIB::ZLIB
)
Expand Down
2 changes: 1 addition & 1 deletion ports/cppfs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cppfs",
"version": "1.3.0",
"port-version": 3,
"port-version": 4,
"description": "Cross-platform C++ file system library supporting multiple backends",
"license": "MIT",
"supports": "!uwp",
Expand Down
16 changes: 6 additions & 10 deletions ports/curl/dependencies.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ index 7dc1f99..e83617e 100644
+ find_dependency(c-ares CONFIG)
+endif()
+if("@USE_LIBSSH2@")
+ find_dependency(Libssh2 CONFIG)
+ find_dependency(libssh2 CONFIG)
+endif()
+if("@HAVE_BROTLI@")
+ find_dependency(unofficial-brotli CONFIG)
Expand Down Expand Up @@ -112,22 +112,18 @@ index dbb0bf4..f1a18d1 100644
if(LIBPSL_FOUND)
list(APPEND CURL_LIBS ${LIBPSL_LIBRARIES})
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl")
@@ -1072,7 +1084,13 @@ mark_as_advanced(CURL_USE_LIBSSH2)
@@ -1072,7 +1084,9 @@ mark_as_advanced(CURL_USE_LIBSSH2)
set(USE_LIBSSH2 OFF)

if(CURL_USE_LIBSSH2)
- find_package(Libssh2)
+ find_package(LIBSSH2 NAMES Libssh2 REQUIRED)
+ if(TARGET Libssh2::libssh2_shared)
+ set(LIBSSH2_LIBRARIES Libssh2::libssh2_shared)
+ else()
+ set(LIBSSH2_LIBRARIES Libssh2::libssh2_static)
+ endif()
+ find_package(LIBSSH2 NAMES libssh2 REQUIRED)
+ set(LIBSSH2_LIBRARIES libssh2::libssh2)
+ get_target_property(LIBSSH2_INCLUDE_DIRS "${LIBSSH2_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES)
if(LIBSSH2_FOUND)
list(APPEND CURL_LIBS ${LIBSSH2_LIBRARIES})
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libssh2")
@@ -1121,7 +1139,8 @@ endif()
@@ -1121,7 +1135,8 @@ endif()
option(CURL_USE_GSASL "Use libgsasl" OFF)
mark_as_advanced(CURL_USE_GSASL)
if(CURL_USE_GSASL)
Expand All @@ -137,7 +133,7 @@ index dbb0bf4..f1a18d1 100644
if(LIBGSASL_FOUND)
list(APPEND CURL_LIBS ${LIBGSASL_LIBRARIES})
list(APPEND CURL_LIBDIRS ${LIBGSASL_LIBRARY_DIRS})
@@ -1139,7 +1158,10 @@ option(CURL_USE_GSSAPI "Use GSSAPI implementation" OFF)
@@ -1139,7 +1154,10 @@ option(CURL_USE_GSSAPI "Use GSSAPI implementation" OFF)
mark_as_advanced(CURL_USE_GSSAPI)

if(CURL_USE_GSSAPI)
Expand Down
2 changes: 1 addition & 1 deletion ports/curl/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(CURL_FOUND)
if(_curl_link_libraries MATCHES "OpenSSL::")
string(REGEX REPLACE "([\$]<[^;]*)?OpenSSL::(SSL|Crypto)([^;]*>)?" "${OPENSSL_LIBRARIES}" _curl_link_libraries "${_curl_link_libraries}")
endif()
if(_curl_link_libraries MATCHES "Libssh2::libssh2_(shared|static)")
if(_curl_link_libraries MATCHES "libssh2::libssh2")
# TODO: move find_dependency(Libssh2 CONFIG) into CURL config
set(_libssh2_target "${CMAKE_MATCH_0}")
find_package(Libssh2 CONFIG QUIET)
Expand Down
1 change: 1 addition & 0 deletions ports/curl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "curl",
"version": "8.10.1",
"port-version": 1,
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": "curl AND ISC AND BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@
},
"cppfs": {
"baseline": "1.3.0",
"port-version": 3
"port-version": 4
},
"cppgraphqlgen": {
"baseline": "4.5.7",
Expand Down Expand Up @@ -2126,7 +2126,7 @@
},
"curl": {
"baseline": "8.10.1",
"port-version": 0
"port-version": 1
},
"curlcpp": {
"baseline": "3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/cppfs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e705e7775f54232e723bcf5bb8fefb55ed4e715f",
"version": "1.3.0",
"port-version": 4
},
{
"git-tree": "effae8e598d06cff2d1c7b0a084e6394ff1ee6ed",
"version": "1.3.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/curl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "31d4981751582248fd2983bcadc540584a906a9a",
"version": "8.10.1",
"port-version": 1
},
{
"git-tree": "9fa54a801b36fad7852cd4174d00fd3e5675abdb",
"version": "8.10.1",
Expand Down

0 comments on commit 699685e

Please sign in to comment.