mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
remove deps that were already provided by other packages (#797)
This commit is contained in:
40
build.zig
40
build.zig
@ -714,7 +714,9 @@ fn addDeps(
|
|||||||
|
|
||||||
// We always require the system SDK so that our system headers are available.
|
// We always require the system SDK so that our system headers are available.
|
||||||
// This makes things like `os/log.h` available for cross-compiling.
|
// This makes things like `os/log.h` available for cross-compiling.
|
||||||
try addSystemSDK(b, step);
|
if (step.target.isDarwin()) {
|
||||||
|
try @import("apple_sdk").addPaths(b, step);
|
||||||
|
}
|
||||||
|
|
||||||
// We always need the Zig packages
|
// We always need the Zig packages
|
||||||
// TODO: This can't be the right way to use the new Zig modules system,
|
// TODO: This can't be the right way to use the new Zig modules system,
|
||||||
@ -812,17 +814,8 @@ fn addDeps(
|
|||||||
.none => {},
|
.none => {},
|
||||||
|
|
||||||
.glfw => {
|
.glfw => {
|
||||||
const glfw_dep = b.dependency("glfw", .{
|
|
||||||
.target = step.target,
|
|
||||||
.optimize = step.optimize,
|
|
||||||
.x11 = step.target.isLinux(),
|
|
||||||
.wayland = step.target.isLinux(),
|
|
||||||
.metal = step.target.isDarwin(),
|
|
||||||
});
|
|
||||||
|
|
||||||
step.addModule("glfw", mach_glfw_dep.module("mach-glfw"));
|
step.addModule("glfw", mach_glfw_dep.module("mach-glfw"));
|
||||||
step.linkLibrary(mach_glfw_dep.artifact("mach-glfw"));
|
@import("mach_glfw").link(mach_glfw_dep.builder, step);
|
||||||
step.linkLibrary(glfw_dep.artifact("glfw"));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
.gtk => {
|
.gtk => {
|
||||||
@ -835,31 +828,6 @@ fn addDeps(
|
|||||||
return static_libs;
|
return static_libs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds the proper system headers for the target.
|
|
||||||
fn addSystemSDK(
|
|
||||||
b: *std.Build,
|
|
||||||
step: *std.Build.CompileStep,
|
|
||||||
) !void {
|
|
||||||
if (step.target.isDarwin()) {
|
|
||||||
try @import("apple_sdk").addPaths(b, step);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (step.target.isLinux()) {
|
|
||||||
step.linkLibrary(b.dependency("x11_headers", .{
|
|
||||||
.target = step.target,
|
|
||||||
.optimize = step.optimize,
|
|
||||||
}).artifact("x11-headers"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// GLFW requires these on all platforms so we just add them here. It
|
|
||||||
// doesn't hurt to add them if we don't use GLFW since they're all
|
|
||||||
// namespaced.
|
|
||||||
step.linkLibrary(b.dependency("vulkan_headers", .{
|
|
||||||
.target = step.target,
|
|
||||||
.optimize = step.optimize,
|
|
||||||
}).artifact("vulkan-headers"));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn benchSteps(
|
fn benchSteps(
|
||||||
b: *std.Build,
|
b: *std.Build,
|
||||||
target: std.zig.CrossTarget,
|
target: std.zig.CrossTarget,
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
.paths = .{""},
|
.paths = .{""},
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
// Zig libs
|
// Zig libs
|
||||||
.glfw = .{
|
|
||||||
.url = "https://pkg.machengine.org/glfw/14181bd28aa65915262ac3b4549bbd2dc70bbaa5.tar.gz",
|
|
||||||
.hash = "1220c6bb317ae3948b95161b9706777dde0509e72e8b35b62b92898aef801897d904",
|
|
||||||
},
|
|
||||||
.libxev = .{
|
.libxev = .{
|
||||||
.url = "https://github.com/mitchellh/libxev/archive/5ecbc871f3bfa80fb7bf0fa853866cb93b99bc18.tar.gz",
|
.url = "https://github.com/mitchellh/libxev/archive/5ecbc871f3bfa80fb7bf0fa853866cb93b99bc18.tar.gz",
|
||||||
.hash = "1220416854e424601ecc9814afb461a5dc9cf95db5917d82f794594a58ffc723b82c",
|
.hash = "1220416854e424601ecc9814afb461a5dc9cf95db5917d82f794594a58ffc723b82c",
|
||||||
@ -43,13 +39,5 @@
|
|||||||
|
|
||||||
// System headers
|
// System headers
|
||||||
.apple_sdk = .{ .path = "./pkg/apple-sdk" },
|
.apple_sdk = .{ .path = "./pkg/apple-sdk" },
|
||||||
.vulkan_headers = .{
|
|
||||||
.url = "https://pkg.machengine.org/vulkan-headers/fc495148a910ac7817ce0ec2d5948231806f2ac0.tar.gz",
|
|
||||||
.hash = "12209aeba80369fa8638b82179b47e6742adb98a3a5b01bc518565504a922baad3e4",
|
|
||||||
},
|
|
||||||
.x11_headers = .{
|
|
||||||
.url = "https://pkg.machengine.org/x11-headers/26d12e9fc0d893085bcb711088a4a19afdff1adc.tar.gz",
|
|
||||||
.hash = "1220371a61d8bb57fce8ee1741f623cc19b0edd7d1b4adc9918663f8a7ef08aa4f3f",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user