@@ -17,33 +17,6 @@ pub fn build(
1717 else = > "pulseaudio" ,
1818 };
1919
20- root .prefetch (b , .{
21- .{ .name = "dbus" , .args = .{} },
22- .{ .name = "x11" , .args = .{} },
23- .{ .name = "xcursor" , .args = .{} },
24- .{ .name = "pipewire" , .args = .{} },
25- .{ .name = pulseaudio_name , .args = .{} },
26- .{ .name = "wayland" , .args = .{} },
27- .{ .name = "alsa" , .args = .{} },
28- .{ .name = "fribidi" , .args = .{} },
29- .{ .name = "ibus" , .args = .{} },
30- .{ .name = "xkbcommon" , .args = .{} },
31- .{ .name = "xorgproto" , .args = .{} },
32- .{ .name = "xext" , .args = .{} },
33- .{ .name = "usb" , .args = .{} },
34- .{ .name = "xi" , .args = .{} },
35- .{ .name = "xfixes" , .args = .{} },
36- .{ .name = "xrandr" , .args = .{} },
37- .{ .name = "xrender" , .args = .{} },
38- .{ .name = "xscrnsaver" , .args = .{} },
39- .{ .name = "jack" , .args = .{} },
40- .{ .name = "sndio" , .args = .{} },
41- .{ .name = "decor" , .args = .{} },
42- .{ .name = "thai" , .args = .{} },
43- }) catch | err | switch (err ) {
44- error .LazyDependencyNeeded = > return ,
45- };
46-
4720 const upstream = b .dependency ("sdl" , .{});
4821
4922 // Provide the platform specific dependency include paths
@@ -53,7 +26,7 @@ pub fn build(
5326 lib .root_module .addIncludePath (generated .getDirectory ());
5427
5528 // Provide the D-Bus headers
56- if (root .lazyDependency (b , "dbus" )) | dbus | {
29+ if (root .lazyDependency (& lib . step , "dbus" , .{} )) | dbus | {
5730 lib .root_module .addIncludePath (dbus .path ("." ));
5831
5932 const version_string = build_zon .dependencies .dbus .version ;
@@ -138,7 +111,7 @@ pub fn build(
138111 // Provide the IBus headers
139112 {
140113 // The headers are here
141- root .addDepIncludePath (b , lib , "ibus" , "src" );
114+ root .addDepIncludePath (lib , "ibus" , "src" , .{} );
142115
143116 // They depend on the GLib headers, which require some configuration
144117 lib .root_module .addIncludePath (b .path ("deps/glib/upstream/include" ));
@@ -321,7 +294,7 @@ pub fn build(
321294
322295 // Provide the X11 headers
323296 {
324- if (root .lazyDependency (b , "x11" )) | x11 | {
297+ if (root .lazyDependency (& lib . step , "x11" , .{} )) | x11 | {
325298 lib .root_module .addIncludePath (x11 .path ("include" ));
326299
327300 const config = b .addConfigHeader (.{
@@ -335,7 +308,7 @@ pub fn build(
335308 }
336309
337310 // Provide the Xcursor headers
338- if (root .lazyDependency (b , "xcursor" )) | xcursor | {
311+ if (root .lazyDependency (& lib . step , "xcursor" , .{} )) | xcursor | {
339312 const version_string = build_zon .dependencies .xcursor .version ;
340313 const version = comptime std .SemanticVersion .parse (version_string ) catch unreachable ;
341314 const config = b .addConfigHeader (.{
@@ -381,7 +354,7 @@ pub fn build(
381354 }
382355
383356 // Provide the pipewire headers
384- if (root .lazyDependency (b , "pipewire" )) | pipewire | {
357+ if (root .lazyDependency (& lib . step , "pipewire" , .{} )) | pipewire | {
385358 lib .root_module .addIncludePath (pipewire .path ("spa/include" ));
386359 lib .root_module .addIncludePath (pipewire .path ("src" ));
387360 const version_string = build_zon .dependencies .pipewire .version ;
@@ -402,7 +375,7 @@ pub fn build(
402375 // Provide the pulseaudio headers
403376 {
404377 @setEvalBranchQuota (2000 );
405- if (root .lazyDependency (b , pulseaudio_name )) | pulseaudio | {
378+ if (root .lazyDependency (& lib . step , pulseaudio_name , .{} )) | pulseaudio | {
406379 lib .root_module .addIncludePath (pulseaudio .path ("src" ));
407380 const version_string = build_zon .dependencies .pulseaudio .version ;
408381 const version = comptime std .SemanticVersion .parse (version_string ) catch unreachable ;
@@ -424,7 +397,7 @@ pub fn build(
424397 }
425398
426399 // Provide the Wayland headers
427- if (root .lazyDependency (b , "wayland" )) | wayland | {
400+ if (root .lazyDependency (& lib . step , "wayland" , .{} )) | wayland | {
428401 lib .root_module .addIncludePath (wayland .path ("src" ));
429402 lib .root_module .addIncludePath (wayland .path ("cursor" ));
430403 lib .root_module .addIncludePath (wayland .path ("egl" ));
@@ -452,7 +425,7 @@ pub fn build(
452425 }
453426
454427 // Provide the Alsa headers
455- if (root .lazyDependency (b , "alsa" )) | alsa | {
428+ if (root .lazyDependency (& lib . step , "alsa" , .{} )) | alsa | {
456429 _ = generated .addCopyDirectory (alsa .path ("include" ), "alsa" , .{
457430 .include_extensions = &.{".h" },
458431 });
@@ -461,7 +434,7 @@ pub fn build(
461434 }
462435
463436 // Provide the Fribidi headers
464- if (root .lazyDependency (b , "fribidi" )) | fribidi | {
437+ if (root .lazyDependency (& lib . step , "fribidi" , .{} )) | fribidi | {
465438 const interface_version = build_zon .dependencies .fribidi .interface_version ;
466439 const version_string = build_zon .dependencies .fribidi .version ;
467440 const version = comptime std .SemanticVersion .parse (version_string ) catch unreachable ;
@@ -507,21 +480,21 @@ pub fn build(
507480 }
508481
509482 // Provide upstream headers that don't require any special handling
510- root .addDepIncludePath (b , lib , "xkbcommon" , "include" );
511- root .addDepIncludePath (b , lib , "xorgproto" , "include" );
512- root .addDepIncludePath (b , lib , "xext" , "include" );
513- root .addDepIncludePath (b , lib , "usb" , "libusb" );
514- root .addDepIncludePath (b , lib , "xi" , "include" );
515- root .addDepIncludePath (b , lib , "xfixes" , "include" );
516- root .addDepIncludePath (b , lib , "xrandr" , "include" );
517- root .addDepIncludePath (b , lib , "xrender" , "include" );
518- root .addDepIncludePath (b , lib , "xscrnsaver" , "include" );
519- root .addDepIncludePath (b , lib , "jack" , "common" );
520- root .addDepIncludePath (b , lib , "sndio" , "libsndio" );
483+ root .addDepIncludePath (lib , "xkbcommon" , "include" , .{} );
484+ root .addDepIncludePath (lib , "xorgproto" , "include" , .{} );
485+ root .addDepIncludePath (lib , "xext" , "include" , .{} );
486+ root .addDepIncludePath (lib , "usb" , "libusb" , .{} );
487+ root .addDepIncludePath (lib , "xi" , "include" , .{} );
488+ root .addDepIncludePath (lib , "xfixes" , "include" , .{} );
489+ root .addDepIncludePath (lib , "xrandr" , "include" , .{} );
490+ root .addDepIncludePath (lib , "xrender" , "include" , .{} );
491+ root .addDepIncludePath (lib , "xscrnsaver" , "include" , .{} );
492+ root .addDepIncludePath (lib , "jack" , "common" , .{} );
493+ root .addDepIncludePath (lib , "sndio" , "libsndio" , .{} );
521494 lib .root_module .addIncludePath (b .path ("deps/wayland/protocols" ));
522- root .addDepIncludePath (b , lib , "decor" , "src" );
495+ root .addDepIncludePath (lib , "decor" , "src" , .{} );
523496 lib .root_module .addIncludePath (b .path ("deps/mesa/include" ));
524- root .addDepIncludePath (b , lib , "thai" , "include" );
497+ root .addDepIncludePath (lib , "thai" , "include" , .{} );
525498
526499 // Provide vendored headers that don't require any special handling
527500 lib .root_module .addIncludePath (b .path ("deps/xcb/include" ));
0 commit comments