mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
pkg/harfbuzz: download source using zig package manager
This commit is contained in:
@ -14,6 +14,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
.@"enable-libpng" = true,
|
.@"enable-libpng" = true,
|
||||||
});
|
});
|
||||||
const macos = b.dependency("macos", .{ .target = target, .optimize = optimize });
|
const macos = b.dependency("macos", .{ .target = target, .optimize = optimize });
|
||||||
|
const upstream = b.dependency("harfbuzz", .{});
|
||||||
|
|
||||||
const module = b.addModule("harfbuzz", .{
|
const module = b.addModule("harfbuzz", .{
|
||||||
.source_file = .{ .path = "main.zig" },
|
.source_file = .{ .path = "main.zig" },
|
||||||
@ -23,8 +24,6 @@ pub fn build(b: *std.Build) !void {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const upstream_root = "../../vendor/harfbuzz";
|
|
||||||
|
|
||||||
const lib = b.addStaticLibrary(.{
|
const lib = b.addStaticLibrary(.{
|
||||||
.name = "harfbuzz",
|
.name = "harfbuzz",
|
||||||
.target = target,
|
.target = target,
|
||||||
@ -32,7 +31,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
});
|
});
|
||||||
lib.linkLibC();
|
lib.linkLibC();
|
||||||
lib.linkLibCpp();
|
lib.linkLibCpp();
|
||||||
lib.addIncludePath(.{ .path = upstream_root ++ "/src" });
|
lib.addIncludePath(upstream.path("src"));
|
||||||
|
|
||||||
const freetype_dep = b.dependency("freetype", .{ .target = target, .optimize = optimize });
|
const freetype_dep = b.dependency("freetype", .{ .target = target, .optimize = optimize });
|
||||||
lib.linkLibrary(freetype_dep.artifact("freetype"));
|
lib.linkLibrary(freetype_dep.artifact("freetype"));
|
||||||
@ -65,11 +64,11 @@ pub fn build(b: *std.Build) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lib.addCSourceFile(.{
|
lib.addCSourceFile(.{
|
||||||
.file = .{ .path = upstream_root ++ "/src/harfbuzz.cc" },
|
.file = upstream.path("src/harfbuzz.cc"),
|
||||||
.flags = flags.items,
|
.flags = flags.items,
|
||||||
});
|
});
|
||||||
lib.installHeadersDirectoryOptions(.{
|
lib.installHeadersDirectoryOptions(.{
|
||||||
.source_dir = .{ .path = upstream_root ++ "/src" },
|
.source_dir = upstream.path("src"),
|
||||||
.install_dir = .header,
|
.install_dir = .header,
|
||||||
.install_subdir = "",
|
.install_subdir = "",
|
||||||
.include_extensions = &.{".h"},
|
.include_extensions = &.{".h"},
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
.name = "harfbuzz",
|
.name = "harfbuzz",
|
||||||
.version = "2.13.2",
|
.version = "2.13.2",
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
|
.harfbuzz = .{
|
||||||
|
.url = "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/8.2.1.tar.gz",
|
||||||
|
.hash = "12203c1b09a2cf778367376076301322235816598eaf0639da08b233ab852548df92",
|
||||||
|
},
|
||||||
|
|
||||||
.freetype = .{ .path = "../freetype" },
|
.freetype = .{ .path = "../freetype" },
|
||||||
.macos = .{ .path = "../macos" },
|
.macos = .{ .path = "../macos" },
|
||||||
.apple_sdk = .{ .path = "../apple-sdk" },
|
.apple_sdk = .{ .path = "../apple-sdk" },
|
||||||
|
Reference in New Issue
Block a user