Skip to content

Commit

Permalink
build: update to Zig 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ifreund committed Jun 7, 2024
1 parent 0f355a9 commit 148c033
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .builds/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ sources:
- https://codeberg.org/ifreund/waylock
tasks:
- install_deps: |
wget -nv https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz
tar -xvf zig-linux-x86_64-0.12.0.tar.xz 1>/dev/null
sudo mv zig-linux-x86_64-0.12.0/zig /usr/bin/
sudo mv zig-linux-x86_64-0.12.0/lib /usr/lib/zig
wget -nv https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz
tar -xvf zig-linux-x86_64-0.13.0.tar.xz 1>/dev/null
sudo mv zig-linux-x86_64-0.13.0/zig /usr/bin/
sudo mv zig-linux-x86_64-0.13.0/lib /usr/lib/zig
- build: |
cd waylock
zig build -Dman-pages
Expand Down
8 changes: 4 additions & 4 deletions .builds/archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ sources:
- https://codeberg.org/ifreund/waylock
tasks:
- install_deps: |
wget -nv https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz
tar -xvf zig-linux-x86_64-0.12.0.tar.xz 1>/dev/null
sudo mv zig-linux-x86_64-0.12.0/zig /usr/bin/
sudo mv zig-linux-x86_64-0.12.0/lib /usr/lib/zig
wget -nv https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz
tar -xvf zig-linux-x86_64-0.13.0.tar.xz 1>/dev/null
sudo mv zig-linux-x86_64-0.13.0/zig /usr/bin/
sudo mv zig-linux-x86_64-0.13.0/lib /usr/lib/zig
- build: |
cd waylock
zig build -Dman-pages
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
zig-cache
.zig-cache
zig-out
/doc/waylock.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Note: If you are packaging waylock for distribution, see [PACKAGING.md](PACKAGIN
To compile waylock first ensure that you have the following dependencies
installed:

- [zig](https://ziglang.org/download/) 0.12.0
- [zig](https://ziglang.org/download/) 0.13.0
- wayland
- wayland-protocols
- xkbcommon
Expand Down
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn build(b: *Build) !void {
// Even passing a buffer to std.Build.Step.Run appears to be racy and occasionally deadlocks.
const scdoc = b.addSystemCommand(&.{ "sh", "-c", "scdoc < doc/waylock.1.scd" });
// This makes the caching work for the Workaround, and the extra argument is ignored by /bin/sh.
scdoc.addFileArg(.{ .path = "doc/waylock.1.scd" });
scdoc.addFileArg(b.path("doc/waylock.1.scd"));

const stdout = scdoc.captureStdOut();
b.getInstallStep().dependOn(&b.addInstallFile(stdout, "share/man/man1/waylock.1").step);
Expand Down Expand Up @@ -93,7 +93,7 @@ pub fn build(b: *Build) !void {

const waylock = b.addExecutable(.{
.name = "waylock",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
8 changes: 4 additions & 4 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
.paths = .{""},
.dependencies = .{
.@"zig-wayland" = .{
.url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.1.0.tar.gz",
.hash = "1220b0f8f822c1625af7aae4cb3ab2c4ec1a4c0e99ef32867b2a8d88bb070b3e7f6d",
.url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz",
.hash = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242",
},
.@"zig-xkbcommon" = .{
.url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.1.0.tar.gz",
.hash = "1220840390382c88caf9b0887f6cebbba3a7d05960b8b2ee6d80567b2950b71e5017",
.url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.2.0.tar.gz",
.hash = "1220c90b2228d65fd8427a837d31b0add83e9fade1dcfa539bb56fd06f1f8461605f",
},
},
}

0 comments on commit 148c033

Please sign in to comment.