diff --git a/.gitignore b/.gitignore index 4a7957369..303e3d5e6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ manual/t*.fls compile_commands.json .zig-cache zig-out +zig-pkg result diff --git a/build.zig b/build.zig index 91789763d..6d30f05d9 100644 --- a/build.zig +++ b/build.zig @@ -392,7 +392,7 @@ pub fn build(b: *std.Build) !void { })) |dependency| { embed_exe.root_module.linkLibrary(dependency.artifact("lz4")); } - embed_exe.addCSourceFile(.{ + embed_exe.root_module.addCSourceFile(.{ .file = b.path("profiler/helpers/embed.cpp"), .flags = &.{"-std=c++20"}, }); @@ -489,10 +489,10 @@ pub fn build(b: *std.Build) !void { const wayland_protocols_dir: ?std.Build.LazyPath = if (use_system_wayland_protocols) blk: { var code: u8 = undefined; const pkgdatadir = if (b.runAllowFail(&[_][]const u8{ - b.graph.env_map.get("PKG_CONFIG") orelse "pkg-config", + b.graph.environ_map.get("PKG_CONFIG") orelse "pkg-config", "wayland-protocols", "--variable=pkgdatadir", - }, &code, .Ignore)) |stdout| stdout else |err| switch (err) { + }, &code, .ignore)) |stdout| stdout else |err| switch (err) { error.ProcessTerminated => return error.PkgConfigCrashed, error.ExecNotSupported => return error.PkgConfigFailed, error.ExitCodeFailure => return error.PkgConfigFailed, @@ -907,7 +907,7 @@ fn createImgui( link_system_glfw: bool, link_system_freetype: bool, ) *std.Build.Step.Compile { - const enable_freetype: bool = false; + const enable_freetype: bool = true; const upstream = b.dependency("imgui", .{}); const imgui = b.addLibrary(.{ @@ -963,7 +963,6 @@ fn createImgui( } else if (b.lazyDependency("freetype", .{ .target = options.target.?, .optimize = options.optimize.?, - .enable_brotli = false, })) |freetype_dependency| { imgui.root_module.linkLibrary(freetype_dependency.artifact("freetype")); } diff --git a/build.zig.zon b/build.zig.zon index 9984f372e..45e113af1 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -2,26 +2,26 @@ .name = .tracy, .version = "0.13.1", .fingerprint = 0x255a89eecd27f4ce, // Changing this has security and trust implications. - .minimum_zig_version = "0.15.1", + .minimum_zig_version = "0.16.0", .dependencies = .{ .glfw = .{ // glfw ported to the zig build system - .url = "git+https://github.com/Techatrix/glfw.git#5ab24844c4982f1665985bd2a808a62c8cbeb97b", - .hash = "glfw-3.4.0-yvF4PIFDMwBvlU52tuJU9_ijSCazcLeWvYsdaBJm7HQ6", + .url = "git+https://github.com/Techatrix/glfw.git#17493bf1da7b77c7554b577917ce2a2febf265a2", + .hash = "glfw-3.4.0-yvF4PGJSLwB4PwLFVcTxcixsw57WFurDn9CON4cIbf-H", .lazy = true, }, .capstone = .{ // Availability for capstone as Zig dependency - .url = "git+https://github.com/allyourcodebase/capstone.git#90c3e2512286b077631da5361708562e333ae856", - .hash = "capstone-6.0.0-Alpha4-tmNUgdI8AADDVL-qUUVmU0IGuFGpjz6-O7sBRjeB53yb", + .url = "git+https://github.com/allyourcodebase/capstone.git#586dd00c4fd1615f4af7e603376dd13b683a25aa", + .hash = "capstone-6.0.0-Alpha4-tmNUgQE9AABNw_9iAfvi1hPfRVFKQsw2bqWVXOeM7Kqz", .lazy = true, }, .curl = .{ // curl ported to the zig build system - .url = "git+https://github.com/allyourcodebase/curl.git#fc863d6cbc4a694ff5bb11fc59470142c8682e2b", - .hash = "curl-8.18.0-mFDAWK_0AABsv8MPtSIjAPCVElXbt1vbzgBOs7plIlUJ", + .url = "git+https://github.com/allyourcodebase/curl.git#ab30a38bc47c8ad83ec7016f4ae3af1958d76ac3", + .hash = "curl-8.18.0-mFDAWOf0AAAE2R408-AD3oi63paK_MBWcxkqR6zkNsmL", .lazy = true, }, .zstd = .{ // zstd ported to the zig build system - .url = "git+https://github.com/allyourcodebase/zstd.git?ref=1.5.7#01327d49cbc56dc24c20a167bb0055d7fc23de84", - .hash = "zstd-1.5.7-KEItkJ8vAAC5_rRlKmLflYQ-eKXbAIQBWZNmmJtS18q0", + .url = "git+https://github.com/allyourcodebase/zstd.git?ref=1.5.7-1#e1a501be57f42c541e8a5597e4b59a074dfd09a3", + .hash = "zstd-1.5.7-1-KEItkAMwAAD6OKY3m0OOmXG7aL-aLUfrDqbP5J5oYapU", .lazy = true, }, .lz4 = .{ // lz4 ported to the zig build system @@ -34,14 +34,14 @@ .hash = "nativefiledialog_extended-1.2.1-2-_pDry5gcAAA701XtymPdScWmrLQ5Zuw9yZYm_bxp7DkQ", .lazy = true, }, - // .freetype = .{ // A fork of freetype packaged for the Zig build system - // .url = "git+https://github.com/hexops/freetype.git#972cd37bccecae2cc9f54cf0b562263a13209d02", - // .hash = "freetype-0.0.0-AAAAAA5JcwBMujojfNLEq5g_WijZtU56mRLYx8bjjiMU", - // .lazy = true, - // }, + .freetype = .{ + .url = "git+https://code.hexops.org/hexops/freetype.git#c4188e125fd4e8c84d49b619f4f409fde52ff1d0", + .hash = "freetype-0.0.0-Oa073aKZdgBGGFCSwR0IWkb5oV2rgBGAHeTnXIejmo0k", + .lazy = true, + }, .wayland = .{ - .url = "git+https://github.com/allyourcodebase/wayland.git?ref=1.24.0-3#c3e9e7b92a135badb24643da7be8a441a060af9d", - .hash = "wayland-1.24.0-3-dxEBa6N9AAD5fW7Hq-V8ngPRpUTky6PmnHxVFRPvn1aI", + .url = "git+https://github.com/allyourcodebase/wayland.git?ref=1.24.0-4#1a08737f01842c2c11fd2d22bec795ffcd7fec67", + .hash = "wayland-1.24.0-4-dxEBa-N8AABxP_wW0QMcnzmY_h_P1sqtpY9tenhmLz10", .lazy = true, }, .wayland_protocols = .{ @@ -50,8 +50,8 @@ .lazy = true, }, .libxkbcommon = .{ - .url = "git+https://github.com/allyourcodebase/libxkbcommon.git?ref=1.11.0-1#809157d5118909298f3e086fa8d8103198e938fd", - .hash = "libxkbcommon-1.11.0-1-93LaF6pwAgDFoaLfOkR8ioG4RVcDHbBhsDmC_rYwyOEG", + .url = "git+https://github.com/allyourcodebase/libxkbcommon.git?ref=1.13.1#8c31126430bec39d2cb5f06aa3c2667e006b32ea", + .hash = "libxkbcommon-1.13.1-93LaF2x7AgDgSrr8xjRYrYGhtGhJKcZMuID3M95APvl1", .lazy = true, }, diff --git a/build.zig.zon.nix b/build.zig.zon.nix index 0bed1096a..425457266 100644 --- a/build.zig.zon.nix +++ b/build.zig.zon.nix @@ -5,11 +5,11 @@ }: linkFarm "zig-packages" [ { - name = "capstone-6.0.0-Alpha4-tmNUgdI8AADDVL-qUUVmU0IGuFGpjz6-O7sBRjeB53yb"; + name = "capstone-6.0.0-Alpha4-tmNUgQE9AABNw_9iAfvi1hPfRVFKQsw2bqWVXOeM7Kqz"; path = fetchgit { url = "https://github.com/allyourcodebase/capstone"; - rev = "90c3e2512286b077631da5361708562e333ae856"; - hash = "sha256-jqYbCviAAmW8XL45zpTKYKrupsa315KP0DGxVSgtqxE="; + rev = "586dd00c4fd1615f4af7e603376dd13b683a25aa"; + hash = "sha256-erARsyTMq2JN2BYUnsPf8jrH9UHD4afzvTmkmQcRZmY="; }; } { diff --git a/flake.lock b/flake.lock index 93ca7b2b3..286ec2cd6 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-compat": { "locked": { - "lastModified": 1765121682, - "narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", "owner": "edolstra", "repo": "flake-compat", - "rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1765772535, - "narHash": "sha256-aq+dQoaPONOSjtFIBnAXseDm9TUhIbe215TPmkfMYww=", + "lastModified": 1776949667, + "narHash": "sha256-GMSVw35Q+294GlrTUKlx087E31z7KurReQ1YHSKp5iw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "09b8fda8959d761445f12b55f380d90375a1d6bb", + "rev": "01fbdeef22b76df85ea168fbfe1bfd9e63681b30", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 671289341..698ceeefe 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ system: let pkgs = nixpkgs.legacyPackages.${system}; deps = pkgs.callPackage ./build.zig.zon.nix {}; - zig_hook = pkgs.zig_0_15.hook.overrideAttrs { + zig_hook = pkgs.zig_0_16.hook.overrideAttrs { zig_default_flags = "-Doptimize=ReleaseFast -Dcpu=baseline --color off"; }; fs = pkgs.lib.fileset; @@ -48,9 +48,8 @@ ] ); }; - dontConfigure = true; buildInputs = with pkgs; - [curl zstd lz4 gtk3 dbus] + [curl zstd lz4 freetype gtk3 dbus] ++ lib.optionals (stdenv.hostPlatform.isLinux) [libxkbcommon]; nativeBuildInputs = with pkgs; [zig_hook pkg-config makeWrapper] @@ -66,7 +65,7 @@ buildInputs = with pkgs; [gtk3 dbus] ++ lib.optionals (stdenv.hostPlatform.isLinux) [libxkbcommon]; - nativeBuildInputs = with pkgs; [zig_hook pkg-config]; + nativeBuildInputs = with pkgs; [zig_0_16 pkg-config]; # shellHook = '' # export XKB_CONFIG_ROOT=${pkgs.xkeyboard_config}/etc/X11/xkb # export XLOCALEDIR=${pkgs.xorg.libX11.out}/share/X11/locale