Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[curl] Add rtmp feature to curl #43403

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ports/curl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
31 changes: 31 additions & 0 deletions ports/curl/rtmp.patch
Original file line number Diff line number Diff line change
@@ -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")
7 changes: 7 additions & 0 deletions ports/curl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -136,6 +137,12 @@
"libpsl"
]
},
"rtmp": {
"description": "RTMP support",
"dependencies": [
"librtmp"
]
},
"schannel": {
"description": "SSL support (Secure Channel)",
"supports": "windows & !uwp",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@
},
"curl": {
"baseline": "8.11.1",
"port-version": 0
"port-version": 1
},
"curlcpp": {
"baseline": "3.1",
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": "d2c7cc1c54b17f6d1814d16c46b709767090d4d6",
"version": "8.11.1",
"port-version": 1
},
{
"git-tree": "aae0f4f9dd2f724e673c0d458fc4531626864393",
"version": "8.11.1",
Expand Down