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.

add centralized dependency management for vendor libraries

+73 -31
+37 -26
meson/deps/meson.build
··· 32 32 win_deps = [] 33 33 endif 34 34 35 - llhttp = dependency('llhttp', static: true, required: false) 36 - if not llhttp.found() 37 - llhttp = dependency('llhttp', method: 'cmake', modules: ['llhttp::llhttp_static'], required: true) 38 - endif 35 + deps_info = { 36 + 'lmdb': { 37 + 'dir': 'openldap-LMDB_0.9.33', 38 + 'inc': 'libraries/liblmdb', 39 + }, 40 + 'yyjson': { 41 + 'dir': 'yyjson-0.12.0', 42 + 'inc': 'src', 43 + }, 44 + 'libuv': { 45 + 'dir': 'libuv-v1.52.0', 46 + 'inc': 'include', 47 + }, 48 + 'llhttp': { 49 + 'dir': 'llhttp-release-v9.3.1', 50 + 'inc': 'include', 51 + }, 52 + 'zlib-ng': { 53 + 'dir': 'zlib-ng-2.3.3', 54 + 'inc': '', 55 + 'build_dir': true, 56 + }, 57 + } 58 + 59 + subprojects_src = src_root / 'vendor' 60 + subprojects_build = meson.project_build_root() / 'vendor' 39 61 40 62 tlsuv_opts = cmake.subproject_options() 41 63 tlsuv_opts.set_override_option('warning_level', '0') ··· 46 68 'BUILD_TESTING': 'OFF', 47 69 'TLSUV_TLSLIB': tls_lib, 48 70 'CMAKE_WARN_DEV': 'OFF', 71 + 49 72 'CMAKE_POLICY_DEFAULT_CMP0200': 'NEW', 50 73 'CMAKE_POLICY_DEFAULT_CMP0156': 'NEW', 51 74 'CMAKE_POLICY_DEFAULT_CMP0179': 'NEW', 75 + 76 + 'llhttp_DIR': subprojects_src / deps_info['llhttp']['dir'] / 'cmake', 77 + 'libuv_DIR': subprojects_src / deps_info['libuv']['dir'] / 'cmake', 52 78 } 53 79 if cmake_prefix != '' 54 80 tlsuv_cmake_defines += {'MBEDTLS_DIR': cmake_prefix, 'CMAKE_PREFIX_PATH': cmake_prefix} ··· 64 90 '-Wno-sometimes-uninitialized', 65 91 '-Wno-cast-function-type-mismatch', 66 92 '-Wno-missing-field-initializers', 67 - '-I' + src_root / 'vendor' / 'libuv-v1.52.0' / 'include', 93 + 94 + '-I' + subprojects_src / deps_info['libuv']['dir'] / deps_info['libuv']['inc'], 95 + '-I' + subprojects_src / deps_info['llhttp']['dir'] / deps_info['llhttp']['inc'], 96 + '-I' + openssl_dep.get_variable(pkgconfig: 'includedir', default_value: ''), 68 97 ] 69 98 70 99 if cmake_prefix != '' ··· 74 103 tlsuv_opts.append_compile_args('c', tlsuv_compile_args) 75 104 tlsuv_dep = cmake.subproject('tlsuv', options: tlsuv_opts).dependency('tlsuv') 76 105 106 + llhttp_dep = subproject('llhttp').get_variable('llhttp_dep') 77 107 libuv_dep = subproject('libuv').get_variable('libuv_dep') 78 108 uthash_dep = subproject('uthash').get_variable('uthash_dep') 79 109 yyjson_dep = subproject('yyjson').get_variable('yyjson_dep') ··· 138 168 oxc_dep = declare_dependency(link_with: oxc_lib) 139 169 zig = find_program('zig', required: true) 140 170 141 - deps_info = { 142 - 'lmdb': { 143 - 'dir': 'openldap-LMDB_0.9.33', 144 - 'inc': 'libraries/liblmdb', 145 - }, 146 - 'yyjson': { 147 - 'dir': 'yyjson-0.12.0', 148 - 'inc': 'src', 149 - }, 150 - 'libuv': { 151 - 'dir': 'libuv-v1.52.0', 152 - 'inc': 'include', 153 - }, 154 - 'zlib-ng': { 155 - 'dir': 'zlib-ng-2.3.3', 156 - 'inc': '', 157 - 'build_dir': true, 158 - }, 159 - } 160 - 161 171 subprojects_src = src_root / 'vendor' 162 172 subprojects_build = meson.project_build_root() / 'vendor' 163 173 164 174 lmdb_include_path = subprojects_src / deps_info['lmdb']['dir'] / deps_info['lmdb']['inc'] 165 175 yyjson_include_path = subprojects_src / deps_info['yyjson']['dir'] / deps_info['yyjson']['inc'] 166 176 libuv_include_path = subprojects_src / deps_info['libuv']['dir'] / deps_info['libuv']['inc'] 177 + llhttp_include_path = subprojects_src / deps_info['llhttp']['dir'] / deps_info['llhttp']['inc'] 167 178 zlib_include_path = subprojects_build / deps_info['zlib-ng']['dir'] / deps_info['zlib-ng']['inc'] 168 179 169 180 pkg_zig_dir = src_root / 'src' / 'pkg' ··· 171 182 172 183 ant_deps = [ 173 184 libffi_dep, uuid_dep, crprintf_dep, 174 - llhttp, pcre2_dep, libuv_dep, 185 + llhttp_dep, pcre2_dep, libuv_dep, 175 186 argtable3_dep, tlsuv_dep, libsodium_dep, 176 187 yyjson_dep, minicoro_dep, uuidv7_dep, 177 188 openssl_dep, zlib_dep, uthash_dep,
+9
vendor/llhttp.wrap
··· 1 + [wrap-file] 2 + directory = llhttp-release-v9.3.1 3 + source_url = https://github.com/nodejs/llhttp/archive/refs/tags/release/v9.3.1.tar.gz 4 + source_filename = llhttp-9.3.1.tar.gz 5 + source_hash = c14a93f287d3dbd6580d08af968294f8bcc61e1e1e3c34301549d00f3cf09365 6 + patch_directory = llhttp 7 + 8 + [provide] 9 + llhttp = llhttp_dep
+4
vendor/packagefiles/libuv/cmake/libuv-config.cmake
··· 1 + add_library(libuv::uv_a INTERFACE IMPORTED) 2 + set_target_properties(libuv::uv_a PROPERTIES 3 + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" 4 + )
+5
vendor/packagefiles/llhttp/cmake/llhttp-config.cmake
··· 1 + add_library(llhttp::llhttp_static INTERFACE IMPORTED) 2 + set_target_properties(llhttp::llhttp_static PROPERTIES 3 + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" 4 + ) 5 + add_library(llhttp::llhttp ALIAS llhttp::llhttp_static)
+12
vendor/packagefiles/llhttp/meson.build
··· 1 + project('llhttp', 'c', version: '9.3.1', default_options: ['c_std=c99', 'warning_level=0']) 2 + 3 + llhttp_lib = static_library( 4 + 'llhttp', 5 + files('src/llhttp.c', 'src/http.c', 'src/api.c'), 6 + include_directories: include_directories('include'), 7 + ) 8 + 9 + llhttp_dep = declare_dependency( 10 + link_with: llhttp_lib, 11 + include_directories: include_directories('include'), 12 + )
+6 -5
vendor/tlsuv.wrap
··· 1 - [wrap-git] 2 - url = https://github.com/openziti/tlsuv 3 - revision = v0.40.10 4 - depth = 1 5 - clone-recursive = true 1 + [wrap-file] 2 + directory = tlsuv-0.40.10 3 + source_url = https://github.com/openziti/tlsuv/archive/refs/tags/v0.40.10.tar.gz 4 + source_filename = tlsuv-0.40.10.tar.gz 5 + source_hash = d4e36f336b8ccd35798a19146241c43cfdfaf088ee58bebdc0c281033bff5da6 6 + method = cmake