Skip to content

Commit 0204c55

Browse files
Auto-update nsync to 1.30.0 (#8627)
* Update nsync to 1.30.0 * add patch * fix ios --------- Co-authored-by: star9029 <[email protected]>
1 parent 6a9f285 commit 0204c55

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 70d88c3..c560abf 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -15,7 +15,7 @@ else ()
6+
endif ()
7+
8+
# Some builds need position-independent code.
9+
-set (CMAKE_POSITION_INDEPENDENT_CODE ON)
10+
+
11+
12+
# Allow nsync users to turn the tests on or off.
13+
option (NSYNC_ENABLE_TESTS "Enable for building tests" ON)
14+
@@ -90,7 +90,9 @@ endif ()
15+
# Pick the include directory for the operating system.
16+
if ("${CMAKE_SYSTEM_NAME}X" STREQUAL "WindowsX")
17+
include_directories ("${PROJECT_SOURCE_DIR}/platform/win32")
18+
- set (NSYNC_CPP_FLAGS "/TP")
19+
+ if (MSVC)
20+
+ set (NSYNC_CPP_FLAGS "/TP")
21+
+ endif ()
22+
23+
set (NSYNC_OS_SRC
24+
${NSYNC_POSIX_SRC}
25+
@@ -397,15 +399,17 @@ if (NSYNC_ENABLE_TESTS)
26+
endforeach (t)
27+
endif ()
28+
29+
-set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)
30+
+
31+
32+
install (TARGETS nsync EXPORT nsync
33+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
34+
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
35+
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
36+
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
37+
38+
install (TARGETS nsync_cpp EXPORT nsync_cpp OPTIONAL
39+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
40+
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
41+
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
42+
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
43+
44+
set (NSYNC_INCLUDES
45+
"public/nsync.h"
46+

packages/n/nsync/xmake.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@ package("nsync")
66
add_urls("https://github.com/google/nsync/archive/refs/tags/$(version).tar.gz",
77
"https://github.com/google/nsync.git")
88

9+
add_versions("1.30.0", "883a0b3f8ffc1950670425df3453c127c1a3f6ed997719ca1bbe7f474235b6cc")
910
add_versions("1.29.2", "1d63e967973733d2c97e841e3c05fac4d3fa299f01d14c86f2695594c7a4a2ec")
1011
add_versions("1.29.1", "3045a8922171430426b695edf794053182d245f6a382ddcc59ef4a6190848e98")
1112
add_versions("1.28.1", "0011fc00820088793b6a9ba97536173a25cffd3df2dc62616fb3a2824b3c43f5")
1213

13-
add_patches(">=1.28.1", "patches/1.28.1/cmake.patch", "626a89a5a60884b7aaf44011494e7ba5dbfcdae9fcdb5afcef5b5d1f893b4600")
14+
add_patches(">=1.30.0", "patches/1.30.0/cmake.patch", "9cb6c772cefe05af0024e8a0a6931531f000ddea3e54ad258a3b95cc04aa1e0c")
15+
add_patches(">=1.28.1<1.30.0", "patches/1.28.1/cmake.patch", "626a89a5a60884b7aaf44011494e7ba5dbfcdae9fcdb5afcef5b5d1f893b4600")
16+
17+
if is_plat("wasm") then
18+
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
19+
end
1420

1521
if is_plat("linux", "bsd") then
1622
add_syslinks("m", "pthread")
@@ -19,6 +25,10 @@ package("nsync")
1925
add_deps("cmake")
2026

2127
on_install(function (package)
28+
if package:is_plat("iphoneos") then
29+
io.replace("CMakeLists.txt", [[elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "DarwinX")]], "elseif(1)", {plain = true})
30+
end
31+
2232
local configs = {"-DNSYNC_ENABLE_TESTS=OFF"}
2333
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
2434
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))

0 commit comments

Comments
 (0)