[libuv] Update to 1.45.0 (#32165)

* [libuv] Update to 1.45.0

* [libuv] Update all consuming ports

* [libuv] Update versions

* resolve port SHA

* Add port-version

* update version

* revert usockets.json

---------

Co-authored-by: Zhao Liu <v-zhli17@microsoft.com>
This commit is contained in:
JAEHONG KIM 2023-06-28 09:07:58 +09:00 committed by GitHub
parent 0d1150cbd2
commit cb7d3b4999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 112 additions and 89 deletions

View File

@ -1,72 +1,46 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac52412..15d5cb2 100644
index 93733dd0..769025cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -381,7 +381,7 @@ endif()
if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
list(APPEND uv_test_libraries util)
endif()
-
+if (BUILD_SHARED_LIBS)
add_library(uv SHARED ${uv_sources})
target_compile_definitions(uv
INTERFACE
@@ -401,7 +401,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
set_target_properties(uv PROPERTIES LINKER_LANGUAGE CXX)
endif()
target_link_libraries(uv ${uv_libraries})
@@ -460,8 +460,7 @@ if(LIBUV_BUILD_SHARED)
endif()
target_link_libraries(uv ${uv_libraries})
set_target_properties(uv PROPERTIES OUTPUT_NAME "uv")
-endif()
-
+else()
add_library(uv_a STATIC ${uv_sources})
target_compile_definitions(uv_a PRIVATE ${uv_defines})
target_compile_options(uv_a PRIVATE ${uv_cflags})
@@ -416,7 +416,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
set_target_properties(uv_a PROPERTIES LINKER_LANGUAGE CXX)
@@ -480,6 +479,7 @@ set_target_properties(uv_a PROPERTIES OUTPUT_NAME "uv")
if(MSVC)
set_target_properties(uv_a PROPERTIES PREFIX "lib")
endif()
target_link_libraries(uv_a ${uv_libraries})
-
+endif()
if(LIBUV_BUILD_TESTS)
# Small hack: use ${uv_test_sources} now to get the runner skeleton,
# before the actual tests are added.
@@ -659,26 +659,39 @@ string(REPLACE ";" " " LIBS "${LIBS}")
file(STRINGS configure.ac configure_ac REGEX ^AC_INIT)
string(REGEX MATCH "([0-9]+)[.][0-9]+[.][0-9]+" PACKAGE_VERSION "${configure_ac}")
set(UV_VERSION_MAJOR "${CMAKE_MATCH_1}")
+if (BUILD_SHARED_LIBS)
# The version in the filename is mirroring the behaviour of autotools.
set_target_properties(uv PROPERTIES
VERSION ${UV_VERSION_MAJOR}.0.0
SOVERSION ${UV_VERSION_MAJOR})
+endif()
set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(prefix ${CMAKE_INSTALL_PREFIX})
+if (BUILD_SHARED_LIBS)
configure_file(libuv.pc.in libuv.pc @ONLY)
+else()
configure_file(libuv-static.pc.in libuv-static.pc @ONLY)
+endif()
@@ -737,10 +737,6 @@ configure_file(libuv-static.pc.in libuv-static.pc @ONLY)
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
-install(FILES ${PROJECT_BINARY_DIR}/libuv.pc ${PROJECT_BINARY_DIR}/libuv-static.pc
+if (BUILD_SHARED_LIBS)
+install(FILES ${PROJECT_BINARY_DIR}/libuv.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(FILES LICENSE-extra DESTINATION ${CMAKE_INSTALL_DOCDIR})
-install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-install(TARGETS uv_a EXPORT libuvConfig
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT libuvConfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv
NAMESPACE libuv::)
@@ -757,6 +753,11 @@ if(LIBUV_BUILD_SHARED)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+else()
+install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+endif()
+if (BUILD_SHARED_LIBS)
install(TARGETS uv EXPORT libuvConfig
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+else()
install(TARGETS uv_a EXPORT libuvConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+endif()
install(EXPORT libuvConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv)
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+install(TARGETS uv_a EXPORT libuvConfig
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(MSVC)

View File

@ -1,16 +1,20 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libuv/libuv
REF 0c1fa696aa502eb749c2c4735005f41ba00a27b8 #v1.44.2
SHA512 4b63745d48c5318d75ef3580fc6d6288b1ca26a25f69fbef2af4b6fe1d1fe1255986cbb1fb5124e1ba6cd324868ebccdc6f6965e08e3e0fbde29f22e7e20ce89
REF "v${VERSION}"
SHA512 a156dd0ed06bc7c50515f46ef6e5636d870288636f442ce9ec46716e22fdaa664ce49e432f4737c81e9c6013b34ed150e7420ab9fc316ed23281096954359774
HEAD_REF v1.x
PATCHES fix-build-type.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBUV_BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DLIBUV_BUILD_TESTS=OFF
-DLIBUV_BUILD_BENCH=OFF
-DLIBUV_BUILD_SHARED=${LIBUV_BUILD_SHARED}
-DQEMU=OFF
-DASAN=OFF
-DTSAN=OFF

View File

@ -1,4 +1,4 @@
libuv provides CMake targets:
find_package(libuv CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:uv_a>,uv_a,uv>)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)

View File

@ -1,6 +1,6 @@
{
"name": "libuv",
"version-semver": "1.44.2",
"version-semver": "1.45.0",
"description": "libuv is a multi-platform support library with a focus on asynchronous I/O.",
"homepage": "https://github.com/libuv/libuv",
"license": "BSD-3-Clause",

View File

@ -9,7 +9,7 @@ index e63a431..163bada 100644
- find_package(Libuv REQUIRED)
- include_directories(${LIBUV_INCLUDE_DIR})
+ find_package(libuv CONFIG REQUIRED)
+ set(LIBUV_LIBRARIES $<IF:$<TARGET_EXISTS:uv_a>,uv_a,uv>)
+ set(LIBUV_LIBRARIES $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)
else (WITH_SHARED_LIBUV)
include_directories(deps/libuv/include)
add_subdirectory(deps/libuv EXCLUDE_FROM_ALL)

View File

@ -1,6 +1,7 @@
{
"name": "luv",
"version-semver": "1.44.2",
"port-version": 1,
"description": "Bare libuv bindings for lua",
"homepage": "https://github.com/luvit/luv",
"license": "Apache-2.0",

View File

@ -9,10 +9,10 @@ index 27b40e7..81de970 100644
- find_package(Libuv)
+ find_package(Libuv NAMES libuv CONFIG)
if (Libuv_FOUND)
+ if (TARGET uv)
+ add_library(Libuv::Libuv ALIAS uv)
+ if (TARGET libuv::uv)
+ add_library(Libuv::Libuv ALIAS libuv::uv)
+ else()
+ add_library(Libuv::Libuv ALIAS uv_a)
+ add_library(Libuv::Libuv ALIAS libuv::uv_a)
+ endif()
set (PROACTOR_OK libuv)
set (qpid-proton-proactor src/proactor/libuv.c ${qpid-proton-proactor-common})

View File

@ -1,6 +1,7 @@
{
"name": "qpid-proton",
"version": "0.38.0",
"port-version": 1,
"description": "Qpid Proton is a high-performance, lightweight messaging library.",
"homepage": "https://github.com/apache/qpid-proton",
"license": "Apache-2.0",

View File

@ -9,7 +9,7 @@ index e85a158..e67681c 100644
- find_path(REDIS_PLUS_PLUS_ASYNC_LIB_HEADER NAMES uv.h)
- find_library(REDIS_PLUS_PLUS_ASYNC_LIB uv)
+ find_package(libuv CONFIG REQUIRED)
+ set(REDIS_PLUS_PLUS_ASYNC_LIB $<IF:$<TARGET_EXISTS:uv_a>,uv_a,uv>)
+ set(REDIS_PLUS_PLUS_ASYNC_LIB $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)
else()
message(FATAL_ERROR "invalid REDIS_PLUS_PLUS_BUILD_ASYNC")
endif()

View File

@ -1,6 +1,7 @@
{
"name": "redis-plus-plus",
"version-semver": "1.3.9",
"port-version": 1,
"description": "This is a C++ client for Redis. It's based on hiredis, and written in C++ 11",
"homepage": "https://github.com/sewenew/redis-plus-plus",
"license": "Apache-2.0",

View File

@ -9,10 +9,10 @@ index efcffc2..dd9bd16 100644
-find_package(uv REQUIRED)
-list(APPEND TP_LINK_LIBRARIES uv::uv)
+find_package(libuv CONFIG REQUIRED)
+if (TARGET uv)
+list(APPEND TP_LINK_LIBRARIES uv)
+if (TARGET libuv::uv)
+list(APPEND TP_LINK_LIBRARIES libuv::uv)
+else()
+list(APPEND TP_LINK_LIBRARIES uv_a)
+list(APPEND TP_LINK_LIBRARIES libuv::uv_a)
+endif()
### shm

View File

@ -1,7 +1,7 @@
{
"name": "tensorpipe",
"version-date": "2022-03-16",
"port-version": 3,
"port-version": 4,
"description": "A tensor-aware point-to-point communication primitive for machine learning",
"homepage": "https://github.com/pytorch/tensorpipe",
"license": "BSD-3-Clause",

View File

@ -13,10 +13,10 @@ else()
endif()
find_package(libuv CONFIG REQUIRED)
if (TARGET uv)
set(LIBUV_LIBRARY uv)
if (TARGET libuv::uv)
set(LIBUV_LIBRARY libuv::uv)
else()
set(LIBUV_LIBRARY uv_a)
set(LIBUV_LIBRARY libuv::uv_a)
endif()
file(GLOB SOURCES src/*.c src/eventing/*.c)

View File

@ -1,6 +1,7 @@
{
"name": "usockets",
"version": "0.8.6",
"port-version": 1,
"description": "Miniscule cross-platform eventing, networking & crypto for async applications",
"homepage": "https://github.com/uNetworking/uSockets",
"license": "Apache-2.0",

View File

@ -8,10 +8,10 @@ index 289c006..180383f 100644
endif()
+
+find_package(libuv CONFIG REQUIRED)
+if (TARGET uv)
+ target_link_libraries(uvw PRIVATE uv)
+if (TARGET libuv::uv)
+ target_link_libraries(uvw PRIVATE libuv::uv)
+else()
+ target_link_libraries(uvw PRIVATE uv_a)
+ target_link_libraries(uvw PRIVATE libuv::uv_a)
+endif()
+
install(

View File

@ -1,6 +1,7 @@
{
"name": "uvw",
"version": "3.0.0",
"port-version": 1,
"description": "A compilable static library, event based, tiny and easy to use libuv wrapper in modern C++.",
"homepage": "https://github.com/skypjack/uvw",
"license": "MIT",

View File

@ -22,10 +22,10 @@ index 559c8ed..0fe60e9 100644
- find_package(unofficial-libuv CONFIG REQUIRED)
- target_link_libraries(wpiutil unofficial::libuv::libuv)
+ find_package(libuv CONFIG REQUIRED)
+ if (TARGET uv)
+ target_link_libraries(wpiutil uv)
+ if (TARGET libuv::uv)
+ target_link_libraries(wpiutil libuv::uv)
+ else()
+ target_link_libraries(wpiutil uv_a)
+ target_link_libraries(wpiutil libuv::uv_a)
+ endif()
endif()

View File

@ -1,7 +1,7 @@
{
"name": "wpilib",
"version-date": "2020-03-02",
"port-version": 3,
"port-version": 4,
"description": "WPILib is the software library package for the FIRST Robotics Competition. The core install includes wpiutil, a common utilies library, and ntcore, the base NetworkTables library.",
"homepage": "https://github.com/wpilibsuite/allwpilib",
"license": null,

View File

@ -18,10 +18,10 @@ index fdfe456..ef2d329 100644
"CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
endif()
- set(CMAKE_LIBUV_LIBRARIES LibUV::LibUV)
+ if (TARGET uv)
+ set(CMAKE_LIBUV_LIBRARIES uv)
+ if (TARGET libuv::uv)
+ set(CMAKE_LIBUV_LIBRARIES libuv::uv)
+ else()
+ set(CMAKE_LIBUV_LIBRARIES uv_a)
+ set(CMAKE_LIBUV_LIBRARIES libuv::uv_a)
+ endif()
else()
set(CMAKE_LIBUV_LIBRARIES cmlibuv)

View File

@ -1,7 +1,7 @@
{
"name": "cmake",
"version": "3.22.2",
"port-version": 3,
"port-version": 4,
"description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software.",
"homepage": "https://cmake.org/",
"license": "BSD-3-Clause",

View File

@ -4725,7 +4725,7 @@
"port-version": 13
},
"libuv": {
"baseline": "1.44.2",
"baseline": "1.45.0",
"port-version": 0
},
"libuvc": {
@ -5074,7 +5074,7 @@
},
"luv": {
"baseline": "1.44.2",
"port-version": 0
"port-version": 1
},
"lv2": {
"baseline": "1.18.2",
@ -6566,7 +6566,7 @@
},
"qpid-proton": {
"baseline": "0.38.0",
"port-version": 0
"port-version": 1
},
"qscintilla": {
"baseline": "2.13.4",
@ -7106,7 +7106,7 @@
},
"redis-plus-plus": {
"baseline": "1.3.9",
"port-version": 0
"port-version": 1
},
"refl-cpp": {
"baseline": "0.12.3",
@ -7966,7 +7966,7 @@
},
"tensorpipe": {
"baseline": "2022-03-16",
"port-version": 3
"port-version": 4
},
"termcolor": {
"baseline": "2.1.0",
@ -8326,7 +8326,7 @@
},
"usockets": {
"baseline": "0.8.6",
"port-version": 0
"port-version": 1
},
"usrsctp": {
"baseline": "0.9.5.0",
@ -8362,7 +8362,7 @@
},
"uvw": {
"baseline": "3.0.0",
"port-version": 0
"port-version": 1
},
"uwebsockets": {
"baseline": "20.44.0",
@ -8682,7 +8682,7 @@
},
"wpilib": {
"baseline": "2020-03-02",
"port-version": 3
"port-version": 4
},
"wren": {
"baseline": "0.4.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c99175c380930fd7a51719f7247618cceaa51529",
"version-semver": "1.45.0",
"port-version": 0
},
{
"git-tree": "dad61360b9c0fb825e23a4ccc01dcd9658e2f253",
"version-semver": "1.44.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d18a8a0efcd76a0b4615d85c8bda26dd4ba1b7ad",
"version-semver": "1.44.2",
"port-version": 1
},
{
"git-tree": "dfb9cba0c0da80351b575c758df8f2b03048315f",
"version-semver": "1.44.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0a69d30375c0d5848b12cbdcaab4820b9d639223",
"version": "0.38.0",
"port-version": 1
},
{
"git-tree": "848bfbdf75b68fadddcddd6c501d095a8f21f63d",
"version": "0.38.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8c31ae593f450352915471514d517a772cd5099b",
"version-semver": "1.3.9",
"port-version": 1
},
{
"git-tree": "ce8c8a22b5a791c7a3a96d72d5e2ce47881db17c",
"version-semver": "1.3.9",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f470079788d337b13d5a7fb0b4f3663863f3c385",
"version-date": "2022-03-16",
"port-version": 4
},
{
"git-tree": "ea5e9e44827c85ad455621231cb7ca1f2447cdd9",
"version-date": "2022-03-16",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "178ef570c3acdb03066628f05aa564af7609f48c",
"version": "0.8.6",
"port-version": 1
},
{
"git-tree": "648715b141f4bb501ebc83d09da547ee0b3fe467",
"version": "0.8.6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "67bc0402d4aa7c5cbb9f934c0e7c68fec4acdcfc",
"version": "3.0.0",
"port-version": 1
},
{
"git-tree": "ffc751aa641f583e42aad836b6bd7766661f789a",
"version": "3.0.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e62481ee582e81ab3ba9fe7ad99a89fa1671c230",
"version-date": "2020-03-02",
"port-version": 4
},
{
"git-tree": "1593dcc61c40d6205be6d47e3623dc6bb3ddbad3",
"version-date": "2020-03-02",