begin 0.13 update process -- very broken

This commit is contained in:
Mitchell Hashimoto
2024-06-08 19:51:44 -07:00
parent 68f0715926
commit a30e791c85
18 changed files with 67 additions and 51 deletions

View File

@ -1017,7 +1017,7 @@ fn addDeps(
// on x86_64.
if (step.rootModuleTarget().os.tag == .linux) {
const triple = try step.rootModuleTarget().linuxTriple(b.allocator);
step.addLibraryPath(.{ .path = b.fmt("/usr/lib/{s}", .{triple}) });
step.addLibraryPath(b.path(b.fmt("/usr/lib/{s}", .{triple})));
}
// C files

View File

@ -5,8 +5,8 @@
.dependencies = .{
// Zig libs
.libxev = .{
.url = "https://github.com/mitchellh/libxev/archive/efde8a170836334901ed2d59c98bf832eb48ae3a.tar.gz",
.hash = "1220bf10f4fc109ca0b50520075e2e730900956e220adee616a01f3f91bc8a802695",
.url = "https://github.com/mitchellh/libxev/archive/f6a672a78436d8efee1aa847a43a900ad773618b.tar.gz",
.hash = "12207b7a5b538ffb7fb18f954ae17d2f8490b6e3778a9e30564ad82c58ee8da52361",
},
.mach_glfw = .{
.url = "https://github.com/mitchellh/mach-glfw/archive/20c773d86df269722d8926f98bc8af26ebd90999.tar.gz",

22
flake.lock generated
View File

@ -16,6 +16,22 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -197,11 +213,11 @@
]
},
"locked": {
"lastModified": 1719231019,
"narHash": "sha256-ZHU2A+xs7I5rqDagBtnGPc+GyIwhMaa8Za9h+8qTCiw=",
"lastModified": 1717848532,
"narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "1141abbf0c667677569c887bfbb1500039b5295e",
"rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43",
"type": "github"
},
"original": {

View File

@ -39,7 +39,7 @@
inherit (pkgs-unstable) tracy;
inherit (zls.packages.${system}) zls;
zig = zig.packages.${system}."0.12.1";
zig = zig.packages.${system}."0.13.0";
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {};
};

View File

@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("cimgui", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -30,7 +30,7 @@ pub fn build(b: *std.Build) !void {
}
lib.addIncludePath(imgui.path(""));
module.addIncludePath(.{ .path = "vendor" });
module.addIncludePath(b.path("vendor"));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -49,7 +49,7 @@ pub fn build(b: *std.Build) !void {
});
}
lib.addCSourceFile(.{ .file = .{ .path = "vendor/cimgui.cpp" }, .flags = flags.items });
lib.addCSourceFile(.{ .file = b.path("vendor/cimgui.cpp"), .flags = flags.items });
lib.addCSourceFile(.{ .file = imgui.path("imgui.cpp"), .flags = flags.items });
lib.addCSourceFile(.{ .file = imgui.path("imgui_draw.cpp"), .flags = flags.items });
lib.addCSourceFile(.{ .file = imgui.path("imgui_demo.cpp"), .flags = flags.items });
@ -80,7 +80,7 @@ pub fn build(b: *std.Build) !void {
}
lib.installHeadersDirectory(
.{ .path = "vendor" },
b.path("vendor"),
"",
.{ .include_extensions = &.{".h"} },
);
@ -89,7 +89,7 @@ pub fn build(b: *std.Build) !void {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -13,7 +13,7 @@ pub fn build(b: *std.Build) !void {
) orelse (target.result.os.tag != .windows);
const freetype_enabled = b.option(bool, "enable-freetype", "Build freetype") orelse true;
const module = b.addModule("fontconfig", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("fontconfig", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("fontconfig", .{});
const lib = b.addStaticLibrary(.{
@ -39,9 +39,9 @@ pub fn build(b: *std.Build) !void {
}
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "override/include" });
lib.addIncludePath(b.path("override/include"));
module.addIncludePath(upstream.path(""));
module.addIncludePath(.{ .path = "override/include" });
module.addIncludePath(b.path("override/include"));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -172,7 +172,7 @@ pub fn build(b: *std.Build) !void {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const libpng_enabled = b.option(bool, "enable-libpng", "Build libpng") orelse false;
const module = b.addModule("freetype", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("freetype", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("freetype", .{});
const lib = b.addStaticLibrary(.{
@ -21,7 +21,7 @@ pub fn build(b: *std.Build) !void {
}
module.addIncludePath(upstream.path("include"));
module.addIncludePath(.{ .path = "" });
module.addIncludePath(b.path(""));
// Dependencies
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
@ -81,7 +81,7 @@ pub fn build(b: *std.Build) !void {
}),
}
lib.installHeader(.{ .path = "freetype-zig.h" }, "freetype-zig.h");
lib.installHeader(b.path("freetype-zig.h"), "freetype-zig.h");
lib.installHeadersDirectory(
upstream.path("include"),
"",
@ -93,7 +93,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("glslang", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
b.installArtifact(lib);
module.addIncludePath(upstream.path(""));
module.addIncludePath(.{ .path = "override" });
module.addIncludePath(b.path("override"));
if (target.result.isDarwin()) {
const apple_sdk = @import("apple_sdk");
try apple_sdk.addPaths(b, module);
@ -24,7 +24,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -52,7 +52,7 @@ fn buildGlslang(
lib.linkLibC();
lib.linkLibCpp();
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "override" });
lib.addIncludePath(b.path("override"));
if (target.result.isDarwin()) {
const apple_sdk = @import("apple_sdk");
try apple_sdk.addPaths(b, &lib.root_module);

View File

@ -17,7 +17,7 @@ pub fn build(b: *std.Build) !void {
const upstream = b.dependency("harfbuzz", .{});
const module = b.addModule("harfbuzz", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
@ -91,7 +91,7 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -7,7 +7,7 @@ pub fn build(b: *std.Build) !void {
const upstream = b.dependency("highway", .{});
const module = b.addModule("highway", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -95,7 +95,7 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -23,7 +23,7 @@ pub fn build(b: *std.Build) !void {
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
lib.linkLibrary(zlib_dep.artifact("z"));
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "" });
lib.addIncludePath(b.path(""));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -40,7 +40,7 @@ pub fn build(b: *std.Build) !void {
.flags = flags.items,
});
lib.installHeader(.{ .path = "pnglibconf.h" }, "pnglibconf.h");
lib.installHeader(b.path("pnglibconf.h"), "pnglibconf.h");
lib.installHeadersDirectory(
upstream.path(""),
"",

View File

@ -14,12 +14,12 @@ pub fn build(b: *std.Build) !void {
lib.linkLibC();
lib.addIncludePath(upstream.path("include"));
lib.addIncludePath(.{ .path = "override/include" });
lib.addIncludePath(b.path("override/include"));
if (target.result.os.tag == .windows) {
lib.addIncludePath(.{ .path = "override/config/win32" });
lib.addIncludePath(b.path("override/config/win32"));
lib.linkSystemLibrary("ws2_32");
} else {
lib.addIncludePath(.{ .path = "override/config/posix" });
lib.addIncludePath(b.path("override/config/posix"));
}
var flags = std.ArrayList([]const u8).init(b.allocator);
@ -101,7 +101,7 @@ pub fn build(b: *std.Build) !void {
});
lib.installHeader(
.{ .path = "override/include/libxml/xmlversion.h" },
b.path("override/include/libxml/xmlversion.h"),
"libxml/xmlversion.h",
);
lib.installHeadersDirectory(

View File

@ -7,7 +7,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("macos", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -21,11 +21,11 @@ pub fn build(b: *std.Build) !void {
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
lib.addCSourceFile(.{
.file = .{ .path = "os/log.c" },
.file = b.path("os/log.c"),
.flags = flags.items,
});
lib.addCSourceFile(.{
.file = .{ .path = "text/ext.c" },
.file = b.path("text/ext.c"),
.flags = flags.items,
});
lib.linkFramework("CoreFoundation");
@ -55,7 +55,7 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("oniguruma", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("oniguruma", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("oniguruma", .{});
const lib = try buildOniguruma(b, upstream, target, optimize);
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -1,6 +1,6 @@
const std = @import("std");
pub fn build(b: *std.Build) !void {
const module = b.addModule("opengl", .{ .root_source_file = .{ .path = "main.zig" } });
module.addIncludePath(.{ .path = "../../vendor/glad/include" });
const module = b.addModule("opengl", .{ .root_source_file = b.path("main.zig") });
module.addIncludePath(b.path("../../vendor/glad/include"));
}

View File

@ -4,7 +4,7 @@ pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("pixman", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("pixman", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("pixman", .{});
const lib = b.addStaticLibrary(.{
@ -22,9 +22,9 @@ pub fn build(b: *std.Build) !void {
}
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "" });
lib.addIncludePath(b.path(""));
module.addIncludePath(upstream.path("pixman"));
module.addIncludePath(.{ .path = "" });
module.addIncludePath(b.path(""));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -62,7 +62,7 @@ pub fn build(b: *std.Build) !void {
.flags = flags.items,
});
lib.installHeader(.{ .path = "pixman-version.h" }, "pixman-version.h");
lib.installHeader(b.path("pixman-version.h"), "pixman-version.h");
lib.installHeadersDirectory(
upstream.path("pixman"),
"",
@ -74,7 +74,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -10,7 +10,7 @@ pub fn build(b: *std.Build) !void {
.optimize = optimize,
});
lib.linkLibCpp();
lib.addIncludePath(.{ .path = "vendor" });
lib.addIncludePath(b.path("vendor"));
if (target.result.isDarwin()) {
const apple_sdk = @import("apple_sdk");
@ -28,7 +28,7 @@ pub fn build(b: *std.Build) !void {
},
});
lib.installHeadersDirectory(
.{ .path = "vendor" },
b.path("vendor"),
"",
.{ .include_extensions = &.{".h"} },
);

View File

@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void {
const upstream = b.dependency("spirv_cross", .{});
const module = b.addModule("spirv_cross", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("spirv_cross", .{ .root_source_file = b.path("main.zig") });
module.addIncludePath(upstream.path(""));
const lib = try buildSpirvCross(b, upstream, target, optimize);
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});