build: update for zig-0.13.0 release

Deprecated LazyPath fields were removed. This would have been the
correct non-lazy (irony intended?) way of updating for zig 0.12 as
well, and indeed this build works with zig-0.12.1.
This commit is contained in:
torque 2024-06-17 23:15:58 -07:00
parent e95f71abab
commit 353111f2c2
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk

View File

@ -258,15 +258,15 @@ pub fn libresslBuild(
);
for (libcrypto_include_paths) |path| {
libressl_libs.libcrypto.addIncludePath(.{ .path = path });
libressl_libs.libcrypto.addIncludePath(b.path(path));
}
for (libssl_include_paths) |path| {
libressl_libs.libssl.addIncludePath(.{ .path = path });
libressl_libs.libssl.addIncludePath(b.path(path));
}
for (libtls_include_paths) |path| {
libressl_libs.libtls.addIncludePath(.{ .path = path });
libressl_libs.libtls.addIncludePath(b.path(path));
}
switch (tinfo.cpu.arch) {
@ -274,16 +274,16 @@ pub fn libresslBuild(
.aarch64_be,
.aarch64_32,
=> libressl_libs.libcrypto.addIncludePath(
.{ .path = libcrypto_src_prefix ++ "bn/arch/aarch64" },
b.path(libcrypto_src_prefix ++ "bn/arch/aarch64"),
),
.x86 => libressl_libs.libcrypto.addIncludePath(
.{ .path = libcrypto_src_prefix ++ "bn/arch/i386" },
b.path(libcrypto_src_prefix ++ "bn/arch/i386"),
),
.riscv64 => libressl_libs.libcrypto.addIncludePath(
.{ .path = libcrypto_src_prefix ++ "bn/arch/riscv64" },
b.path(libcrypto_src_prefix ++ "bn/arch/riscv64"),
),
.x86_64 => libressl_libs.libcrypto.addIncludePath(
.{ .path = libcrypto_src_prefix ++ "bn/arch/amd64" },
b.path(libcrypto_src_prefix ++ "bn/arch/amd64"),
),
else => @panic("unsupported target CPU arch"),
@ -292,9 +292,9 @@ pub fn libresslBuild(
// add the header install path to the include path so that compilation will pick
// up "openssl/opensslconf.h". This is added last to avoid interfering with the
// somewhat messy include handling that libressl does.
libressl_libs.libcrypto.addIncludePath(.{ .path = b.getInstallPath(.header, "") });
libressl_libs.libssl.addIncludePath(.{ .path = b.getInstallPath(.header, "") });
libressl_libs.libtls.addIncludePath(.{ .path = b.getInstallPath(.header, "") });
libressl_libs.libcrypto.addIncludePath(.{ .cwd_relative = b.getInstallPath(.header, "") });
libressl_libs.libssl.addIncludePath(.{ .cwd_relative = b.getInstallPath(.header, "") });
libressl_libs.libtls.addIncludePath(.{ .cwd_relative = b.getInstallPath(.header, "") });
libressl_libs.libssl.linkLibrary(libressl_libs.libcrypto);