From 2be1a1af183306d0afccc1a93c848e81ccde026f Mon Sep 17 00:00:00 2001 From: Ben Buhse Date: Wed, 25 Feb 2026 16:25:26 -0600 Subject: [PATCH] Fix building docs from emerge This is equivalent to the scdoc patch in the river ebuild --- build.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.zig b/build.zig index 470f99e..43a0333 100644 --- a/build.zig +++ b/build.zig @@ -91,7 +91,9 @@ pub fn build(b: *std.Build) !void { if (man_pages) { inline for (.{ .{ "beansprout", "1" }, .{ "beansprout", "5" } }) |page| { const scdoc = b.addSystemCommand(&.{ "/bin/sh", "-c", "scdoc < man/" ++ page[0] ++ "." ++ page[1] ++ ".scd" }); + scdoc.setCwd(b.path(".")); scdoc.addFileArg(b.path("man/" ++ page[0] ++ "." ++ page[1] ++ ".scd")); + const stdout = scdoc.captureStdOut(); const install = b.addInstallFile(stdout, "share/man/man" ++ page[1] ++ "/" ++ page[0] ++ "." ++ page[1]); b.getInstallStep().dependOn(&install.step);