build: update to zig 0.14.0
This commit is contained in:
27
build.zig
27
build.zig
@ -4,7 +4,7 @@ const Build = std.Build;
|
||||
const fs = std.fs;
|
||||
const mem = std.mem;
|
||||
|
||||
const Scanner = @import("zig-wayland").Scanner;
|
||||
const Scanner = @import("wayland").Scanner;
|
||||
|
||||
/// While a river release is in development, this string should contain the version in development
|
||||
/// with the "-dev" suffix.
|
||||
@ -71,7 +71,7 @@ pub fn build(b: *Build) !void {
|
||||
.Inherit,
|
||||
) catch break :blk version;
|
||||
|
||||
var it = mem.split(u8, mem.trim(u8, git_describe_long, &std.ascii.whitespace), "-");
|
||||
var it = mem.splitScalar(u8, mem.trim(u8, git_describe_long, &std.ascii.whitespace), '-');
|
||||
_ = it.next().?; // previous tag
|
||||
const commit_count = it.next().?;
|
||||
const commit_hash = it.next().?;
|
||||
@ -100,11 +100,11 @@ pub fn build(b: *Build) !void {
|
||||
scanner.addSystemProtocol("unstable/pointer-gestures/pointer-gestures-unstable-v1.xml");
|
||||
scanner.addSystemProtocol("unstable/xdg-decoration/xdg-decoration-unstable-v1.xml");
|
||||
|
||||
scanner.addCustomProtocol("protocol/river-control-unstable-v1.xml");
|
||||
scanner.addCustomProtocol("protocol/river-status-unstable-v1.xml");
|
||||
scanner.addCustomProtocol("protocol/river-layout-v3.xml");
|
||||
scanner.addCustomProtocol("protocol/wlr-layer-shell-unstable-v1.xml");
|
||||
scanner.addCustomProtocol("protocol/wlr-output-power-management-unstable-v1.xml");
|
||||
scanner.addCustomProtocol(b.path("protocol/river-control-unstable-v1.xml"));
|
||||
scanner.addCustomProtocol(b.path("protocol/river-status-unstable-v1.xml"));
|
||||
scanner.addCustomProtocol(b.path("protocol/river-layout-v3.xml"));
|
||||
scanner.addCustomProtocol(b.path("protocol/wlr-layer-shell-unstable-v1.xml"));
|
||||
scanner.addCustomProtocol(b.path("protocol/wlr-output-power-management-unstable-v1.xml"));
|
||||
|
||||
// Some of these versions may be out of date with what wlroots implements.
|
||||
// This is not a problem in practice though as long as river successfully compiles.
|
||||
@ -136,10 +136,10 @@ pub fn build(b: *Build) !void {
|
||||
|
||||
const wayland = b.createModule(.{ .root_source_file = scanner.result });
|
||||
|
||||
const xkbcommon = b.dependency("zig-xkbcommon", .{}).module("xkbcommon");
|
||||
const pixman = b.dependency("zig-pixman", .{}).module("pixman");
|
||||
const xkbcommon = b.dependency("xkbcommon", .{}).module("xkbcommon");
|
||||
const pixman = b.dependency("pixman", .{}).module("pixman");
|
||||
|
||||
const wlroots = b.dependency("zig-wlroots", .{}).module("wlroots");
|
||||
const wlroots = b.dependency("wlroots", .{}).module("wlroots");
|
||||
wlroots.addImport("wayland", wayland);
|
||||
wlroots.addImport("xkbcommon", xkbcommon);
|
||||
wlroots.addImport("pixman", pixman);
|
||||
@ -185,9 +185,6 @@ pub fn build(b: *Build) !void {
|
||||
.flags = &.{ "-std=c99", "-O2" },
|
||||
});
|
||||
|
||||
// TODO: remove when zig issue #131 is implemented
|
||||
scanner.addCSource(river);
|
||||
|
||||
river.pie = pie;
|
||||
river.root_module.omit_frame_pointer = omit_frame_pointer;
|
||||
|
||||
@ -211,8 +208,6 @@ pub fn build(b: *Build) !void {
|
||||
riverctl.linkLibC();
|
||||
riverctl.linkSystemLibrary("wayland-client");
|
||||
|
||||
scanner.addCSource(riverctl);
|
||||
|
||||
riverctl.pie = pie;
|
||||
riverctl.root_module.omit_frame_pointer = omit_frame_pointer;
|
||||
|
||||
@ -236,8 +231,6 @@ pub fn build(b: *Build) !void {
|
||||
rivertile.linkLibC();
|
||||
rivertile.linkSystemLibrary("wayland-client");
|
||||
|
||||
scanner.addCSource(rivertile);
|
||||
|
||||
rivertile.pie = pie;
|
||||
rivertile.root_module.omit_frame_pointer = omit_frame_pointer;
|
||||
|
||||
|
Reference in New Issue
Block a user