build: fix for zig-0.14 dev
Some checks failed
CI / build (macos-latest, 0.13.0) (push) Has been cancelled
CI / build (true, ubuntu-latest, master) (push) Has been cancelled
CI / build (ubuntu-latest, 0.12.1) (push) Has been cancelled
CI / build (ubuntu-latest, 0.13.0) (push) Has been cancelled
CI / build (windows-latest, 0.13.0) (push) Has been cancelled
Some checks failed
CI / build (macos-latest, 0.13.0) (push) Has been cancelled
CI / build (true, ubuntu-latest, master) (push) Has been cancelled
CI / build (ubuntu-latest, 0.12.1) (push) Has been cancelled
CI / build (ubuntu-latest, 0.13.0) (push) Has been cancelled
CI / build (windows-latest, 0.13.0) (push) Has been cancelled
`defineCMacro` was removed. Dependencies had to be updated for this as well.
This commit is contained in:
parent
be5a084d6e
commit
6555477c31
20
build.zig
20
build.zig
@ -49,7 +49,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
const tinfo = target.result;
|
const tinfo = target.result;
|
||||||
switch (tinfo.os.tag) {
|
switch (tinfo.os.tag) {
|
||||||
.windows => {
|
.windows => {
|
||||||
lib.defineCMacro("_WIN32", null);
|
lib.root_module.addCMacro("_WIN32", "");
|
||||||
lib.addCSourceFiles(.{
|
lib.addCSourceFiles(.{
|
||||||
.root = src_root,
|
.root = src_root,
|
||||||
.files = win_sources,
|
.files = win_sources,
|
||||||
@ -58,15 +58,15 @@ pub fn build(b: *std.Build) void {
|
|||||||
lib.linkSystemLibrary("ws2_32");
|
lib.linkSystemLibrary("ws2_32");
|
||||||
},
|
},
|
||||||
else => if (tinfo.isDarwin()) {
|
else => if (tinfo.isDarwin()) {
|
||||||
lib.defineCMacro("DARWIN", null);
|
lib.root_module.addCMacro("DARWIN", "");
|
||||||
lib.addCSourceFiles(.{
|
lib.addCSourceFiles(.{
|
||||||
.root = src_root,
|
.root = src_root,
|
||||||
.files = unix_sources,
|
.files = unix_sources,
|
||||||
.flags = cflags,
|
.flags = cflags,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
lib.defineCMacro("_GNU_SOURCE", null);
|
lib.root_module.addCMacro("_GNU_SOURCE", "");
|
||||||
lib.defineCMacro("LINUX", null);
|
lib.root_module.addCMacro("LINUX", "");
|
||||||
lib.addCSourceFiles(.{
|
lib.addCSourceFiles(.{
|
||||||
.root = src_root,
|
.root = src_root,
|
||||||
.files = unix_sources,
|
.files = unix_sources,
|
||||||
@ -80,7 +80,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
lib.defineCMacro("_REENTRANT", null);
|
lib.root_module.addCMacro("_REENTRANT", "");
|
||||||
|
|
||||||
for (install_headers) |header| {
|
for (install_headers) |header| {
|
||||||
lib.installHeader(
|
lib.installHeader(
|
||||||
@ -90,17 +90,17 @@ pub fn build(b: *std.Build) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tls_dep) |dep| {
|
if (tls_dep) |dep| {
|
||||||
lib.defineCMacro("NATS_HAS_TLS", null);
|
lib.root_module.addCMacro("NATS_HAS_TLS", "");
|
||||||
lib.defineCMacro("NATS_USE_OPENSSL_1_1", null);
|
lib.root_module.addCMacro("NATS_USE_OPENSSL_1_1", "");
|
||||||
if (tls_verify)
|
if (tls_verify)
|
||||||
lib.defineCMacro("NATS_FORCE_HOST_VERIFICATION", null);
|
lib.root_module.addCMacro("NATS_FORCE_HOST_VERIFICATION", "");
|
||||||
lib.linkLibrary(dep.artifact("ssl"));
|
lib.linkLibrary(dep.artifact("ssl"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (protobuf_runtime) |dep| {
|
if (protobuf_runtime) |dep| {
|
||||||
lib.addIncludePath(upstream.path("deps"));
|
lib.addIncludePath(upstream.path("deps"));
|
||||||
lib.addIncludePath(upstream.path("stan"));
|
lib.addIncludePath(upstream.path("stan"));
|
||||||
lib.defineCMacro("NATS_HAS_STREAMING", null);
|
lib.root_module.addCMacro("NATS_HAS_STREAMING", "");
|
||||||
|
|
||||||
lib.addCSourceFiles(.{
|
lib.addCSourceFiles(.{
|
||||||
.root = src_root,
|
.root = src_root,
|
||||||
@ -111,7 +111,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (libsodium_dep) |dep| {
|
if (libsodium_dep) |dep| {
|
||||||
lib.defineCMacro("NATS_USE_LIBSODIUM", null);
|
lib.root_module.addCMacro("NATS_USE_LIBSODIUM", "");
|
||||||
// yep
|
// yep
|
||||||
lib.linkLibrary(dep.artifact(if (tinfo.isMinGW()) "libsodium-static" else "sodium"));
|
lib.linkLibrary(dep.artifact(if (tinfo.isMinGW()) "libsodium-static" else "sodium"));
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
.hash = "12203347177845724e82819c0243caa502b054427c75f29e7f22988c67f5a91bd504",
|
.hash = "12203347177845724e82819c0243caa502b054427c75f29e7f22988c67f5a91bd504",
|
||||||
},
|
},
|
||||||
.libressl = .{
|
.libressl = .{
|
||||||
.url = "git+https://github.com/allyourcodebase/libressl.git?ref=4.0.0#7aa9871c8c9897228662e61d1355f13491857913",
|
.url = "git+https://github.com/allyourcodebase/libressl.git?ref=4.0.0+1#fd0fe777153a75217e97ba22cd8b32005bb90d08",
|
||||||
.hash = "1220a9ccbd8d9ba60b665a19ebdc5b412ac48e0eeb588616f087f6dd739a23fed5d6",
|
.hash = "1220c6521dd6d37f0426fbe6c3b3c3f4282f28495311abc08fb4cebf21ea2346ba2f",
|
||||||
.lazy = true,
|
.lazy = true,
|
||||||
},
|
},
|
||||||
.protobuf_c = .{
|
.protobuf_c = .{
|
||||||
@ -18,8 +18,8 @@
|
|||||||
.lazy = true,
|
.lazy = true,
|
||||||
},
|
},
|
||||||
.libsodium = .{
|
.libsodium = .{
|
||||||
.url = "git+https://github.com/jedisct1/libsodium.git?ref=stable#8f36e67d8dcb7c8bd32b2ccf9891caa7825ead41",
|
.url = "git+https://github.com/jedisct1/libsodium.git?ref=stable#59a98bc7f9d507175f551a53bfc0b2081f06e3ba",
|
||||||
.hash = "122082bb74ee448b76311bb229f3886628a5fdbf0d34ac9bbccec6f28471d82caa3b",
|
.hash = "1220297067945b08f44a20b3b20e5e0fd39e178a30d96d4a3531fed5999252f52eea",
|
||||||
.lazy = true,
|
.lazy = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user