From 09744c6200d0301116733b1146a93311a662764d Mon Sep 17 00:00:00 2001 From: SE2Dev <5873790+SE2Dev@users.noreply.github.com> Date: Wed, 16 Feb 2022 20:51:28 -0500 Subject: [PATCH] [libsrtp] Add Exported CMake Targets for LibSRTP (#20720) * [libsrtp] Don't Use Deprecated Vcpkg Functions * [libsrtp] Add CMake Targets Patch * Bump port-version. Co-authored-by: Billy Robert O'Neal III --- ports/libsrtp/portfile.cmake | 15 +++++++++++++-- ports/libsrtp/vcpkg.json | 13 ++++++++++++- versions/baseline.json | 2 +- versions/l-/libsrtp.json | 5 +++++ 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ports/libsrtp/portfile.cmake b/ports/libsrtp/portfile.cmake index 2a1b5bea6e..d4074da0e4 100644 --- a/ports/libsrtp/portfile.cmake +++ b/ports/libsrtp/portfile.cmake @@ -1,8 +1,15 @@ +vcpkg_download_distfile(CMAKE_PR_PATCH + URLS https://patch-diff.githubusercontent.com/raw/cisco/libsrtp/pull/573.diff + FILENAME libsrtp-pr-573.patch + SHA512 58c07977ccbd3dce114f59583a5e10813bbee907af5ef23ec1961b4cfd0791c14326845a376470430978e878c78fb1f598851898a9e9031225628739fb248176 +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cisco/libsrtp REF v2.4.2 SHA512 6E4805E6D34B2050A6F68F629B0B42356B1D27F2CBAA6CC6166E56957609C3D9AA6B723DCC674E5C74180D122D27BADD2F9496639CCB1E0C210B9E1F7949D0E2 + PATCHES ${CMAKE_PR_PATCH} ) if (VCPKG_TARGET_IS_WINDOWS) @@ -10,12 +17,16 @@ if (VCPKG_TARGET_IS_WINDOWS) set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} /wd4703") endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" PREFER_NINJA ) -vcpkg_install_cmake() +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + CONFIG_PATH lib/cmake/libSRTP +) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libsrtp/vcpkg.json b/ports/libsrtp/vcpkg.json index 234d7faf1b..5ca1f13520 100644 --- a/ports/libsrtp/vcpkg.json +++ b/ports/libsrtp/vcpkg.json @@ -1,5 +1,16 @@ { "name": "libsrtp", "version": "2.4.2", - "description": "This package provides an implementation of the Secure Real-time Transport Protocol (SRTP), the Universal Security Transform (UST), and a supporting cryptographic kernel." + "port-version": 1, + "description": "This package provides an implementation of the Secure Real-time Transport Protocol (SRTP), the Universal Security Transform (UST), and a supporting cryptographic kernel.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] } diff --git a/versions/baseline.json b/versions/baseline.json index f2506d4835..85f66dd93b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3962,7 +3962,7 @@ }, "libsrtp": { "baseline": "2.4.2", - "port-version": 0 + "port-version": 1 }, "libssh": { "baseline": "0.9.6", diff --git a/versions/l-/libsrtp.json b/versions/l-/libsrtp.json index eafc5bb2b6..85c54b46b8 100644 --- a/versions/l-/libsrtp.json +++ b/versions/l-/libsrtp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a7e8bce682acd4a29f666961a69127864cd93374", + "version": "2.4.2", + "port-version": 1 + }, { "git-tree": "20d89602c93b0aa1df176a8610b514b014375c8c", "version": "2.4.2",