Skip to content

Commit 7bbab61

Browse files
committed
fixed pcre2 using fork
1 parent 18838dc commit 7bbab61

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

build.zig

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ pub fn build(b: *std.Build) !void {
77

88
// the zine dev server needs this option!!!
99
const opt_debug = b.option(bool, "debug", "zine debug, unused") orelse true;
10+
const include_drafts = b.option(
11+
bool,
12+
"include-drafts",
13+
"Include drafts in zine output",
14+
) orelse false;
1015

1116
const pcre2_dep = b.dependency("pcre2", .{
1217
.target = target,
@@ -15,7 +20,7 @@ pub fn build(b: *std.Build) !void {
1520
});
1621

1722
const docs_wasm = try buildDocsWasm(b, optimize);
18-
const website_step, const serve_step = try buildWebSite(b, docs_wasm, opt_debug);
23+
const website_step, const serve_step = try buildWebSite(b, docs_wasm, opt_debug, include_drafts);
1924
// has to be run with zig build website
2025
_ = website_step;
2126
// has to be run with zig build serve
@@ -54,7 +59,7 @@ fn buildDocsWasm(b: *std.Build, optimize: std.builtin.OptimizeMode) !*std.Build.
5459
return docs_wasm;
5560
}
5661

57-
fn buildWebSite(b: *std.Build, docs_wasm: *std.Build.Step.Compile, debug: bool) !struct {
62+
fn buildWebSite(b: *std.Build, docs_wasm: *std.Build.Step.Compile, debug: bool, include_drafts: bool) !struct {
5863
*std.Build.Step,
5964
*std.Build.Step,
6065
} {
@@ -107,7 +112,7 @@ fn buildWebSite(b: *std.Build, docs_wasm: *std.Build.Step.Compile, debug: bool)
107112
"website",
108113
"Builds the website",
109114
);
110-
zine.addWebsite(b, opts, website_step, site);
115+
zine.addWebsite(b, opts, website_step, site, include_drafts);
111116

112117
const serve_step = b.step(
113118
"serve",

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
.hash = "1220dfe5a9352fc7c9c16b07c5c6d7417fc96ee92dbab5f27b8d4d02400ba5a9f88c",
1313
},
1414
.pcre2 = .{
15-
.url = "https://github.com/renerocksai/pcre2/archive/refs/tags/pcre2-10.45.tar.gz",
16-
.hash = "12207d56c8b27a141c793fc596af11e6eca919efbbcf49b04f7803c603e2f6081b1b",
15+
.url = "https://github.com/renerocksai/pcre2/archive/refs/tags/zig-0.14.tar.gz",
16+
.hash = "12202a2e5043bd8641208b0eb597bc0346fd94fdec5b1ae92ee0096e83d6ff33fc45",
1717
},
1818
},
1919
.paths = .{"."},

0 commit comments

Comments
 (0)