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

[libjuice] Update to 0.9.1 #20667

Merged
merged 3 commits into from
Oct 18, 2021
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: 1 addition & 1 deletion ports/libdatachannel/0001-fix-for-vcpkg.patch
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ index 02b688c..03b185f 100644
target_link_libraries(datachannel-static PRIVATE LibJuice::LibJuice)
else()
- add_subdirectory(deps/libjuice EXCLUDE_FROM_ALL)
+ find_package(libjuice CONFIG REQUIRED)
+ find_package(LibJuice CONFIG REQUIRED)
target_compile_definitions(datachannel PRIVATE RTC_SYSTEM_JUICE=0)
target_compile_definitions(datachannel-static PRIVATE RTC_SYSTEM_JUICE=0)
- target_link_libraries(datachannel PRIVATE LibJuice::LibJuiceStatic)
Expand Down
2 changes: 1 addition & 1 deletion ports/libdatachannel/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ file(WRITE "${CURRENT_PACKAGES_DIR}/share/LibDataChannel/LibDataChannelConfig.cm
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(OpenSSL)
find_dependency(libjuice)
find_dependency(LibJuice)
${DATACHANNEL_CONFIG}")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
Expand Down
1 change: 1 addition & 0 deletions ports/libdatachannel/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "libdatachannel",
"version-semver": "0.15.1",
"port-version": 1,
"description": "libdatachannel is a standalone implementation of WebRTC Data Channels, WebRTC Media Transport, and WebSockets in C++17 with C bindings for POSIX platforms (including GNU/Linux, Android, and Apple macOS) and Microsoft Windows.",
"homepage": "https://github.com/paullouisageneau/libdatachannel",
"dependencies": [
Expand Down
15 changes: 7 additions & 8 deletions ports/libjuice/fix-for-vcpkg.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aedb557..89c701b 100644
index 3e2a2dc..011a4ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,7 +72,7 @@ set(TESTS_SOURCES
@@ -66,7 +66,7 @@ set(TESTS_SOURCES
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

-add_library(juice SHARED ${LIBJUICE_SOURCES})
+add_library(juice ${LIBJUICE_SOURCES})
set_target_properties(juice PROPERTIES VERSION ${PROJECT_VERSION})
target_compile_definitions(juice PRIVATE $<$<CONFIG:Release>:RELEASE=1>)

@@ -100,11 +100,15 @@ if(WIN32)
target_include_directories(juice PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
@@ -96,11 +96,15 @@ if(WIN32)
endif()

if (USE_NETTLE)
- find_package(Nettle REQUIRED)
+ find_path(NETTLE_INCLUDE_PATH "nettle/hmac.h" REQUIRED)
+ find_path(NETTLE_INCLUDE_PATH "nettle/hmac.h" REQUIRED)
+ find_library(NETTLE_LIBRARY_PATH NAMES nettle libnettle REQUIRED)
+ target_include_directories(juice PRIVATE ${NETTLE_INCLUDE_PATH})
+ target_include_directories(juice-static PRIVATE ${NETTLE_INCLUDE_PATH})
+
+
target_compile_definitions(juice PRIVATE USE_NETTLE=1)
- target_link_libraries(juice PRIVATE Nettle::Nettle)
+ target_link_libraries(juice PRIVATE ${NETTLE_LIBRARY_PATH})
Expand All @@ -30,4 +30,3 @@ index aedb557..89c701b 100644
else()
target_compile_definitions(juice PRIVATE USE_NETTLE=0)
target_compile_definitions(juice-static PRIVATE USE_NETTLE=0)

17 changes: 8 additions & 9 deletions ports/libjuice/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO paullouisageneau/libjuice
REF v0.8.4
SHA512 c33fc237ff0acb6b9cb37143d1f5a22f20670c8e32200d79c45c8473e1b0e1174926706876a1c37a51ba9ec6ec935337fd87512211eaaf8652f73d4934038834
REF 026b3dd68db33143db8a5a9b16af3923733a8b61 #v0.9.1
SHA512 050e92df2e3f24da465ffd4e57d35ffc7a4e13042dc0b829627a09c3f8c7898c7b066f3e386004b579e7416adf4885f5f7a8da46f34c76e9bc63747616f34f9d
HEAD_REF master
PATCHES
fix-for-vcpkg.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
nettle USE_NETTLE
nettle USE_NETTLE
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DNO_TESTS=ON
)

vcpkg_install_cmake()
vcpkg_cmake_install()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libjuice)
vcpkg_cmake_config_fixup(PACKAGE_NAME LibJuice CONFIG_PATH lib/cmake/LibJuice)
vcpkg_fixup_pkgconfig()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
12 changes: 11 additions & 1 deletion ports/libjuice/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"name": "libjuice",
"version": "0.8.4",
"version": "0.9.1",
"description": "The library is a simplified implementation of the Interactive Connectivity Establishment (ICE) protocol in C for POSIX platforms (including Linux and Apple macOS) and Microsoft Windows.",
"homepage": "https://github.com/paullouisageneau/libjuice",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"nettle": {
"description": "Use nettle for HMAC computation instead of the Builtin",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3306,7 +3306,7 @@
},
"libdatachannel": {
"baseline": "0.15.1",
"port-version": 0
"port-version": 1
},
"libdatrie": {
"baseline": "0.2.10",
Expand Down Expand Up @@ -3497,7 +3497,7 @@
"port-version": 2
},
"libjuice": {
"baseline": "0.8.4",
"baseline": "0.9.1",
"port-version": 0
},
"libkeyfinder": {
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libdatachannel.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4ef71c270b3ea4205b878248ade5e50c03fd54b4",
"version-semver": "0.15.1",
"port-version": 1
},
{
"git-tree": "eb99868eb60c37127a98ff943da771edb8002a29",
"version-semver": "0.15.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libjuice.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "564ac624cbbabb45356d592264c090a0e6f64669",
"version": "0.9.1",
"port-version": 0
},
{
"git-tree": "077151e85bf11cabc11d0f1c46b778b5a21829dd",
"version": "0.8.4",
Expand Down