From bb0e7bc98c0fdab1839c77f0c8799f3a1c748e85 Mon Sep 17 00:00:00 2001 From: torque Date: Mon, 17 Jun 2024 23:15:58 -0700 Subject: [PATCH] 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. --- build.zig | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build.zig b/build.zig index c121bea..a422778 100644 --- a/build.zig +++ b/build.zig @@ -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);