From dd47513ad45cb73559b66c6f59e61192544e9263 Mon Sep 17 00:00:00 2001 From: PARK DongHa Date: Tue, 17 Sep 2024 06:54:13 +0900 Subject: [PATCH] [nsync] Fix errors in iOS, Android build (#268) * [nsync] fix iOS build errors * [nsync] update baseline --- ports/nsync/fix-cmake.patch | 35 +++++++++++++++++++++-------------- ports/nsync/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/n-/nsync.json | 5 +++++ 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/ports/nsync/fix-cmake.patch b/ports/nsync/fix-cmake.patch index dc828c30..bd72892c 100644 --- a/ports/nsync/fix-cmake.patch +++ b/ports/nsync/fix-cmake.patch @@ -1,8 +1,16 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index fcc3f41..610710f 100644 +index fcc3f41..15fce06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -88,7 +88,7 @@ if ("${CMAKE_C_COMPILER_ID}X" STREQUAL "MSVCX") +@@ -1,4 +1,6 @@ +-cmake_minimum_required (VERSION 2.8.12) ++cmake_minimum_required (VERSION 3.22) ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_C_STANDARD 11) + + # nsync provides portable synchronization primitives, such as mutexes and + # condition variables. +@@ -88,7 +90,7 @@ if ("${CMAKE_C_COMPILER_ID}X" STREQUAL "MSVCX") endif () # Pick the include directory for the operating system. @@ -11,7 +19,16 @@ index fcc3f41..610710f 100644 include_directories ("${PROJECT_SOURCE_DIR}/platform/win32") set (NSYNC_CPP_FLAGS "/TP") -@@ -232,7 +232,7 @@ elseif (("${CMAKE_SYSTEM_PROCESSOR}X" STREQUAL "ppc64X")) +@@ -110,7 +112,7 @@ if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX") + set (NSYNC_TEST_OS_SRC + "platform/win32/src/start_thread.c" + ) +-elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "DarwinX") ++elseif (("${CMAKE_SYSTEM_NAME}X" STREQUAL "DarwinX") OR ("${CMAKE_SYSTEM_NAME}X" STREQUAL "iOSX")) + include_directories ("${PROJECT_SOURCE_DIR}/platform/macos") + # Some versions of MacOS, such as Sierra, require _DARWIN_C_SOURCE + # when including certin C++ standard header files, such as . +@@ -232,7 +234,7 @@ elseif (("${CMAKE_SYSTEM_PROCESSOR}X" STREQUAL "ppc64X")) endif () # Windows uses some include files from the posix directory also. @@ -20,7 +37,7 @@ index fcc3f41..610710f 100644 include_directories ("${PROJECT_SOURCE_DIR}/platform/posix") endif () -@@ -398,7 +398,7 @@ if (NSYNC_ENABLE_TESTS) +@@ -398,7 +400,7 @@ if (NSYNC_ENABLE_TESTS) endforeach (t) endif () @@ -29,13 +46,3 @@ index fcc3f41..610710f 100644 install (TARGETS nsync EXPORT nsync LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 610710f..8fa318b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required (VERSION 2.8.12) -+cmake_minimum_required (VERSION 3.22) - - # nsync provides portable synchronization primitives, such as mutexes and - # condition variables. diff --git a/ports/nsync/vcpkg.json b/ports/nsync/vcpkg.json index 1dca2ed1..5d6714b2 100644 --- a/ports/nsync/vcpkg.json +++ b/ports/nsync/vcpkg.json @@ -1,7 +1,7 @@ { "name": "nsync", "version": "1.29.2", - "port-version": 1, + "port-version": 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", diff --git a/versions/baseline.json b/versions/baseline.json index ad2b853e..094276cb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -106,7 +106,7 @@ }, "nsync": { "baseline": "1.29.2", - "port-version": 1 + "port-version": 2 }, "nvidia-cnmem": { "baseline": "2018-11-28", diff --git a/versions/n-/nsync.json b/versions/n-/nsync.json index bf9f548a..4169e570 100644 --- a/versions/n-/nsync.json +++ b/versions/n-/nsync.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4de0fab6eb849d97ef39616dcc597c89a813fea7", + "version": "1.29.2", + "port-version": 2 + }, { "git-tree": "6b80ebcbd39973727a67b5f32e94c963e14f9b70", "version": "1.29.2",