Skip to content

Commit

Permalink
libuv: update to 1.42.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc authored and eli-schwartz committed Oct 21, 2021
1 parent d6ae884 commit 5c68aab
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 26 deletions.
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@
"libuv"
],
"versions": [
"1.42.0-1",
"1.41.0-1",
"1.18.0-3",
"1.18.0-2",
Expand Down
8 changes: 4 additions & 4 deletions subprojects/libuv.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[wrap-file]
directory = libuv-v1.41.0
source_url = https://dist.libuv.org/dist/v1.41.0/libuv-v1.41.0.tar.gz
source_filename = libuv-v1.41.0.tar.gz
source_hash = 1184533907e1ddad9c0dcd30a5abb0fe25288c287ff7fee303fff7b9b2d6eb6e
directory = libuv-v1.42.0
source_url = https://dist.libuv.org/dist/v1.42.0/libuv-v1.42.0.tar.gz
source_filename = libuv-v1.42.0.tar.gz
source_hash = 43129625155a8aed796ebe90b8d4c990a73985ec717de2b2d5d3a23cfe4deb72
patch_directory = libuv

[provide]
Expand Down
60 changes: 38 additions & 22 deletions subprojects/packagefiles/libuv/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('libuv', 'c',
version : '1.41.0',
version : '1.42.0',
license : 'libuv',
default_options : [ 'c_std=c89' ],
)
Expand Down Expand Up @@ -76,9 +76,6 @@ if cc_msvc
endif

cc_other_cargs_all = [
'-Wno-unused-parameter', # no_unused_parameter
'-Wstrict-prototypes', # strict_prototypes
'-Wextra', # extra
'-fno-strict-aliasing', # f_strict_aliasing
]
foreach flag : cc_other_cargs_all
Expand Down Expand Up @@ -144,9 +141,6 @@ else
'-D_FILE_OFFSET_BITS=64',
'-D_LARGEFILE_SOURCE',
]
if not (android or os390 or qnx)
libuv_libs += 'pthread'
endif
libuv_src += [
'src/unix/async.c',
'src/unix/core.c',
Expand Down Expand Up @@ -178,6 +172,7 @@ if aix
'-D_LINUX_SOURCE_COMPAT',
'-D_THREAD_SAFE',
'-D_XOPEN_SOURCE=500',
'-D_REENTRANT',
'-DHAVE_SYS_AHAFS_EVPRODS_H',
]
libuv_libs += 'perfstat'
Expand All @@ -200,6 +195,7 @@ if android
'src/unix/random-getentropy.c',
'src/unix/random-getrandom.c',
'src/unix/random-sysctl-linux.c',
'src/unix/epoll.c',
]
endif

Expand Down Expand Up @@ -258,6 +254,7 @@ if linux
'src/unix/procfs-exepath.c',
'src/unix/random-getrandom.c',
'src/unix/random-sysctl-linux.c',
'src/unix/epoll.c',
]
endif

Expand Down Expand Up @@ -318,13 +315,12 @@ endif
# test-depending config
if libuv_build_tests and (apple or dragonfly or freebsd or linux or netbsd or openbsd)
libuv_test_libs += 'util'

# TODO: tests seem to require pthread, but they are not linked in the original CMake file?
libuv_test_libs += 'pthread'
endif

# convert libs to dependencies
libuv_deps = []
libuv_deps = [
dependency('threads'),
]
foreach lib : libuv_libs
libuv_deps += cc.find_library(lib, required: true)
endforeach
Expand All @@ -339,15 +335,13 @@ libuv_private_inc = include_directories('src')
libuv_inc = [libuv_public_inc, libuv_private_inc]

# libraries and respective dependency declarations
libuv_comp_args = []
libuv_test_lflags = []
if cc_msvc
# TODO: workaround for msvc, because of __declspec(dllexport)
if get_option('default_library') == 'both'
error('default_library=both is not supported with MSVC')
elif get_option('default_library') == 'shared'
libuv_cargs += '-DBUILDING_UV_SHARED=1'
libuv_comp_args += '-DUSING_UV_SHARED=1'
endif
endif
if libuv_qemu and get_option('default_library') == 'static'
Expand All @@ -360,8 +354,11 @@ libuv = library('uv',
dependencies: libuv_deps,
include_directories: libuv_inc,
)
libuv_dep = declare_dependency(link_with: libuv, include_directories: libuv_public_inc,
compile_args: libuv_comp_args)
libuv_dep = declare_dependency(
dependencies: libuv_deps,
link_with: libuv,
include_directories: libuv_public_inc,
)

# benchmark & test config
if libuv_build_bench
Expand All @@ -385,7 +382,6 @@ if libuv_build_bench
'test/benchmark-thread.c',
'test/benchmark-udp-pummel.c',
'test/blackhole-server.c',
'test/dns-server.c',
'test/echo-server.c',
'test/run-benchmarks.c',
'test/runner.c',
Expand Down Expand Up @@ -459,6 +455,9 @@ if libuv_build_tests
'test/test-metrics.c',
'test/test-multiple-listen.c',
'test/test-mutexes.c',
'test/test-not-readable-nor-writable-on-read-error.c',
'test/test-not-readable-on-eof.c',
'test/test-not-writable-after-shutdown.c',
'test/test-osx-select.c',
'test/test-pass-always.c',
'test/test-ping-pong.c',
Expand Down Expand Up @@ -491,6 +490,7 @@ if libuv_build_tests
'test/test-semaphore.c',
'test/test-shutdown-close.c',
'test/test-shutdown-eof.c',
'test/test-shutdown-simultaneous.c',
'test/test-shutdown-twice.c',
'test/test-signal-multiple-loops.c',
'test/test-signal-pending-on-close.c',
Expand Down Expand Up @@ -561,15 +561,31 @@ if libuv_build_tests
'test/test-walk-handles.c',
'test/test-watcher-cross-stop.c',
]
if win32
# TODO: not sure if this works like that, it doesn't on linux
libuv_test_src += meson.source_root() + '/uv_win_longpath.manifest'
libuv_test_cargs = []
if cc_msvc
if get_option('default_library') == 'both'
error('default_library=both is not supported with MSVC')
elif get_option('default_library') == 'shared'
libuv_test_cargs += [
'-DUSING_UV_SHARED',
]
endif
libuv_test_lflags += [
'/MANIFEST:EMBED',
'/MANIFESTINPUT:' + join_paths(meson.current_source_dir(), 'uv_win_longpath.manifest')
]
endif
libuv_test_exe = executable('uv_run_tests', libuv_test_src,
dependencies: [libuv_dep, libuv_test_deps], c_args: libuv_cargs,
dependencies: [libuv_dep, libuv_test_deps], c_args: libuv_test_cargs,
link_args: libuv_test_lflags)
test('libuv_run_tests', libuv_test_exe, workdir: meson.current_source_dir(),
protocol: 'tap', timeout: 100, is_parallel: false)
test(
'libuv_run_tests',
libuv_test_exe,
workdir: meson.current_source_dir(),
protocol: 'tap',
timeout: 300,
is_parallel: false,
)
endif

# TODO: install
Expand Down

0 comments on commit 5c68aab

Please sign in to comment.