From e8c5b37f320db03acba410d993441815bc809606 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 2 Jun 2024 13:14:22 -0700 Subject: [PATCH] update to Zig 2024.05 Signed-off-by: Stephen Gutekanst --- .gitignore | 1 + build.zig | 8 ++++---- build.zig.zon | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 7f82a9c1f..073457385 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ subprojects/* # Zig /zig-* +.zig-cache \ No newline at end of file diff --git a/build.zig b/build.zig index 5002b49b4..1b4f3d55f 100644 --- a/build.zig +++ b/build.zig @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); lib.linkLibC(); - lib.addIncludePath(.{ .path = "include" }); + lib.addIncludePath(b.path("include")); lib.defineCMacro("FT2_BUILD_LIBRARY", "1"); if (use_system_zlib) { @@ -31,11 +31,11 @@ pub fn build(b: *std.Build) void { lib.defineCMacro("HAVE_UNISTD_H", "1"); lib.addCSourceFiles(.{ .files = &sources, .flags = &.{} }); if (target.result.os.tag == .macos) lib.addCSourceFile(.{ - .file = .{ .path = "src/base/ftmac.c" }, + .file = b.path("src/base/ftmac.c"), .flags = &.{}, }); - lib.installHeadersDirectory("include/freetype", "freetype"); - lib.installHeader("include/ft2build.h", "ft2build.h"); + lib.installHeadersDirectory(b.path("include/freetype"), "freetype", .{}); + lib.installHeader(b.path("include/ft2build.h"), "ft2build.h"); b.installArtifact(lib); } diff --git a/build.zig.zon b/build.zig.zon index 9b05a4e00..8e719a394 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -13,8 +13,8 @@ }, .dependencies = .{ .brotli = .{ - .url = "https://pkg.machengine.org/brotli/538f4c5b085bb53c84e39860305442abd0436be5.tar.gz", - .hash = "12202a0f156a1d5d25a97468de318a99451a77b930f584d4edeff152259a875a4a75", + .url = "https://pkg.machengine.org/brotli/4c10522a5fa3b4fd7f8beedc8af1e20309719da9.tar.gz", + .hash = "122059777e9e24227733f386b2929a78e15be9b748c99dba0d209744c910671b101c", .lazy = true, }, },