mirror of
https://github.com/MorizzG/gentoo-mg.git
synced 2026-03-21 15:40:07 +00:00
ghostty: update to 1.3.0
This commit is contained in:
parent
6e66b90b78
commit
14417e494f
5 changed files with 451 additions and 0 deletions
|
|
@ -0,0 +1,75 @@
|
|||
From 1a181d48ec4d15bee6d8dd65ecb6f393b3ecc4e2 Mon Sep 17 00:00:00 2001
|
||||
From: sin-ack <sin-ack@protonmail.com>
|
||||
Date: Tue, 16 Sep 2025 21:41:07 +0000
|
||||
Subject: [PATCH] build: Disable terminfo database installation
|
||||
|
||||
Database installation is unconditional in Ghostty and causes conflicts
|
||||
with newer ncurses versions which have the database merged in.
|
||||
|
||||
Bug: https://bugs.gentoo.org/948830
|
||||
Signed-off-by: sin-ack <sin-ack@protonmail.com>
|
||||
---
|
||||
src/build/GhosttyResources.zig | 40 ----------------------------------
|
||||
1 file changed, 40 deletions(-)
|
||||
|
||||
diff --git a/src/build/GhosttyResources.zig b/src/build/GhosttyResources.zig
|
||||
index 6f857655b..69a249648 100644
|
||||
--- a/src/build/GhosttyResources.zig
|
||||
+++ b/src/build/GhosttyResources.zig
|
||||
@@ -30,10 +30,6 @@ pub fn init(b: *std.Build, cfg: *const Config, deps: *const SharedDeps) !Ghostty
|
||||
// Terminfo
|
||||
terminfo: {
|
||||
const os_tag = cfg.target.result.os.tag;
|
||||
- const terminfo_share_dir = if (os_tag == .freebsd)
|
||||
- "site-terminfo"
|
||||
- else
|
||||
- "terminfo";
|
||||
|
||||
// Encode our terminfo
|
||||
const run = b.addRunArtifact(build_data_exe);
|
||||
@@ -76,42 +72,6 @@ pub fn init(b: *std.Build, cfg: *const Config, deps: *const SharedDeps) !Ghostty
|
||||
|
||||
try steps.append(b.allocator, &cap_install.step);
|
||||
}
|
||||
-
|
||||
- // Compile the terminfo source into a terminfo database
|
||||
- {
|
||||
- const run_step = RunStep.create(b, "tic");
|
||||
- run_step.addArgs(&.{ "tic", "-x", "-o" });
|
||||
- const path = run_step.addOutputFileArg(terminfo_share_dir);
|
||||
-
|
||||
- run_step.addFileArg(source);
|
||||
- _ = run_step.captureStdErr(); // so we don't see stderr
|
||||
-
|
||||
- // Ensure that `share/terminfo` is a directory, otherwise the `cp
|
||||
- // -R` will create a file named `share/terminfo`
|
||||
- const mkdir_step = RunStep.create(b, "make share/terminfo directory");
|
||||
- switch (cfg.target.result.os.tag) {
|
||||
- // windows mkdir shouldn't need "-p"
|
||||
- .windows => mkdir_step.addArgs(&.{"mkdir"}),
|
||||
- else => mkdir_step.addArgs(&.{ "mkdir", "-p" }),
|
||||
- }
|
||||
-
|
||||
- mkdir_step.addArg(b.fmt(
|
||||
- "{s}/share/{s}",
|
||||
- .{ b.install_path, terminfo_share_dir },
|
||||
- ));
|
||||
-
|
||||
- try steps.append(b.allocator, &mkdir_step.step);
|
||||
-
|
||||
- // Use cp -R instead of Step.InstallDir because we need to preserve
|
||||
- // symlinks in the terminfo database. Zig's InstallDir step doesn't
|
||||
- // handle symlinks correctly yet.
|
||||
- const copy_step = RunStep.create(b, "copy terminfo db");
|
||||
- copy_step.addArgs(&.{ "cp", "-R" });
|
||||
- copy_step.addFileArg(path);
|
||||
- copy_step.addArg(b.fmt("{s}/share", .{b.install_path}));
|
||||
- copy_step.step.dependOn(&mkdir_step.step);
|
||||
- try steps.append(b.allocator, ©_step.step);
|
||||
- }
|
||||
}
|
||||
|
||||
// Shell-integration
|
||||
--
|
||||
2.52.0
|
||||
|
||||
26
x11-terms/ghostty/files/ghostty-1.3.0-bzip2-dependency.patch
Normal file
26
x11-terms/ghostty/files/ghostty-1.3.0-bzip2-dependency.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
From cee948f8e178a7ac5882438590da8aee3317cbb4 Mon Sep 17 00:00:00 2001
|
||||
From: sin-ack <sin-ack@protonmail.com>
|
||||
Date: Thu, 30 Jan 2025 22:44:34 +0000
|
||||
Subject: [PATCH] build: Fix bzip2 system dependency name
|
||||
|
||||
Signed-off-by: sin-ack <sin-ack@protonmail.com>
|
||||
---
|
||||
src/build/SharedDeps.zig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/build/SharedDeps.zig b/src/build/SharedDeps.zig
|
||||
index 9276c9914..654f5f96f 100644
|
||||
--- a/src/build/SharedDeps.zig
|
||||
+++ b/src/build/SharedDeps.zig
|
||||
@@ -149,7 +149,7 @@ pub fn add(
|
||||
);
|
||||
|
||||
if (b.systemIntegrationOption("freetype", .{})) {
|
||||
- step.linkSystemLibrary2("bzip2", dynamic_link_opts);
|
||||
+ step.linkSystemLibrary2("bz2", dynamic_link_opts);
|
||||
step.linkSystemLibrary2("freetype2", dynamic_link_opts);
|
||||
} else {
|
||||
step.linkLibrary(freetype_dep.artifact("freetype"));
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
From 23388369aa707ae77f6e9bbf19ce4c68ac83380d Mon Sep 17 00:00:00 2001
|
||||
From: sin-ack <sin-ack@protonmail.com>
|
||||
Date: Mon, 9 Mar 2026 22:31:51 +0000
|
||||
Subject: [PATCH] font/harfbuzz: Disable failing tests
|
||||
|
||||
Link: https://github.com/ghostty-org/ghostty/discussions/11281
|
||||
---
|
||||
src/font/shaper/harfbuzz.zig | 123 -----------------------------------
|
||||
1 file changed, 123 deletions(-)
|
||||
|
||||
diff --git a/src/font/shaper/harfbuzz.zig b/src/font/shaper/harfbuzz.zig
|
||||
index b1126dd4e..9dfd2b62f 100644
|
||||
--- a/src/font/shaper/harfbuzz.zig
|
||||
+++ b/src/font/shaper/harfbuzz.zig
|
||||
@@ -1078,69 +1078,6 @@ test "shape Devanagari string" {
|
||||
try testing.expect(try it.next(alloc) == null);
|
||||
}
|
||||
|
||||
-test "shape Tai Tham vowels (position differs from advance)" {
|
||||
- // Note that while this test was necessary for CoreText, the old logic was
|
||||
- // working for HarfBuzz. Still we keep it to ensure it has the correct
|
||||
- // behavior.
|
||||
- const testing = std.testing;
|
||||
- const alloc = testing.allocator;
|
||||
-
|
||||
- // We need a font that supports Tai Tham for this to work, if we can't find
|
||||
- // Noto Sans Tai Tham, which is a system font on macOS, we just skip the
|
||||
- // test.
|
||||
- var testdata = testShaperWithDiscoveredFont(
|
||||
- alloc,
|
||||
- "Noto Sans Tai Tham",
|
||||
- ) catch return error.SkipZigTest;
|
||||
- defer testdata.deinit();
|
||||
-
|
||||
- var buf: [32]u8 = undefined;
|
||||
- var buf_idx: usize = 0;
|
||||
- buf_idx += try std.unicode.utf8Encode(0x1a2F, buf[buf_idx..]); // ᨯ
|
||||
- buf_idx += try std.unicode.utf8Encode(0x1a70, buf[buf_idx..]); // ᩰ
|
||||
-
|
||||
- // Make a screen with some data
|
||||
- var t = try terminal.Terminal.init(alloc, .{ .cols = 30, .rows = 3 });
|
||||
- defer t.deinit(alloc);
|
||||
-
|
||||
- // Enable grapheme clustering
|
||||
- t.modes.set(.grapheme_cluster, true);
|
||||
-
|
||||
- var s = t.vtStream();
|
||||
- defer s.deinit();
|
||||
- try s.nextSlice(buf[0..buf_idx]);
|
||||
-
|
||||
- var state: terminal.RenderState = .empty;
|
||||
- defer state.deinit(alloc);
|
||||
- try state.update(alloc, &t);
|
||||
-
|
||||
- // Get our run iterator
|
||||
- var shaper = &testdata.shaper;
|
||||
- var it = shaper.runIterator(.{
|
||||
- .grid = testdata.grid,
|
||||
- .cells = state.row_data.get(0).cells.slice(),
|
||||
- });
|
||||
- var count: usize = 0;
|
||||
- while (try it.next(alloc)) |run| {
|
||||
- count += 1;
|
||||
-
|
||||
- const cells = try shaper.shape(run);
|
||||
- try testing.expectEqual(@as(usize, 2), cells.len);
|
||||
- try testing.expectEqual(@as(u16, 0), cells[0].x);
|
||||
- try testing.expectEqual(@as(u16, 0), cells[1].x);
|
||||
-
|
||||
- // The first glyph renders in the next cell. We expect the x_offset
|
||||
- // to equal the cell width. However, with FreeType the cell_width is
|
||||
- // computed from ASCII glyphs, and Noto Sans Tai Tham only has the
|
||||
- // space character in ASCII (with a 3px advance), so the cell_width
|
||||
- // metric doesn't match the actual Tai Tham glyph positioning.
|
||||
- const expected_x_offset: i16 = if (comptime font.options.backend.hasFreetype()) 7 else @intCast(run.grid.metrics.cell_width);
|
||||
- try testing.expectEqual(expected_x_offset, cells[0].x_offset);
|
||||
- try testing.expectEqual(@as(i16, 0), cells[1].x_offset);
|
||||
- }
|
||||
- try testing.expectEqual(@as(usize, 1), count);
|
||||
-}
|
||||
-
|
||||
test "shape Tibetan characters" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
@@ -1194,66 +1131,6 @@ test "shape Tibetan characters" {
|
||||
try testing.expectEqual(@as(usize, 1), count);
|
||||
}
|
||||
|
||||
-test "shape Tai Tham letters (run_offset.y differs from zero)" {
|
||||
- const testing = std.testing;
|
||||
- const alloc = testing.allocator;
|
||||
-
|
||||
- // We need a font that supports Tai Tham for this to work, if we can't find
|
||||
- // Noto Sans Tai Tham, which is a system font on macOS, we just skip the
|
||||
- // test.
|
||||
- var testdata = testShaperWithDiscoveredFont(
|
||||
- alloc,
|
||||
- "Noto Sans Tai Tham",
|
||||
- ) catch return error.SkipZigTest;
|
||||
- defer testdata.deinit();
|
||||
-
|
||||
- var buf: [32]u8 = undefined;
|
||||
- var buf_idx: usize = 0;
|
||||
-
|
||||
- // First grapheme cluster:
|
||||
- buf_idx += try std.unicode.utf8Encode(0x1a49, buf[buf_idx..]); // HA
|
||||
- buf_idx += try std.unicode.utf8Encode(0x1a60, buf[buf_idx..]); // SAKOT
|
||||
- // Second grapheme cluster, combining with the first in a ligature:
|
||||
- buf_idx += try std.unicode.utf8Encode(0x1a3f, buf[buf_idx..]); // YA
|
||||
- buf_idx += try std.unicode.utf8Encode(0x1a69, buf[buf_idx..]); // U
|
||||
-
|
||||
- // Make a screen with some data
|
||||
- var t = try terminal.Terminal.init(alloc, .{ .cols = 30, .rows = 3 });
|
||||
- defer t.deinit(alloc);
|
||||
-
|
||||
- // Enable grapheme clustering
|
||||
- t.modes.set(.grapheme_cluster, true);
|
||||
-
|
||||
- var s = t.vtStream();
|
||||
- defer s.deinit();
|
||||
- try s.nextSlice(buf[0..buf_idx]);
|
||||
-
|
||||
- var state: terminal.RenderState = .empty;
|
||||
- defer state.deinit(alloc);
|
||||
- try state.update(alloc, &t);
|
||||
-
|
||||
- // Get our run iterator
|
||||
- var shaper = &testdata.shaper;
|
||||
- var it = shaper.runIterator(.{
|
||||
- .grid = testdata.grid,
|
||||
- .cells = state.row_data.get(0).cells.slice(),
|
||||
- });
|
||||
- var count: usize = 0;
|
||||
- while (try it.next(alloc)) |run| {
|
||||
- count += 1;
|
||||
-
|
||||
- const cells = try shaper.shape(run);
|
||||
- try testing.expectEqual(@as(usize, 3), cells.len);
|
||||
- try testing.expectEqual(@as(u16, 0), cells[0].x);
|
||||
- try testing.expectEqual(@as(u16, 0), cells[1].x);
|
||||
- try testing.expectEqual(@as(u16, 0), cells[2].x); // U from second grapheme
|
||||
-
|
||||
- // The U glyph renders at a y below zero
|
||||
- try testing.expectEqual(@as(i16, -3), cells[2].y_offset);
|
||||
- }
|
||||
- try testing.expectEqual(@as(usize, 1), count);
|
||||
-}
|
||||
-
|
||||
test "shape Javanese ligatures" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
--
|
||||
2.52.0
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue