mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 08:23:48 +01:00
update all zig code in accordance with upstream changes
This commit is contained in:
parent
732ea6fa40
commit
76e9c9d4c1
14 changed files with 44 additions and 74 deletions
|
@ -1,10 +1,10 @@
|
|||
const std = @import("std");
|
||||
const common = @import("build_common.zig");
|
||||
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
|
||||
if (target.os_tag orelse @import("builtin").os.tag == .windows)
|
||||
if (target.result.os.tag == .windows)
|
||||
// windows is an error in many ways
|
||||
return error.Windows;
|
||||
|
||||
|
@ -25,21 +25,17 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
|
||||
const opts = b.addOptions();
|
||||
opts.addOption([]const u8, "font", cg_opt.term_font);
|
||||
lib.addOptions("opts", opts);
|
||||
lib.root_module.addImport("opts", opts.createModule());
|
||||
|
||||
lib.addModule("nvim", znvim_dep.module("nvim_c"));
|
||||
lib.addModule("znvim", znvim_dep.module("znvim"));
|
||||
lib.root_module.addImport("nvim", znvim_dep.module("nvim_c"));
|
||||
lib.root_module.addImport("znvim", znvim_dep.module("znvim"));
|
||||
|
||||
lib.linkLibC();
|
||||
lib.linkSystemLibrary("luajit");
|
||||
|
||||
lib.strip = switch (mode) {
|
||||
.Debug, .ReleaseSafe => false,
|
||||
.ReleaseFast, .ReleaseSmall => true,
|
||||
};
|
||||
lib.unwind_tables = true;
|
||||
lib.root_module.unwind_tables = true;
|
||||
|
||||
b.getInstallStep().dependOn(&b.addInstallFile(lib.getOutputSource(), "share/nvim/mzte-nv.so").step);
|
||||
b.getInstallStep().dependOn(&b.addInstallFile(lib.getEmittedBin(), "share/nvim/mzte-nv.so").step);
|
||||
|
||||
// this is the install step for the lua config compiler binary
|
||||
const compiler = b.addExecutable(.{
|
||||
|
@ -52,8 +48,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
compiler.linkLibC();
|
||||
compiler.linkSystemLibrary("luajit");
|
||||
|
||||
compiler.strip = mode != .Debug;
|
||||
compiler.unwind_tables = true;
|
||||
compiler.root_module.unwind_tables = true;
|
||||
|
||||
b.installArtifact(compiler);
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
.dependencies = .{
|
||||
.znvim = .{
|
||||
.url = "https://mzte.de/git/LordMZTE/znvim/archive/948e496ffd1222dd468db05d17176c757bbe9b92.tar.gz",
|
||||
.hash = "122048ba32858a12ca090a5fb6f41e35878d2cb9c22b267c2256f6d9cc9724003f9a",
|
||||
.url = "git+https://git.mzte.de/LordMZTE/znvim.git#8e52c461dc071e6b88c8e77e49aa2805f225e7da",
|
||||
.hash = "122029929d792aa32a71c0b98bb67d344d971d269d6fea5b8f8693e29f0f45924951",
|
||||
},
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const std = @import("std");
|
||||
const common = @import("build_common.zig");
|
||||
|
||||
pub fn build(b: *std.build.Builder) !void {
|
||||
pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
|
@ -21,14 +21,8 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
.optimize = optimize,
|
||||
});
|
||||
|
||||
exe.strip = switch (optimize) {
|
||||
.ReleaseFast, .ReleaseSmall => true,
|
||||
.ReleaseSafe, .Debug => false,
|
||||
};
|
||||
mzteinitctl.strip = exe.strip;
|
||||
|
||||
inline for (.{ mzteinitctl, exe }) |e| {
|
||||
e.addModule("ansi-term", ansi_term_mod);
|
||||
e.root_module.addImport("ansi-term", ansi_term_mod);
|
||||
}
|
||||
|
||||
const cg_opt = try common.confgenGet(struct {
|
||||
|
@ -37,7 +31,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
|
||||
const opts = b.addOptions();
|
||||
opts.addOption([]const u8, "gtk_theme", cg_opt.gtk_theme);
|
||||
exe.addOptions("opts", opts);
|
||||
exe.root_module.addImport("opts", opts.createModule());
|
||||
|
||||
b.installArtifact(exe);
|
||||
b.installArtifact(mzteinitctl);
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
.dependencies = .{
|
||||
.ansi_term = .{
|
||||
.url = "https://github.com/ziglibs/ansi-term/archive/1614b61486d567b59abe11a097d11aa6ce679819.tar.gz",
|
||||
.hash = "1220647eea49d2c48d5e59354291e975f813be3cc5a9d9920a50bbfaa40a891a06ee",
|
||||
.url = "git+https://github.com/LordMZTE/ansi-term.git#73c03175068679685535111dbea72cade075719e",
|
||||
.hash = "1220ea86ace34b38e49c1d737c5f857d88346af10695a992b38e10cb0a73b6a19ef7",
|
||||
},
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardOptimizeOption(.{});
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
//const exe = b.addExecutable("playtwitch", "src/main.zig");
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "playtwitch",
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
|
@ -18,8 +17,6 @@ pub fn build(b: *std.build.Builder) void {
|
|||
exe.linkSystemLibrary("glew");
|
||||
exe.linkSystemLibrary("curl");
|
||||
|
||||
exe.strip = optimize != .Debug and optimize != .ReleaseSafe;
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
var logo_install_step = b.addInstallFile(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardOptimizeOption(.{});
|
||||
|
||||
|
@ -10,13 +10,12 @@ pub fn build(b: *std.build.Builder) void {
|
|||
.target = target,
|
||||
.optimize = mode,
|
||||
});
|
||||
exe.strip = mode != .Debug;
|
||||
|
||||
exe.linkLibC();
|
||||
exe.linkSystemLibrary("libgit2");
|
||||
|
||||
exe.addModule("ansi-term", b.dependency("ansi_term", .{}).module("ansi-term"));
|
||||
exe.addModule("known-folders", b.dependency("known_folders", .{}).module("known-folders"));
|
||||
exe.root_module.addImport("ansi-term", b.dependency("ansi_term", .{}).module("ansi-term"));
|
||||
exe.root_module.addImport("known-folders", b.dependency("known_folders", .{}).module("known-folders"));
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
.dependencies = .{
|
||||
.ansi_term = .{
|
||||
.url = "https://github.com/ziglibs/ansi-term/archive/1614b61486d567b59abe11a097d11aa6ce679819.tar.gz",
|
||||
.hash = "1220647eea49d2c48d5e59354291e975f813be3cc5a9d9920a50bbfaa40a891a06ee",
|
||||
.url = "git+https://github.com/LordMZTE/ansi-term.git#73c03175068679685535111dbea72cade075719e",
|
||||
.hash = "1220ea86ace34b38e49c1d737c5f857d88346af10695a992b38e10cb0a73b6a19ef7",
|
||||
},
|
||||
.known_folders = .{
|
||||
.url = "https://github.com/ziglibs/known-folders/archive/8bb4bf761bab20ffed74ffac83c3a9eb4456f28d.tar.gz",
|
||||
.hash = "122002462f37b67a54fa1ab712d870d4637dae0d94437c0077b148e1fb75616c573d",
|
||||
.url = "git+https://github.com/ziglibs/known-folders#806ba01b872820004c7dec3117cb0db66b206af6",
|
||||
.hash = "122094b48dea08e241b48d0ec32e3df6965e814091e3cabaff942e62d053f3ff9b5f",
|
||||
},
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardOptimizeOption(.{});
|
||||
|
||||
|
@ -15,8 +15,6 @@ pub fn build(b: *std.build.Builder) void {
|
|||
exe.linkSystemLibrary("xcb");
|
||||
exe.linkSystemLibrary("xcb-xinerama");
|
||||
|
||||
exe.strip = mode != .Debug;
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
|
|
|
@ -2,12 +2,12 @@ const std = @import("std");
|
|||
|
||||
const Scanner = @import("wayland").Scanner;
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const mode = b.standardOptimizeOption(.{});
|
||||
|
||||
const scanner = Scanner.create(b, .{});
|
||||
const wayland_mod = b.createModule(.{ .source_file = scanner.result });
|
||||
const wayland_mod = scanner.mod;
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "vinput",
|
||||
|
@ -16,7 +16,7 @@ pub fn build(b: *std.build.Builder) void {
|
|||
.optimize = mode,
|
||||
});
|
||||
|
||||
exe.addModule("wayland", wayland_mod);
|
||||
exe.root_module.addImport("wayland", wayland_mod);
|
||||
|
||||
scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml");
|
||||
|
||||
|
@ -26,12 +26,7 @@ pub fn build(b: *std.build.Builder) void {
|
|||
scanner.generate("wl_shm", 1);
|
||||
scanner.generate("xdg_wm_base", 3);
|
||||
|
||||
exe.linkLibC();
|
||||
exe.linkSystemLibrary("wayland-client");
|
||||
|
||||
exe.strip = mode != .Debug;
|
||||
|
||||
scanner.addCSource(exe);
|
||||
exe.root_module.linkSystemLibrary("wayland-client", .{});
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
.name = "vinput",
|
||||
.version = "0.0.0",
|
||||
.paths = .{""},
|
||||
|
||||
.dependencies = .{
|
||||
.wayland = .{
|
||||
.url = "https://git.mzte.de/LordMZTE/zig-wayland/archive/cbd535c4666a04f20bb303dc6485ec51d7db8bf5.tar.gz",
|
||||
.hash = "1220d3aa22102fa17a6870d241a9541e6810d79d2a69c1ccca71ac90c825b26dd9e1",
|
||||
}
|
||||
}
|
||||
.url = "git+https://git.mzte.de/LordMZTE/zig-wayland#4de9f2d6d5fddae1fbb29e21fd1dae69e646ab7d",
|
||||
.hash = "1220d6448c277e5c41348aa95ce2ba2fc92a92cb7a9e9783edf0f816cd0260122d31",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -11,11 +11,6 @@ pub fn build(b: *std.Build) void {
|
|||
.optimize = optimize,
|
||||
});
|
||||
|
||||
exe.strip = switch (optimize) {
|
||||
.ReleaseSafe, .Debug => false,
|
||||
.ReleaseFast, .ReleaseSmall => true,
|
||||
};
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
|
|
|
@ -7,7 +7,7 @@ pub fn build(b: *std.Build) void {
|
|||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const scanner = Scanner.create(b, .{});
|
||||
const wayland_mod = b.createModule(.{ .source_file = scanner.result });
|
||||
const wayland_mod = scanner.mod;
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "wlbg",
|
||||
|
@ -16,11 +16,11 @@ pub fn build(b: *std.Build) void {
|
|||
.optimize = optimize,
|
||||
});
|
||||
|
||||
exe.addModule("xev", b.dependency("xev", .{
|
||||
exe.root_module.addImport("xev", b.dependency("xev", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}).module("xev"));
|
||||
exe.addModule("wayland", wayland_mod);
|
||||
exe.root_module.addImport("wayland", wayland_mod);
|
||||
|
||||
scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml");
|
||||
scanner.addSystemProtocol("unstable/xdg-output/xdg-output-unstable-v1.xml");
|
||||
|
@ -34,12 +34,10 @@ pub fn build(b: *std.Build) void {
|
|||
scanner.generate("wl_seat", 8);
|
||||
scanner.generate("wl_output", 4);
|
||||
|
||||
exe.linkLibC();
|
||||
exe.linkSystemLibrary("wayland-client");
|
||||
exe.linkSystemLibrary("wayland-egl");
|
||||
exe.linkSystemLibrary("EGL");
|
||||
exe.linkSystemLibrary("GLESv2");
|
||||
scanner.addCSource(exe);
|
||||
exe.root_module.linkSystemLibrary("wayland-client", .{});
|
||||
exe.root_module.linkSystemLibrary("wayland-egl", .{});
|
||||
exe.root_module.linkSystemLibrary("EGL", .{});
|
||||
exe.root_module.linkSystemLibrary("GLESv2", .{});
|
||||
|
||||
b.installArtifact(exe);
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
.paths = .{""},
|
||||
.dependencies = .{
|
||||
.wayland = .{
|
||||
.url = "https://git.mzte.de/LordMZTE/zig-wayland/archive/cbd535c4666a04f20bb303dc6485ec51d7db8bf5.tar.gz",
|
||||
.hash = "1220d3aa22102fa17a6870d241a9541e6810d79d2a69c1ccca71ac90c825b26dd9e1",
|
||||
.url = "git+https://git.mzte.de/LordMZTE/zig-wayland#4de9f2d6d5fddae1fbb29e21fd1dae69e646ab7d",
|
||||
.hash = "1220d6448c277e5c41348aa95ce2ba2fc92a92cb7a9e9783edf0f816cd0260122d31",
|
||||
},
|
||||
.xev = .{
|
||||
.url = "https://github.com/mitchellh/libxev/archive/7eada4333c36b3e16f4dc2abad707149ef7b6de5.tar.gz",
|
||||
.hash = "1220be2c7b3f3a07b9150720140c7038f454a9ce0cbc5d303767c1e4a50856ec1b01",
|
||||
.url = "git+https://github.com/mitchellh/libxev#2494978bedec01a856e8f3c47a33148ad1755fab",
|
||||
.hash = "12203de3dbf9c235903c71122448ef031622ba8d64b250205934e2a65018b92b9717",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue