[curl] Add rtmp feature to curl (#43403)

Signed-off-by: Tal Regev <tal.regev@gmail.com>
This commit is contained in:
talregev 2025-01-23 09:11:41 +02:00 committed by GitHub
parent c40d630318
commit 15169219d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 46 additions and 1 deletions

View File

@ -13,6 +13,7 @@ vcpkg_from_github(
export-components.patch
dependencies.patch
cmake-config.patch
rtmp.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -36,6 +37,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
gssapi CURL_USE_GSSAPI
gsasl CURL_USE_GSASL
gnutls CURL_USE_GNUTLS
rtmp USE_LIBRTMP
INVERTED_FEATURES
ldap CURL_DISABLE_LDAP
ldap CURL_DISABLE_LDAPS

31
ports/curl/rtmp.patch Normal file
View File

@ -0,0 +1,31 @@
diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in
index 9a2559722c..bd25f61a92 100644
--- a/CMake/curl-config.cmake.in
+++ b/CMake/curl-config.cmake.in
@@ -50,6 +50,10 @@ endif()
if("@HAVE_ZSTD@")
find_dependency(zstd CONFIG)
endif()
+if("@USE_LIBRTMP@")
+ find_dependency(PkgConfig)
+ pkg_check_modules(librtmp REQUIRED IMPORTED_TARGET librtmp)
+endif()
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cba6f626b..fa497f2b70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1309,6 +1309,11 @@ endif()
option(USE_LIBRTMP "Enable librtmp from rtmpdump" OFF)
if(USE_LIBRTMP)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(librtmp REQUIRED IMPORTED_TARGET librtmp)
+ list(APPEND CURL_LIBS PkgConfig::librtmp)
+ list(APPEND LIBCURL_PC_REQUIRES_PRIVATE rtmp)
+elseif(0)
set(_extra_libs "rtmp")
if(WIN32)
list(APPEND _extra_libs "winmm")

View File

@ -1,6 +1,7 @@
{
"name": "curl",
"version": "8.11.1",
"port-version": 1,
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": "curl AND ISC AND BSD-3-Clause",
@ -136,6 +137,12 @@
"libpsl"
]
},
"rtmp": {
"description": "RTMP support",
"dependencies": [
"librtmp"
]
},
"schannel": {
"description": "SSL support (Secure Channel)",
"supports": "windows & !uwp",

View File

@ -2122,7 +2122,7 @@
},
"curl": {
"baseline": "8.11.1",
"port-version": 0
"port-version": 1
},
"curlcpp": {
"baseline": "3.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d2c7cc1c54b17f6d1814d16c46b709767090d4d6",
"version": "8.11.1",
"port-version": 1
},
{
"git-tree": "aae0f4f9dd2f724e673c0d458fc4531626864393",
"version": "8.11.1",