Use zig package manager instead of submodules

This commit is contained in:
Nikolay Govorov
2026-02-25 00:59:12 +00:00
parent 4017911373
commit a8164f612f
8 changed files with 356 additions and 467 deletions

12
.gitmodules vendored
View File

@@ -1,15 +1,3 @@
[submodule "tests/wpt"] [submodule "tests/wpt"]
path = tests/wpt path = tests/wpt
url = https://github.com/lightpanda-io/wpt url = https://github.com/lightpanda-io/wpt
[submodule "vendor/nghttp2"]
path = vendor/nghttp2
url = https://github.com/nghttp2/nghttp2.git
[submodule "vendor/zlib"]
path = vendor/zlib
url = https://github.com/madler/zlib.git
[submodule "vendor/curl"]
path = vendor/curl
url = https://github.com/curl/curl.git
[submodule "vendor/brotli"]
path = vendor/brotli
url = https://github.com/google/brotli

783
build.zig
View File

@@ -192,8 +192,6 @@ fn addDependencies(
.v8_enable_sandbox = is_tsan, .v8_enable_sandbox = is_tsan,
}; };
mod.addIncludePath(b.path("vendor/lightpanda"));
{ {
// html5ever // html5ever
@@ -244,196 +242,9 @@ fn addDependencies(
{ {
//curl //curl
{
const is_linux = target.result.os.tag == .linux;
if (is_linux) {
mod.addCMacro("HAVE_LINUX_TCP_H", "1");
mod.addCMacro("HAVE_MSG_NOSIGNAL", "1");
mod.addCMacro("HAVE_GETHOSTBYNAME_R", "1");
}
mod.addCMacro("_FILE_OFFSET_BITS", "64");
mod.addCMacro("BUILDING_LIBCURL", "1");
mod.addCMacro("CURL_DISABLE_AWS", "1");
mod.addCMacro("CURL_DISABLE_DICT", "1");
mod.addCMacro("CURL_DISABLE_DOH", "1");
mod.addCMacro("CURL_DISABLE_FILE", "1");
mod.addCMacro("CURL_DISABLE_FTP", "1");
mod.addCMacro("CURL_DISABLE_GOPHER", "1");
mod.addCMacro("CURL_DISABLE_KERBEROS", "1");
mod.addCMacro("CURL_DISABLE_IMAP", "1");
mod.addCMacro("CURL_DISABLE_IPFS", "1");
mod.addCMacro("CURL_DISABLE_LDAP", "1");
mod.addCMacro("CURL_DISABLE_LDAPS", "1");
mod.addCMacro("CURL_DISABLE_MQTT", "1");
mod.addCMacro("CURL_DISABLE_NTLM", "1");
mod.addCMacro("CURL_DISABLE_PROGRESS_METER", "1");
mod.addCMacro("CURL_DISABLE_POP3", "1");
mod.addCMacro("CURL_DISABLE_RTSP", "1");
mod.addCMacro("CURL_DISABLE_SMB", "1");
mod.addCMacro("CURL_DISABLE_SMTP", "1");
mod.addCMacro("CURL_DISABLE_TELNET", "1");
mod.addCMacro("CURL_DISABLE_TFTP", "1");
mod.addCMacro("CURL_EXTERN_SYMBOL", "__attribute__ ((__visibility__ (\"default\"))");
mod.addCMacro("CURL_OS", if (is_linux) "\"Linux\"" else "\"mac\"");
mod.addCMacro("CURL_STATICLIB", "1");
mod.addCMacro("ENABLE_IPV6", "1");
mod.addCMacro("HAVE_ALARM", "1");
mod.addCMacro("HAVE_ALLOCA_H", "1");
mod.addCMacro("HAVE_ARPA_INET_H", "1");
mod.addCMacro("HAVE_ARPA_TFTP_H", "1");
mod.addCMacro("HAVE_ASSERT_H", "1");
mod.addCMacro("HAVE_BASENAME", "1");
mod.addCMacro("HAVE_BOOL_T", "1");
mod.addCMacro("HAVE_BROTLI", "1");
mod.addCMacro("HAVE_BUILTIN_AVAILABLE", "1");
mod.addCMacro("HAVE_CLOCK_GETTIME_MONOTONIC", "1");
mod.addCMacro("HAVE_DLFCN_H", "1");
mod.addCMacro("HAVE_ERRNO_H", "1");
mod.addCMacro("HAVE_FCNTL", "1");
mod.addCMacro("HAVE_FCNTL_H", "1");
mod.addCMacro("HAVE_FCNTL_O_NONBLOCK", "1");
mod.addCMacro("HAVE_FREEADDRINFO", "1");
mod.addCMacro("HAVE_FSETXATTR", "1");
mod.addCMacro("HAVE_FSETXATTR_5", "1");
mod.addCMacro("HAVE_FTRUNCATE", "1");
mod.addCMacro("HAVE_GETADDRINFO", "1");
mod.addCMacro("HAVE_GETEUID", "1");
mod.addCMacro("HAVE_GETHOSTBYNAME", "1");
mod.addCMacro("HAVE_GETHOSTBYNAME_R_6", "1");
mod.addCMacro("HAVE_GETHOSTNAME", "1");
mod.addCMacro("HAVE_GETPEERNAME", "1");
mod.addCMacro("HAVE_GETPPID", "1");
mod.addCMacro("HAVE_GETPPID", "1");
mod.addCMacro("HAVE_GETPROTOBYNAME", "1");
mod.addCMacro("HAVE_GETPWUID", "1");
mod.addCMacro("HAVE_GETPWUID_R", "1");
mod.addCMacro("HAVE_GETRLIMIT", "1");
mod.addCMacro("HAVE_GETSOCKNAME", "1");
mod.addCMacro("HAVE_GETTIMEOFDAY", "1");
mod.addCMacro("HAVE_GMTIME_R", "1");
mod.addCMacro("HAVE_IDN2_H", "1");
mod.addCMacro("HAVE_IF_NAMETOINDEX", "1");
mod.addCMacro("HAVE_IFADDRS_H", "1");
mod.addCMacro("HAVE_INET_ADDR", "1");
mod.addCMacro("HAVE_INET_PTON", "1");
mod.addCMacro("HAVE_INTTYPES_H", "1");
mod.addCMacro("HAVE_IOCTL", "1");
mod.addCMacro("HAVE_IOCTL_FIONBIO", "1");
mod.addCMacro("HAVE_IOCTL_SIOCGIFADDR", "1");
mod.addCMacro("HAVE_LDAP_URL_PARSE", "1");
mod.addCMacro("HAVE_LIBGEN_H", "1");
mod.addCMacro("HAVE_LIBZ", "1");
mod.addCMacro("HAVE_LL", "1");
mod.addCMacro("HAVE_LOCALE_H", "1");
mod.addCMacro("HAVE_LOCALTIME_R", "1");
mod.addCMacro("HAVE_LONGLONG", "1");
mod.addCMacro("HAVE_MALLOC_H", "1");
mod.addCMacro("HAVE_MEMORY_H", "1");
mod.addCMacro("HAVE_NET_IF_H", "1");
mod.addCMacro("HAVE_NETDB_H", "1");
mod.addCMacro("HAVE_NETINET_IN_H", "1");
mod.addCMacro("HAVE_NETINET_TCP_H", "1");
mod.addCMacro("HAVE_PIPE", "1");
mod.addCMacro("HAVE_POLL", "1");
mod.addCMacro("HAVE_POLL_FINE", "1");
mod.addCMacro("HAVE_POLL_H", "1");
mod.addCMacro("HAVE_POSIX_STRERROR_R", "1");
mod.addCMacro("HAVE_PTHREAD_H", "1");
mod.addCMacro("HAVE_PWD_H", "1");
mod.addCMacro("HAVE_RECV", "1");
mod.addCMacro("HAVE_SA_FAMILY_T", "1");
mod.addCMacro("HAVE_SELECT", "1");
mod.addCMacro("HAVE_SEND", "1");
mod.addCMacro("HAVE_SETJMP_H", "1");
mod.addCMacro("HAVE_SETLOCALE", "1");
mod.addCMacro("HAVE_SETRLIMIT", "1");
mod.addCMacro("HAVE_SETSOCKOPT", "1");
mod.addCMacro("HAVE_SIGACTION", "1");
mod.addCMacro("HAVE_SIGINTERRUPT", "1");
mod.addCMacro("HAVE_SIGNAL", "1");
mod.addCMacro("HAVE_SIGNAL_H", "1");
mod.addCMacro("HAVE_SIGSETJMP", "1");
mod.addCMacro("HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID", "1");
mod.addCMacro("HAVE_SOCKET", "1");
mod.addCMacro("HAVE_STDBOOL_H", "1");
mod.addCMacro("HAVE_STDINT_H", "1");
mod.addCMacro("HAVE_STDIO_H", "1");
mod.addCMacro("HAVE_STDLIB_H", "1");
mod.addCMacro("HAVE_STRCASECMP", "1");
mod.addCMacro("HAVE_STRDUP", "1");
mod.addCMacro("HAVE_STRERROR_R", "1");
mod.addCMacro("HAVE_STRING_H", "1");
mod.addCMacro("HAVE_STRINGS_H", "1");
mod.addCMacro("HAVE_STRSTR", "1");
mod.addCMacro("HAVE_STRTOK_R", "1");
mod.addCMacro("HAVE_STRTOLL", "1");
mod.addCMacro("HAVE_STRUCT_SOCKADDR_STORAGE", "1");
mod.addCMacro("HAVE_STRUCT_TIMEVAL", "1");
mod.addCMacro("HAVE_SYS_IOCTL_H", "1");
mod.addCMacro("HAVE_SYS_PARAM_H", "1");
mod.addCMacro("HAVE_SYS_POLL_H", "1");
mod.addCMacro("HAVE_SYS_RESOURCE_H", "1");
mod.addCMacro("HAVE_SYS_SELECT_H", "1");
mod.addCMacro("HAVE_SYS_SOCKET_H", "1");
mod.addCMacro("HAVE_SYS_STAT_H", "1");
mod.addCMacro("HAVE_SYS_TIME_H", "1");
mod.addCMacro("HAVE_SYS_TYPES_H", "1");
mod.addCMacro("HAVE_SYS_UIO_H", "1");
mod.addCMacro("HAVE_SYS_UN_H", "1");
mod.addCMacro("HAVE_TERMIO_H", "1");
mod.addCMacro("HAVE_TERMIOS_H", "1");
mod.addCMacro("HAVE_TIME_H", "1");
mod.addCMacro("HAVE_UNAME", "1");
mod.addCMacro("HAVE_UNISTD_H", "1");
mod.addCMacro("HAVE_UTIME", "1");
mod.addCMacro("HAVE_UTIME_H", "1");
mod.addCMacro("HAVE_UTIMES", "1");
mod.addCMacro("HAVE_VARIADIC_MACROS_C99", "1");
mod.addCMacro("HAVE_VARIADIC_MACROS_GCC", "1");
mod.addCMacro("HAVE_ZLIB_H", "1");
mod.addCMacro("RANDOM_FILE", "\"/dev/urandom\"");
mod.addCMacro("RECV_TYPE_ARG1", "int");
mod.addCMacro("RECV_TYPE_ARG2", "void *");
mod.addCMacro("RECV_TYPE_ARG3", "size_t");
mod.addCMacro("RECV_TYPE_ARG4", "int");
mod.addCMacro("RECV_TYPE_RETV", "ssize_t");
mod.addCMacro("SEND_QUAL_ARG2", "const");
mod.addCMacro("SEND_TYPE_ARG1", "int");
mod.addCMacro("SEND_TYPE_ARG2", "void *");
mod.addCMacro("SEND_TYPE_ARG3", "size_t");
mod.addCMacro("SEND_TYPE_ARG4", "int");
mod.addCMacro("SEND_TYPE_RETV", "ssize_t");
mod.addCMacro("SIZEOF_CURL_OFF_T", "8");
mod.addCMacro("SIZEOF_INT", "4");
mod.addCMacro("SIZEOF_LONG", "8");
mod.addCMacro("SIZEOF_OFF_T", "8");
mod.addCMacro("SIZEOF_SHORT", "2");
mod.addCMacro("SIZEOF_SIZE_T", "8");
mod.addCMacro("SIZEOF_TIME_T", "8");
mod.addCMacro("STDC_HEADERS", "1");
mod.addCMacro("TIME_WITH_SYS_TIME", "1");
mod.addCMacro("USE_NGHTTP2", "1");
mod.addCMacro("USE_OPENSSL", "1");
mod.addCMacro("OPENSSL_IS_BORINGSSL", "1");
mod.addCMacro("USE_THREADS_POSIX", "1");
mod.addCMacro("USE_UNIX_SOCKETS", "1");
}
try buildZlib(b, mod); try buildZlib(b, mod);
try buildBrotli(b, mod); try buildBrotli(b, mod);
const boringssl_dep = b.dependency("boringssl-zig", .{ try buildBoringSsl(b, mod);
.target = target,
.optimize = mod.optimize.?,
.force_pic = true,
});
const ssl = boringssl_dep.artifact("ssl");
ssl.bundle_ubsan_rt = false;
const crypto = boringssl_dep.artifact("crypto");
crypto.bundle_ubsan_rt = false;
mod.linkLibrary(ssl);
mod.linkLibrary(crypto);
try buildNghttp2(b, mod); try buildNghttp2(b, mod);
try buildCurl(b, mod); try buildCurl(b, mod);
@@ -450,280 +261,362 @@ fn addDependencies(
} }
fn buildZlib(b: *Build, m: *Build.Module) !void { fn buildZlib(b: *Build, m: *Build.Module) !void {
const zlib = b.addLibrary(.{ const dep = b.dependency("zlib", .{});
.name = "zlib",
.root_module = m,
});
const root = "vendor/zlib/"; const lib = b.addLibrary(.{ .name = "z", .root_module = m });
zlib.installHeader(b.path(root ++ "zlib.h"), "zlib.h");
zlib.installHeader(b.path(root ++ "zconf.h"), "zconf.h"); lib.installHeadersDirectory(dep.path(""), "", .{});
zlib.addCSourceFiles(.{ .flags = &.{ lib.addCSourceFiles(.{
"-DHAVE_SYS_TYPES_H", .root = dep.path(""),
"-DHAVE_STDINT_H", .flags = &.{
"-DHAVE_STDDEF_H", "-DHAVE_SYS_TYPES_H",
}, .files = &.{ "-DHAVE_STDINT_H",
root ++ "adler32.c", "-DHAVE_STDDEF_H",
root ++ "compress.c", },
root ++ "crc32.c", .files = &.{
root ++ "deflate.c", "adler32.c", "compress.c", "crc32.c",
root ++ "gzclose.c", "deflate.c", "gzclose.c", "gzlib.c",
root ++ "gzlib.c", "gzread.c", "gzwrite.c", "infback.c",
root ++ "gzread.c", "inffast.c", "inflate.c", "inftrees.c",
root ++ "gzwrite.c", "trees.c", "uncompr.c", "zutil.c",
root ++ "inflate.c", },
root ++ "infback.c", });
root ++ "inftrees.c",
root ++ "inffast.c",
root ++ "trees.c",
root ++ "uncompr.c",
root ++ "zutil.c",
} });
} }
fn buildBrotli(b: *Build, m: *Build.Module) !void { fn buildBrotli(b: *Build, m: *Build.Module) !void {
const brotli = b.addLibrary(.{ const dep = b.dependency("brotli", .{});
.name = "brotli",
.root_module = m, const brotlicmn = b.addLibrary(.{ .name = "brotlicommon", .root_module = m });
const brotlidec = b.addLibrary(.{ .name = "brotlidec", .root_module = m });
const brotlienc = b.addLibrary(.{ .name = "brotlienc", .root_module = m });
brotlicmn.addIncludePath(dep.path("c/include"));
brotlicmn.addIncludePath(dep.path("c/include"));
brotlidec.addIncludePath(dep.path("c/include"));
brotlienc.addIncludePath(dep.path("c/include"));
brotlicmn.addCSourceFiles(.{
.root = dep.path("c/common"),
.files = &.{
"transform.c", "shared_dictionary.c", "platform.c",
"dictionary.c", "context.c", "constants.c",
},
});
brotlidec.addCSourceFiles(.{
.root = dep.path("c/dec"),
.files = &.{
"bit_reader.c", "decode.c", "huffman.c",
"prefix.c", "state.c", "static_init.c",
},
});
brotlienc.addCSourceFiles(.{
.root = dep.path("c/enc"),
.files = &.{
"backward_references.c", "backward_references_hq.c", "bit_cost.c",
"block_splitter.c", "brotli_bit_stream.c", "cluster.c",
"command.c", "compound_dictionary.c", "compress_fragment.c",
"compress_fragment_two_pass.c", "dictionary_hash.c", "encode.c",
"encoder_dict.c", "entropy_encode.c", "fast_log.c",
"histogram.c", "literal_cost.c", "memory.c",
"metablock.c", "static_dict.c", "static_dict_lut.c",
"static_init.c", "utf8_util.c",
},
});
}
fn buildBoringSsl(b: *Build, m: *Build.Module) !void {
const boringssl_dep = b.dependency("boringssl-zig", .{
.force_pic = true,
.optimize = m.optimize.?,
}); });
const root = "vendor/brotli/c/"; const ssl = boringssl_dep.artifact("ssl");
brotli.addIncludePath(b.path(root ++ "include")); ssl.bundle_ubsan_rt = false;
brotli.addCSourceFiles(.{ .flags = &.{}, .files = &.{
root ++ "common/constants.c", const crypto = boringssl_dep.artifact("crypto");
root ++ "common/context.c", crypto.bundle_ubsan_rt = false;
root ++ "common/dictionary.c",
root ++ "common/platform.c", m.linkLibrary(ssl);
root ++ "common/shared_dictionary.c", m.linkLibrary(crypto);
root ++ "common/transform.c",
root ++ "dec/bit_reader.c",
root ++ "dec/decode.c",
root ++ "dec/huffman.c",
root ++ "dec/prefix.c",
root ++ "dec/state.c",
root ++ "dec/static_init.c",
} });
} }
fn buildNghttp2(b: *Build, m: *Build.Module) !void { fn buildNghttp2(b: *Build, m: *Build.Module) !void {
const nghttp2 = b.addLibrary(.{ const dep = b.dependency("nghttp2", .{});
.name = "nghttp2", const lib = b.addLibrary(.{ .name = "nghttp2", .root_module = m });
.root_module = m,
});
const root = "vendor/nghttp2/"; const config = b.addConfigHeader(.{
nghttp2.addIncludePath(b.path(root ++ "lib")); .include_path = "nghttp2ver.h",
nghttp2.addIncludePath(b.path(root ++ "lib/includes")); .style = .{ .cmake = dep.path("lib/includes/nghttp2/nghttp2ver.h.in") },
nghttp2.addCSourceFiles(.{ .flags = &.{ }, .{
"-DNGHTTP2_STATICLIB", .PACKAGE_VERSION = "1.68.90",
"-DHAVE_NETINET_IN", .PACKAGE_VERSION_NUM = 0x016890,
"-DHAVE_TIME_H", });
}, .files = &.{ lib.addConfigHeader(config);
root ++ "lib/sfparse.c",
root ++ "lib/nghttp2_alpn.c", lib.addIncludePath(dep.path("lib/includes"));
root ++ "lib/nghttp2_buf.c", lib.addCSourceFiles(.{
root ++ "lib/nghttp2_callbacks.c", .root = dep.path("lib"),
root ++ "lib/nghttp2_debug.c", .flags = &.{
root ++ "lib/nghttp2_extpri.c", "-DNGHTTP2_STATICLIB",
root ++ "lib/nghttp2_frame.c", "-DHAVE_NETINET_IN",
root ++ "lib/nghttp2_hd.c", "-DHAVE_TIME_H",
root ++ "lib/nghttp2_hd_huffman.c", },
root ++ "lib/nghttp2_hd_huffman_data.c", .files = &.{
root ++ "lib/nghttp2_helper.c", "sfparse.c", "nghttp2_alpn.c", "nghttp2_buf.c",
root ++ "lib/nghttp2_http.c", "nghttp2_callbacks.c", "nghttp2_debug.c", "nghttp2_extpri.c",
root ++ "lib/nghttp2_map.c", "nghttp2_frame.c", "nghttp2_hd.c", "nghttp2_hd_huffman.c",
root ++ "lib/nghttp2_mem.c", "nghttp2_hd_huffman_data.c", "nghttp2_helper.c", "nghttp2_http.c",
root ++ "lib/nghttp2_option.c", "nghttp2_map.c", "nghttp2_mem.c", "nghttp2_option.c",
root ++ "lib/nghttp2_outbound_item.c", "nghttp2_outbound_item.c", "nghttp2_pq.c", "nghttp2_priority_spec.c",
root ++ "lib/nghttp2_pq.c", "nghttp2_queue.c", "nghttp2_rcbuf.c", "nghttp2_session.c",
root ++ "lib/nghttp2_priority_spec.c", "nghttp2_stream.c", "nghttp2_submit.c", "nghttp2_version.c",
root ++ "lib/nghttp2_queue.c", "nghttp2_ratelim.c", "nghttp2_time.c",
root ++ "lib/nghttp2_rcbuf.c", },
root ++ "lib/nghttp2_session.c", });
root ++ "lib/nghttp2_stream.c",
root ++ "lib/nghttp2_submit.c",
root ++ "lib/nghttp2_version.c",
root ++ "lib/nghttp2_ratelim.c",
root ++ "lib/nghttp2_time.c",
} });
} }
fn buildCurl(b: *Build, m: *Build.Module) !void { fn buildCurl(b: *Build, m: *Build.Module) !void {
const curl = b.addLibrary(.{ const target = m.resolved_target.?;
.name = "curl",
.root_module = m,
});
const root = "vendor/curl/"; const dep = b.dependency("curl", .{});
const curl = b.addLibrary(.{ .name = "curl", .root_module = m });
curl.addIncludePath(b.path(root ++ "lib")); curl.addIncludePath(dep.path("lib"));
curl.addIncludePath(b.path(root ++ "include")); curl.addIncludePath(dep.path("include"));
curl.addIncludePath(b.path("vendor/zlib"));
const is_linux = target.result.os.tag == .linux;
if (is_linux) {
m.addCMacro("HAVE_LINUX_TCP_H", "1");
m.addCMacro("HAVE_MSG_NOSIGNAL", "1");
m.addCMacro("HAVE_GETHOSTBYNAME_R", "1");
}
m.addCMacro("_FILE_OFFSET_BITS", "64");
m.addCMacro("BUILDING_LIBCURL", "1");
m.addCMacro("CURL_DISABLE_AWS", "1");
m.addCMacro("CURL_DISABLE_DICT", "1");
m.addCMacro("CURL_DISABLE_DOH", "1");
m.addCMacro("CURL_DISABLE_FILE", "1");
m.addCMacro("CURL_DISABLE_FTP", "1");
m.addCMacro("CURL_DISABLE_GOPHER", "1");
m.addCMacro("CURL_DISABLE_KERBEROS", "1");
m.addCMacro("CURL_DISABLE_IMAP", "1");
m.addCMacro("CURL_DISABLE_IPFS", "1");
m.addCMacro("CURL_DISABLE_LDAP", "1");
m.addCMacro("CURL_DISABLE_LDAPS", "1");
m.addCMacro("CURL_DISABLE_MQTT", "1");
m.addCMacro("CURL_DISABLE_NTLM", "1");
m.addCMacro("CURL_DISABLE_PROGRESS_METER", "1");
m.addCMacro("CURL_DISABLE_POP3", "1");
m.addCMacro("CURL_DISABLE_RTSP", "1");
m.addCMacro("CURL_DISABLE_SMB", "1");
m.addCMacro("CURL_DISABLE_SMTP", "1");
m.addCMacro("CURL_DISABLE_TELNET", "1");
m.addCMacro("CURL_DISABLE_TFTP", "1");
m.addCMacro("CURL_EXTERN_SYMBOL", "__attribute__ ((__visibility__ (\"default\"))");
m.addCMacro("CURL_OS", if (is_linux) "\"Linux\"" else "\"mac\"");
m.addCMacro("CURL_STATICLIB", "1");
m.addCMacro("ENABLE_IPV6", "1");
m.addCMacro("HAVE_ALARM", "1");
m.addCMacro("HAVE_ALLOCA_H", "1");
m.addCMacro("HAVE_ARPA_INET_H", "1");
m.addCMacro("HAVE_ARPA_TFTP_H", "1");
m.addCMacro("HAVE_ASSERT_H", "1");
m.addCMacro("HAVE_BASENAME", "1");
m.addCMacro("HAVE_BOOL_T", "1");
m.addCMacro("HAVE_BROTLI", "1");
m.addCMacro("HAVE_BUILTIN_AVAILABLE", "1");
m.addCMacro("HAVE_CLOCK_GETTIME_MONOTONIC", "1");
m.addCMacro("HAVE_DLFCN_H", "1");
m.addCMacro("HAVE_ERRNO_H", "1");
m.addCMacro("HAVE_FCNTL", "1");
m.addCMacro("HAVE_FCNTL_H", "1");
m.addCMacro("HAVE_FCNTL_O_NONBLOCK", "1");
m.addCMacro("HAVE_FREEADDRINFO", "1");
m.addCMacro("HAVE_FSETXATTR", "1");
m.addCMacro("HAVE_FSETXATTR_5", "1");
m.addCMacro("HAVE_FTRUNCATE", "1");
m.addCMacro("HAVE_GETADDRINFO", "1");
m.addCMacro("HAVE_GETEUID", "1");
m.addCMacro("HAVE_GETHOSTBYNAME", "1");
m.addCMacro("HAVE_GETHOSTBYNAME_R_6", "1");
m.addCMacro("HAVE_GETHOSTNAME", "1");
m.addCMacro("HAVE_GETPEERNAME", "1");
m.addCMacro("HAVE_GETPPID", "1");
m.addCMacro("HAVE_GETPPID", "1");
m.addCMacro("HAVE_GETPROTOBYNAME", "1");
m.addCMacro("HAVE_GETPWUID", "1");
m.addCMacro("HAVE_GETPWUID_R", "1");
m.addCMacro("HAVE_GETRLIMIT", "1");
m.addCMacro("HAVE_GETSOCKNAME", "1");
m.addCMacro("HAVE_GETTIMEOFDAY", "1");
m.addCMacro("HAVE_GMTIME_R", "1");
m.addCMacro("HAVE_IDN2_H", "1");
m.addCMacro("HAVE_IF_NAMETOINDEX", "1");
m.addCMacro("HAVE_IFADDRS_H", "1");
m.addCMacro("HAVE_INET_ADDR", "1");
m.addCMacro("HAVE_INET_PTON", "1");
m.addCMacro("HAVE_INTTYPES_H", "1");
m.addCMacro("HAVE_IOCTL", "1");
m.addCMacro("HAVE_IOCTL_FIONBIO", "1");
m.addCMacro("HAVE_IOCTL_SIOCGIFADDR", "1");
m.addCMacro("HAVE_LDAP_URL_PARSE", "1");
m.addCMacro("HAVE_LIBGEN_H", "1");
m.addCMacro("HAVE_LIBZ", "1");
m.addCMacro("HAVE_LL", "1");
m.addCMacro("HAVE_LOCALE_H", "1");
m.addCMacro("HAVE_LOCALTIME_R", "1");
m.addCMacro("HAVE_LONGLONG", "1");
m.addCMacro("HAVE_MALLOC_H", "1");
m.addCMacro("HAVE_MEMORY_H", "1");
m.addCMacro("HAVE_NET_IF_H", "1");
m.addCMacro("HAVE_NETDB_H", "1");
m.addCMacro("HAVE_NETINET_IN_H", "1");
m.addCMacro("HAVE_NETINET_TCP_H", "1");
m.addCMacro("HAVE_PIPE", "1");
m.addCMacro("HAVE_POLL", "1");
m.addCMacro("HAVE_POLL_FINE", "1");
m.addCMacro("HAVE_POLL_H", "1");
m.addCMacro("HAVE_POSIX_STRERROR_R", "1");
m.addCMacro("HAVE_PTHREAD_H", "1");
m.addCMacro("HAVE_PWD_H", "1");
m.addCMacro("HAVE_RECV", "1");
m.addCMacro("HAVE_SA_FAMILY_T", "1");
m.addCMacro("HAVE_SELECT", "1");
m.addCMacro("HAVE_SEND", "1");
m.addCMacro("HAVE_SETJMP_H", "1");
m.addCMacro("HAVE_SETLOCALE", "1");
m.addCMacro("HAVE_SETRLIMIT", "1");
m.addCMacro("HAVE_SETSOCKOPT", "1");
m.addCMacro("HAVE_SIGACTION", "1");
m.addCMacro("HAVE_SIGINTERRUPT", "1");
m.addCMacro("HAVE_SIGNAL", "1");
m.addCMacro("HAVE_SIGNAL_H", "1");
m.addCMacro("HAVE_SIGSETJMP", "1");
m.addCMacro("HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID", "1");
m.addCMacro("HAVE_SOCKET", "1");
m.addCMacro("HAVE_STDBOOL_H", "1");
m.addCMacro("HAVE_STDINT_H", "1");
m.addCMacro("HAVE_STDIO_H", "1");
m.addCMacro("HAVE_STDLIB_H", "1");
m.addCMacro("HAVE_STRCASECMP", "1");
m.addCMacro("HAVE_STRDUP", "1");
m.addCMacro("HAVE_STRERROR_R", "1");
m.addCMacro("HAVE_STRING_H", "1");
m.addCMacro("HAVE_STRINGS_H", "1");
m.addCMacro("HAVE_STRSTR", "1");
m.addCMacro("HAVE_STRTOK_R", "1");
m.addCMacro("HAVE_STRTOLL", "1");
m.addCMacro("HAVE_STRUCT_SOCKADDR_STORAGE", "1");
m.addCMacro("HAVE_STRUCT_TIMEVAL", "1");
m.addCMacro("HAVE_SYS_IOCTL_H", "1");
m.addCMacro("HAVE_SYS_PARAM_H", "1");
m.addCMacro("HAVE_SYS_POLL_H", "1");
m.addCMacro("HAVE_SYS_RESOURCE_H", "1");
m.addCMacro("HAVE_SYS_SELECT_H", "1");
m.addCMacro("HAVE_SYS_SOCKET_H", "1");
m.addCMacro("HAVE_SYS_STAT_H", "1");
m.addCMacro("HAVE_SYS_TIME_H", "1");
m.addCMacro("HAVE_SYS_TYPES_H", "1");
m.addCMacro("HAVE_SYS_UIO_H", "1");
m.addCMacro("HAVE_SYS_UN_H", "1");
m.addCMacro("HAVE_TERMIO_H", "1");
m.addCMacro("HAVE_TERMIOS_H", "1");
m.addCMacro("HAVE_TIME_H", "1");
m.addCMacro("HAVE_UNAME", "1");
m.addCMacro("HAVE_UNISTD_H", "1");
m.addCMacro("HAVE_UTIME", "1");
m.addCMacro("HAVE_UTIME_H", "1");
m.addCMacro("HAVE_UTIMES", "1");
m.addCMacro("HAVE_VARIADIC_MACROS_C99", "1");
m.addCMacro("HAVE_VARIADIC_MACROS_GCC", "1");
m.addCMacro("HAVE_ZLIB_H", "1");
m.addCMacro("RANDOM_FILE", "\"/dev/urandom\"");
m.addCMacro("RECV_TYPE_ARG1", "int");
m.addCMacro("RECV_TYPE_ARG2", "void *");
m.addCMacro("RECV_TYPE_ARG3", "size_t");
m.addCMacro("RECV_TYPE_ARG4", "int");
m.addCMacro("RECV_TYPE_RETV", "ssize_t");
m.addCMacro("SEND_QUAL_ARG2", "const");
m.addCMacro("SEND_TYPE_ARG1", "int");
m.addCMacro("SEND_TYPE_ARG2", "void *");
m.addCMacro("SEND_TYPE_ARG3", "size_t");
m.addCMacro("SEND_TYPE_ARG4", "int");
m.addCMacro("SEND_TYPE_RETV", "ssize_t");
m.addCMacro("SIZEOF_CURL_OFF_T", "8");
m.addCMacro("SIZEOF_INT", "4");
m.addCMacro("SIZEOF_LONG", "8");
m.addCMacro("SIZEOF_OFF_T", "8");
m.addCMacro("SIZEOF_SHORT", "2");
m.addCMacro("SIZEOF_SIZE_T", "8");
m.addCMacro("SIZEOF_TIME_T", "8");
m.addCMacro("STDC_HEADERS", "1");
m.addCMacro("TIME_WITH_SYS_TIME", "1");
m.addCMacro("USE_NGHTTP2", "1");
m.addCMacro("USE_OPENSSL", "1");
m.addCMacro("OPENSSL_IS_BORINGSSL", "1");
m.addCMacro("USE_THREADS_POSIX", "1");
m.addCMacro("USE_UNIX_SOCKETS", "1");
curl.addCSourceFiles(.{ curl.addCSourceFiles(.{
.root = dep.path("lib"),
.flags = &.{}, .flags = &.{},
.files = &.{ .files = &.{
root ++ "lib/altsvc.c", // You can include all files from lib, libcurl uses an #ifdef-guards to exclude code for disabled functions
root ++ "lib/amigaos.c", "altsvc.c", "amigaos.c", "asyn-ares.c",
root ++ "lib/asyn-ares.c", "asyn-base.c", "asyn-thrdd.c", "bufq.c",
root ++ "lib/asyn-base.c", "bufref.c", "cf-h1-proxy.c", "cf-h2-proxy.c",
root ++ "lib/asyn-thrdd.c", "cf-haproxy.c", "cf-https-connect.c", "cf-socket.c",
root ++ "lib/bufq.c", "cfilters.c", "conncache.c", "connect.c",
root ++ "lib/bufref.c", "content_encoding.c", "cookie.c", "cshutdn.c",
root ++ "lib/cf-h1-proxy.c", "curl_addrinfo.c", "curl_des.c", "curl_endian.c",
root ++ "lib/cf-h2-proxy.c", "curl_fnmatch.c", "curl_get_line.c", "curl_gethostname.c",
root ++ "lib/cf-haproxy.c", "curl_gssapi.c", "curl_memrchr.c", "curl_ntlm_core.c",
root ++ "lib/cf-https-connect.c", "curl_range.c", "curl_rtmp.c", "curl_sasl.c",
root ++ "lib/cf-socket.c", "curl_sha512_256.c", "curl_sspi.c", "curl_threads.c",
root ++ "lib/cfilters.c", "curl_trc.c", "curlx/base64.c", "curlx/dynbuf.c",
root ++ "lib/conncache.c", "curlx/inet_ntop.c", "curlx/nonblock.c", "curlx/strparse.c",
root ++ "lib/connect.c", "curlx/timediff.c", "curlx/timeval.c", "curlx/wait.c",
root ++ "lib/content_encoding.c", "curlx/warnless.c", "cw-out.c", "cw-pause.c",
root ++ "lib/cookie.c", "dict.c", "doh.c", "dynhds.c",
root ++ "lib/cshutdn.c", "easy.c", "easygetopt.c", "easyoptions.c",
root ++ "lib/curl_addrinfo.c", "escape.c", "fake_addrinfo.c", "file.c",
root ++ "lib/curl_des.c", "fileinfo.c", "fopen.c", "formdata.c",
root ++ "lib/curl_endian.c", "ftp.c", "ftplistparser.c", "getenv.c",
root ++ "lib/curl_fnmatch.c", "getinfo.c", "gopher.c", "hash.c",
root ++ "lib/curl_get_line.c", "headers.c", "hmac.c", "hostip.c",
root ++ "lib/curl_gethostname.c", "hostip4.c", "hostip6.c", "hsts.c",
root ++ "lib/curl_gssapi.c", "http.c", "http1.c", "http2.c",
root ++ "lib/curl_memrchr.c", "http_aws_sigv4.c", "http_chunks.c", "http_digest.c",
root ++ "lib/curl_ntlm_core.c", "http_negotiate.c", "http_ntlm.c", "http_proxy.c",
root ++ "lib/curl_range.c", "httpsrr.c", "idn.c", "if2ip.c",
root ++ "lib/curl_rtmp.c", "imap.c", "krb5.c", "ldap.c",
root ++ "lib/curl_sasl.c", "llist.c", "macos.c", "md4.c",
root ++ "lib/curl_sha512_256.c", "md5.c", "memdebug.c", "mime.c",
root ++ "lib/curl_sspi.c", "mprintf.c", "mqtt.c", "multi.c",
root ++ "lib/curl_threads.c", "multi_ev.c", "netrc.c", "noproxy.c",
root ++ "lib/curl_trc.c", "openldap.c", "parsedate.c", "pingpong.c",
root ++ "lib/cw-out.c", "pop3.c", "progress.c", "psl.c",
root ++ "lib/cw-pause.c", "rand.c", "rename.c", "request.c",
root ++ "lib/dict.c", "rtsp.c", "select.c", "sendf.c",
root ++ "lib/doh.c", "setopt.c", "sha256.c", "share.c",
root ++ "lib/dynhds.c", "slist.c", "smb.c", "smtp.c",
root ++ "lib/easy.c", "socketpair.c", "socks.c", "socks_gssapi.c",
root ++ "lib/easygetopt.c", "socks_sspi.c", "speedcheck.c", "splay.c",
root ++ "lib/easyoptions.c", "strcase.c", "strdup.c", "strequal.c",
root ++ "lib/escape.c", "strerror.c", "system_win32.c", "telnet.c",
root ++ "lib/fake_addrinfo.c", "tftp.c", "transfer.c", "uint-bset.c",
root ++ "lib/file.c", "uint-hash.c", "uint-spbset.c", "uint-table.c",
root ++ "lib/fileinfo.c", "url.c", "urlapi.c", "vauth/cleartext.c",
root ++ "lib/fopen.c", "vauth/cram.c", "vauth/digest.c", "vauth/digest_sspi.c",
root ++ "lib/formdata.c", "vauth/gsasl.c", "vauth/krb5_gssapi.c", "vauth/krb5_sspi.c",
root ++ "lib/ftp.c", "vauth/ntlm.c", "vauth/ntlm_sspi.c", "vauth/oauth2.c",
root ++ "lib/ftplistparser.c", "vauth/spnego_gssapi.c", "vauth/spnego_sspi.c", "vauth/vauth.c",
root ++ "lib/getenv.c", "version.c", "vquic/curl_ngtcp2.c", "vquic/curl_osslq.c",
root ++ "lib/getinfo.c", "vquic/curl_quiche.c", "vquic/vquic-tls.c", "vquic/vquic.c",
root ++ "lib/gopher.c", "vtls/cipher_suite.c", "vtls/hostcheck.c", "vtls/keylog.c",
root ++ "lib/hash.c", "vtls/openssl.c", "vtls/vtls.c", "vtls/vtls_scache.c",
root ++ "lib/headers.c", "vtls/x509asn1.c", "ws.c",
root ++ "lib/hmac.c",
root ++ "lib/hostip.c",
root ++ "lib/hostip4.c",
root ++ "lib/hostip6.c",
root ++ "lib/hsts.c",
root ++ "lib/http.c",
root ++ "lib/http1.c",
root ++ "lib/http2.c",
root ++ "lib/http_aws_sigv4.c",
root ++ "lib/http_chunks.c",
root ++ "lib/http_digest.c",
root ++ "lib/http_negotiate.c",
root ++ "lib/http_ntlm.c",
root ++ "lib/http_proxy.c",
root ++ "lib/httpsrr.c",
root ++ "lib/idn.c",
root ++ "lib/if2ip.c",
root ++ "lib/imap.c",
root ++ "lib/krb5.c",
root ++ "lib/ldap.c",
root ++ "lib/llist.c",
root ++ "lib/macos.c",
root ++ "lib/md4.c",
root ++ "lib/md5.c",
root ++ "lib/memdebug.c",
root ++ "lib/mime.c",
root ++ "lib/mprintf.c",
root ++ "lib/mqtt.c",
root ++ "lib/multi.c",
root ++ "lib/multi_ev.c",
root ++ "lib/netrc.c",
root ++ "lib/noproxy.c",
root ++ "lib/openldap.c",
root ++ "lib/parsedate.c",
root ++ "lib/pingpong.c",
root ++ "lib/pop3.c",
root ++ "lib/progress.c",
root ++ "lib/psl.c",
root ++ "lib/rand.c",
root ++ "lib/rename.c",
root ++ "lib/request.c",
root ++ "lib/rtsp.c",
root ++ "lib/select.c",
root ++ "lib/sendf.c",
root ++ "lib/setopt.c",
root ++ "lib/sha256.c",
root ++ "lib/share.c",
root ++ "lib/slist.c",
root ++ "lib/smb.c",
root ++ "lib/smtp.c",
root ++ "lib/socketpair.c",
root ++ "lib/socks.c",
root ++ "lib/socks_gssapi.c",
root ++ "lib/socks_sspi.c",
root ++ "lib/speedcheck.c",
root ++ "lib/splay.c",
root ++ "lib/strcase.c",
root ++ "lib/strdup.c",
root ++ "lib/strequal.c",
root ++ "lib/strerror.c",
root ++ "lib/system_win32.c",
root ++ "lib/telnet.c",
root ++ "lib/tftp.c",
root ++ "lib/transfer.c",
root ++ "lib/uint-bset.c",
root ++ "lib/uint-hash.c",
root ++ "lib/uint-spbset.c",
root ++ "lib/uint-table.c",
root ++ "lib/url.c",
root ++ "lib/urlapi.c",
root ++ "lib/version.c",
root ++ "lib/ws.c",
root ++ "lib/curlx/base64.c",
root ++ "lib/curlx/dynbuf.c",
root ++ "lib/curlx/inet_ntop.c",
root ++ "lib/curlx/nonblock.c",
root ++ "lib/curlx/strparse.c",
root ++ "lib/curlx/timediff.c",
root ++ "lib/curlx/timeval.c",
root ++ "lib/curlx/wait.c",
root ++ "lib/curlx/warnless.c",
root ++ "lib/vquic/curl_ngtcp2.c",
root ++ "lib/vquic/curl_osslq.c",
root ++ "lib/vquic/curl_quiche.c",
root ++ "lib/vquic/vquic.c",
root ++ "lib/vquic/vquic-tls.c",
root ++ "lib/vauth/cleartext.c",
root ++ "lib/vauth/cram.c",
root ++ "lib/vauth/digest.c",
root ++ "lib/vauth/digest_sspi.c",
root ++ "lib/vauth/gsasl.c",
root ++ "lib/vauth/krb5_gssapi.c",
root ++ "lib/vauth/krb5_sspi.c",
root ++ "lib/vauth/ntlm.c",
root ++ "lib/vauth/ntlm_sspi.c",
root ++ "lib/vauth/oauth2.c",
root ++ "lib/vauth/spnego_gssapi.c",
root ++ "lib/vauth/spnego_sspi.c",
root ++ "lib/vauth/vauth.c",
root ++ "lib/vtls/cipher_suite.c",
root ++ "lib/vtls/openssl.c",
root ++ "lib/vtls/hostcheck.c",
root ++ "lib/vtls/keylog.c",
root ++ "lib/vtls/vtls.c",
root ++ "lib/vtls/vtls_scache.c",
root ++ "lib/vtls/x509asn1.c",
}, },
}); });
} }

View File

@@ -1,6 +1,5 @@
.{ .{
.name = .browser, .name = .browser,
.paths = .{""},
.version = "0.0.0", .version = "0.0.0",
.fingerprint = 0xda130f3af836cea0, // Changing this has security and trust implications. .fingerprint = 0xda130f3af836cea0, // Changing this has security and trust implications.
.minimum_zig_version = "0.15.2", .minimum_zig_version = "0.15.2",
@@ -10,9 +9,27 @@
.hash = "v8-0.0.0-xddH69R6BADRXsnhjA8wNnfKfLQACF1I7CSTZvsMAvp8", .hash = "v8-0.0.0-xddH69R6BADRXsnhjA8wNnfKfLQACF1I7CSTZvsMAvp8",
}, },
//.v8 = .{ .path = "../zig-v8-fork" }, //.v8 = .{ .path = "../zig-v8-fork" },
.brotli = .{
// v1.2.0
.url = "https://github.com/google/brotli/archive/028fb5a23661f123017c060daa546b55cf4bde29.tar.gz",
.hash = "N-V-__8AAJudKgCQCuIiH6MJjAiIJHfg_tT_Ew-0vZwVkCo_",
},
.zlib = .{
.url = "https://github.com/madler/zlib/releases/download/v1.3.2/zlib-1.3.2.tar.gz",
.hash = "N-V-__8AAJ2cNgAgfBtAw33Bxfu1IWISDeKKSr3DAqoAysIJ",
},
.nghttp2 = .{
.url = "https://github.com/nghttp2/nghttp2/releases/download/v1.68.0/nghttp2-1.68.0.tar.gz",
.hash = "N-V-__8AAL15vQCI63ZL6Zaz5hJg6JTEgYXGbLnMFSnf7FT3",
},
.@"boringssl-zig" = .{ .@"boringssl-zig" = .{
.url = "git+https://github.com/Syndica/boringssl-zig.git#c53df00d06b02b755ad88bbf4d1202ed9687b096", .url = "git+https://github.com/Syndica/boringssl-zig.git#c53df00d06b02b755ad88bbf4d1202ed9687b096",
.hash = "boringssl-0.1.0-VtJeWehMAAA4RNnwRnzEvKcS9rjsR1QVRw1uJrwXxmVK", .hash = "boringssl-0.1.0-VtJeWehMAAA4RNnwRnzEvKcS9rjsR1QVRw1uJrwXxmVK",
}, },
.curl = .{
.url = "https://curl.se/download/curl-8.15.0.tar.gz",
.hash = "N-V-__8AAHGgPwH1XE5mB7bNofrDyBE5VWADWmBRlFQaVXWU",
},
}, },
.paths = .{""},
} }

1
vendor/brotli vendored

Submodule vendor/brotli deleted from f1c80224e8

1
vendor/curl vendored

Submodule vendor/curl deleted from 6845533e24

View File

@@ -1,5 +0,0 @@
#ifndef NGHTTP2VER_H
#define NGHTTP2VER_H
#define NGHTTP2_VERSION "1.66"
#define NGHTTP2_VERSION_NUM 0x014300
#endif /* NGHTTP2VER_H */

1
vendor/nghttp2 vendored

Submodule vendor/nghttp2 deleted from ac22e0efe3

1
vendor/zlib vendored

Submodule vendor/zlib deleted from 51b7f2abda