MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

migrate tlsuv to meson, remove patch

+139 -74
+6 -44
meson/deps/meson.build
··· 1 - cmake = import('cmake') 2 1 cc = meson.get_compiler('c') 3 2 tls_lib = get_option('tls_library') 4 3 ··· 64 63 llhttp = subproject('llhttp').get_variable('llhttp_dep') 65 64 libuv_dep = subproject('libuv').get_variable('libuv_dep') 66 65 67 - tlsuv_opts = cmake.subproject_options() 68 - tlsuv_opts.set_override_option('warning_level', '0') 69 - tlsuv_opts.append_compile_args('c', ['-w']) 70 - 71 66 zlib_ng_sub = subproject('zlib-ng', default_options: [ 72 67 'b_lto=false', 73 68 'warning_level=0', ··· 78 73 zlib_ng_builddir = subprojects_build / deps_info['zlib-ng']['dir'] 79 74 80 75 cmake_prefix = get_option('deps_prefix_cmake') 81 - tlsuv_cmake_defines = { 82 - 'BUILD_TESTING': 'OFF', 83 - 'TLSUV_TLSLIB': tls_lib, 84 - 'CMAKE_WARN_DEV': 'OFF', 85 - 'CMAKE_POLICY_DEFAULT_CMP0200': 'NEW', 86 - 'CMAKE_POLICY_DEFAULT_CMP0156': 'NEW', 87 - 'CMAKE_POLICY_DEFAULT_CMP0179': 'NEW', 88 - 'llhttp_DIR': subprojects_src / deps_info['llhttp']['dir'] / 'cmake', 89 - 'libuv_DIR': subprojects_src / deps_info['libuv']['dir'] / 'cmake', 90 - 'ZLIB_INCLUDE_DIR': zlib_ng_srcdir, 91 - 'ZLIB_LIBRARY': zlib_ng_builddir / 'libz-ng.a', 92 - } 93 - if cmake_prefix != '' 94 - tlsuv_cmake_defines += {'MBEDTLS_DIR': cmake_prefix, 'CMAKE_PREFIX_PATH': cmake_prefix} 95 - endif 96 - tlsuv_opts.add_cmake_defines(tlsuv_cmake_defines) 97 76 98 - tlsuv_compile_args = [ 99 - '-Wno-unused-function', 100 - '-Wno-unused-variable', 101 - '-Wno-unused-parameter', 102 - '-Wno-sign-compare', 103 - '-Wno-bitwise-op-parentheses', 104 - '-Wno-sometimes-uninitialized', 105 - '-Wno-cast-function-type-mismatch', 106 - '-Wno-missing-field-initializers', 107 - '-I' + subprojects_src / deps_info['libuv']['dir'] / deps_info['libuv']['inc'], 108 - '-I' + subprojects_src / deps_info['llhttp']['dir'] / deps_info['llhttp']['inc'], 109 - ] 110 - 111 - if tls_lib == 'openssl' 112 - tlsuv_compile_args += ['-I' + openssl_dep.get_variable(pkgconfig: 'includedir')] 113 - endif 114 - 115 - if cmake_prefix != '' 116 - tlsuv_compile_args += ['-I' + cmake_prefix / 'include'] 117 - endif 118 - 119 - tlsuv_opts.append_compile_args('c', tlsuv_compile_args) 120 - tlsuv_dep = cmake.subproject('tlsuv', options: tlsuv_opts).dependency('tlsuv') 77 + tlsuv_sub = subproject('tlsuv', default_options: [ 78 + 'tls_backend=' + tls_lib, 79 + 'deps_prefix_cmake=' + cmake_prefix, 80 + 'warning_level=0', 81 + ]) 82 + tlsuv_dep = tlsuv_sub.get_variable('tlsuv_dep') 121 83 122 84 base64_dep = declare_dependency( 123 85 dependencies: subproject('aklomp-base64').get_variable('base64_dep'),
-28
vendor/packagefiles/patches/tlsuv-fix-tls-backend.patch
··· 1 - --- a/CMakeLists.txt 2 - +++ b/CMakeLists.txt 3 - @@ -36,7 +36,9 @@ 4 - endif () 5 - 6 - set(supported_tls_libs openssl mbedtls win32crypto) 7 - -set(TLSUV_TLSLIB ${default_crypto} CACHE STRING "TLS implementation library ${supported_tls_libs}") 8 - +if(NOT DEFINED TLSUV_TLSLIB) 9 - + set(TLSUV_TLSLIB ${default_crypto}) 10 - +endif() 11 - 12 - if(NOT TLSUV_TLSLIB IN_LIST supported_tls_libs) 13 - message(FATAL_ERROR "`${TLSUV_TLSLIB}' TLS library is not supported") 14 - @@ -94,7 +96,13 @@ 15 - ) 16 - endif (TLSUV_HTTP) 17 - 18 - -add_subdirectory(src/${TLSUV_TLSLIB}) 19 - +if(TLSUV_TLSLIB STREQUAL "openssl") 20 - + add_subdirectory(src/openssl) 21 - +elseif(TLSUV_TLSLIB STREQUAL "mbedtls") 22 - + add_subdirectory(src/mbedtls) 23 - +elseif(TLSUV_TLSLIB STREQUAL "win32crypto") 24 - + add_subdirectory(src/win32crypto) 25 - +endif() 26 - 27 - if (TARGET libuv::uv) 28 - message(NOTICE "upstream project set libuv target")
+2
vendor/packagefiles/tlsuv/generated/meson.build
··· 1 + tlsuv_config_inc = include_directories('.') 2 + subdir('tlsuv')
+6
vendor/packagefiles/tlsuv/generated/tlsuv/meson.build
··· 1 + tlsuv_config_h = configure_file( 2 + input: meson.project_source_root() / 'config.h.in', 3 + output: 'config.h', 4 + format: 'cmake', 5 + configuration: config_data, 6 + )
+118
vendor/packagefiles/tlsuv/meson.build
··· 1 + project('tlsuv', 'c', version: '0.40.13', default_options: ['c_std=c11', 'warning_level=0']) 2 + 3 + cc = meson.get_compiler('c') 4 + tls_backend = get_option('tls_backend') 5 + cmake_prefix = get_option('deps_prefix_cmake') 6 + 7 + libuv_dep = dependency('libuv', required: false) 8 + if not libuv_dep.found() 9 + libuv_dep = subproject('libuv').get_variable('libuv_dep') 10 + endif 11 + 12 + llhttp_dep = dependency('llhttp', required: false) 13 + if not llhttp_dep.found() 14 + llhttp_dep = subproject('llhttp').get_variable('llhttp_dep') 15 + endif 16 + 17 + zlib_dep = dependency('zlib', required: false) 18 + if not zlib_dep.found() 19 + zlib_dep = subproject('zlib-ng').get_variable('zlib_ng_dep') 20 + endif 21 + 22 + tlsuv_sources = files( 23 + 'deps/uv_link_t/src/uv_link_t.c', 24 + 'deps/uv_link_t/src/uv_link_source_t.c', 25 + 'deps/uv_link_t/src/uv_link_observer_t.c', 26 + 'deps/uv_link_t/src/defaults.c', 27 + 'src/tlsuv.c', 28 + 'src/um_debug.c', 29 + 'src/base64.c', 30 + 'src/tls_engine.c', 31 + 'src/p11.c', 32 + 'src/socket.c', 33 + 'src/connector.c', 34 + 'src/url.c', 35 + 'src/alloc.c', 36 + 'src/keychain.c', 37 + 'src/http.c', 38 + 'src/websocket.c', 39 + 'src/http_req.c', 40 + 'src/tls_link.c', 41 + 'src/compression.c', 42 + ) 43 + 44 + if host_machine.system() == 'darwin' 45 + tlsuv_sources += files('src/apple/keychain.c') 46 + elif host_machine.system() == 'windows' 47 + tlsuv_sources += files('src/win32/win32_keychain.c') 48 + endif 49 + 50 + if tls_backend == 'openssl' 51 + tlsuv_sources += files('src/openssl/engine.c', 'src/openssl/keys.c') 52 + elif tls_backend == 'mbedtls' 53 + tlsuv_sources += files('src/mbedtls/engine.c', 'src/mbedtls/keys.c') 54 + endif 55 + 56 + tlsuv_c_args = [ 57 + '-DTLSUV_VERSION=v' + meson.project_version(), 58 + '-DTLSUV_HTTP', 59 + '-DTLS_IMPL=' + tls_backend, 60 + '-w', 61 + ] 62 + 63 + if tls_backend == 'openssl' 64 + tlsuv_c_args += '-DUSE_OPENSSL' 65 + elif tls_backend == 'mbedtls' 66 + tlsuv_c_args += '-DUSE_MBEDTLS' 67 + endif 68 + 69 + if cmake_prefix != '' 70 + tlsuv_c_args += ['-I' + cmake_prefix / 'include'] 71 + endif 72 + 73 + if host_machine.system() == 'windows' 74 + tlsuv_c_args += ['-D_WIN32_WINNT=0x0A00', '-DWINVER=0x0A00', '-DWIN32_LEAN_AND_MEAN', 75 + '-D_CRT_SECURE_NO_WARNINGS', '-D_CRT_NONSTDC_NO_DEPRECATE', 76 + '-D_WINSOCK_DEPRECATED_NO_WARNINGS'] 77 + elif host_machine.system() == 'linux' 78 + tlsuv_c_args += ['-D_POSIX_C_SOURCE=200112', '-D_GNU_SOURCE'] 79 + endif 80 + 81 + tls_dep = [] 82 + if tls_backend == 'openssl' 83 + tls_dep = dependency('openssl', required: true) 84 + tlsuv_c_args += ['-I' + tls_dep.get_variable(pkgconfig: 'includedir')] 85 + endif 86 + 87 + config_data = configuration_data() 88 + config_data.set('PROJECT_VERSION_MAJOR', meson.project_version().split('.')[0]) 89 + config_data.set('PROJECT_VERSION_MINOR', meson.project_version().split('.')[1]) 90 + config_data.set('PROJECT_VERSION_PATCH', meson.project_version().split('.')[2]) 91 + config_data.set('tlsuv_VERSION', meson.project_version()) 92 + config_data.set('TLSUV_TLSLIB', tls_backend) 93 + config_data.set('TLSUV_HTTP', true) 94 + 95 + subdir('generated') 96 + 97 + tlsuv_lib = static_library( 98 + 'tlsuv', 99 + tlsuv_sources, tlsuv_config_h, 100 + c_args: tlsuv_c_args, 101 + dependencies: [libuv_dep, llhttp_dep, zlib_dep], 102 + include_directories: [ 103 + include_directories('include'), 104 + include_directories('src'), 105 + include_directories('deps/uv_link_t'), 106 + include_directories('deps/uv_link_t/include'), 107 + tlsuv_config_inc, 108 + ], 109 + ) 110 + 111 + tlsuv_dep = declare_dependency( 112 + link_with: tlsuv_lib, 113 + include_directories: [ 114 + include_directories('include'), 115 + include_directories('deps/uv_link_t/include'), 116 + tlsuv_config_inc, 117 + ], 118 + )
+2
vendor/packagefiles/tlsuv/meson_options.txt
··· 1 + option('tls_backend', type: 'combo', choices: ['openssl', 'mbedtls'], value: 'openssl', description: 'TLS backend library') 2 + option('deps_prefix_cmake', type: 'string', value: '', description: 'Prefix for cmake-built dependencies')
+5 -2
vendor/tlsuv.wrap
··· 2 2 url = https://github.com/openziti/tlsuv.git 3 3 revision = v0.40.13 4 4 depth = 1 5 - diff_files = patches/tlsuv-fix-fd-type.patch, patches/tlsuv-fix-tls-backend.patch 6 - method = cmake 5 + diff_files = patches/tlsuv-fix-fd-type.patch 6 + patch_directory = tlsuv 7 + 8 + [provide] 9 + tlsuv = tlsuv_dep