Skip to content

Commit

Permalink
[nsync] update to 1.29.2 (#41387)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayuehua authored Oct 11, 2024
1 parent fea2eca commit 748125e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 56 deletions.
36 changes: 0 additions & 36 deletions ports/nsync/export-targets.patch

This file was deleted.

28 changes: 14 additions & 14 deletions ports/nsync/fix-install.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b1f1dc..328f9b6 100644
index fcc3f41..18859e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,7 +80,7 @@ set (NSYNC_OS_CPP_SRC
# https://cmake.org/cmake/help/v3.1/policy/CMP0054.html
@@ -41,6 +41,9 @@ function (set_cpp_target tgtname files)
"${PROJECT_SOURCE_DIR}/platform/c++11.futex"
)
endif ()
+
+ target_include_directories("${tgtname}" PUBLIC $<INSTALL_INTERFACE:include>)
+

target_compile_definitions ("${tgtname}" PRIVATE "${NSYNC_CPP_DEFINITIONS}")

@@ -88,7 +91,7 @@ if ("${CMAKE_C_COMPILER_ID}X" STREQUAL "MSVCX")
endif ()

# Pick the include directory for the operating system.
-if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX")
+if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX" OR "${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsStoreX")
include_directories ("${PROJECT_SOURCE_DIR}/platform/win32")
set (NSYNC_CPP_FLAGS "/TP")

@@ -230,7 +230,7 @@ elseif (("${CMAKE_SYSTEM_PROCESSOR}X" STREQUAL "ppc64X"))
@@ -232,7 +235,7 @@ elseif (("${CMAKE_SYSTEM_PROCESSOR}X" STREQUAL "ppc64X"))
endif ()

# Windows uses some include files from the posix directory also.
Expand All @@ -20,13 +30,3 @@ index 6b1f1dc..328f9b6 100644
include_directories ("${PROJECT_SOURCE_DIR}/platform/posix")
endif ()

@@ -396,7 +396,8 @@ if (NSYNC_ENABLE_TESTS)
endforeach (t)
endif ()

-set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)
+# By default, install nsync always
+# set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)

install (TARGETS nsync
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
9 changes: 5 additions & 4 deletions ports/nsync/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/nsync
REF "${VERSION}"
SHA512 8aa49997f100f161f0f32e99c9004ee845d7b16c1391e7eb62eea0897e2f91b7f9e5181055fdca637518751b6b26e16a1cd53e45adceda145285752c4b74f3bf
SHA512 af463d768c9e4bacc5796410c6d368b8ad0cc0fcbae28ec35fbe7937e7939de1ccad97f51b4940e384b677bb8fbc9963a438f7687e002613f1669ab93e459f60
HEAD_REF master
PATCHES
fix-install.patch
export-targets.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DNSYNC_ENABLE_TESTS=OFF
)
vcpkg_cmake_build()
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/nsync_cpp PACKAGE_NAME nsync_cpp DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/nsync)
vcpkg_copy_pdbs()

vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-nsync CONFIG_PATH share/unofficial-nsync)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
2 changes: 1 addition & 1 deletion ports/nsync/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nsync",
"version": "1.26.0",
"version": "1.29.2",
"description": "nsync is a C library that exports various synchronization primitives, such as mutexes",
"homepage": "https://github.com/google/nsync",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6373,7 +6373,7 @@
"port-version": 1
},
"nsync": {
"baseline": "1.26.0",
"baseline": "1.29.2",
"port-version": 0
},
"nt-wrapper": {
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/nsync.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "04b2d31e465f427424f48323cec0c1f2aa51cbc8",
"version": "1.29.2",
"port-version": 0
},
{
"git-tree": "2861341c0435829734827dc84d7166d95d8e8bee",
"version": "1.26.0",
Expand Down

0 comments on commit 748125e

Please sign in to comment.