summaryrefslogtreecommitdiff
path: root/x11-terms/ghostty
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-15 06:41:45 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-15 06:41:45 +0000
commit8e26aeaca2a19592a9eea3917f3139bfde8641f0 (patch)
tree3ddb856d2a1de70a5caf3b8f7737425b7f8b0796 /x11-terms/ghostty
parent6e1fc32629c46e29012a7e22b07085307d65ac96 (diff)
gentoo auto-resync : 15:01:2025 - 06:41:45
Diffstat (limited to 'x11-terms/ghostty')
-rw-r--r--x11-terms/ghostty/Manifest3
-rw-r--r--x11-terms/ghostty/files/ghostty-1.0.1-apprt-gtk-move-most-version-checks-to-runtime.patch125
-rw-r--r--x11-terms/ghostty/ghostty-1.0.1-r2.ebuild (renamed from x11-terms/ghostty/ghostty-1.0.1-r1.ebuild)1
3 files changed, 128 insertions, 1 deletions
diff --git a/x11-terms/ghostty/Manifest b/x11-terms/ghostty/Manifest
index dde9f92e7ebc..71304891d9b1 100644
--- a/x11-terms/ghostty/Manifest
+++ b/x11-terms/ghostty/Manifest
@@ -1,4 +1,5 @@
AUX ghostty-1.0.0-bzip2-dependency.patch 560 BLAKE2B f737d770da6e8a84098655d6983ccad70a22952b7bcabce9d9d34032ebb69c5427458347a4118944587b238854e1c579c923aac3e91d76f3f2660e8cf43afd35 SHA512 efde14f8d15afd7c169c30cbe5ab7ce4928ae6869e02cac4e2c8a6cac3f9604aed7bd43a40fcc975070c80802cfdcba10e63e1473e36ae2a65e9912dfee34b18
+AUX ghostty-1.0.1-apprt-gtk-move-most-version-checks-to-runtime.patch 5981 BLAKE2B d1b097036b690d749d83fefe2e624874667fd32f28196951739da8b57da944f142b20532a7fd5d97ad563d35982a822e51789cdc822a0b353b67420b593fb248 SHA512 82999010bd7f1540850456ae7ef924a72dff5c009a9798c5c94a21e13c4d8d14ecc11317f76b03aec3c36dae8fa99473f6dbde329478ca32801cac1b98f7a98f
AUX ghostty-1.0.1-copy-terminfo-using-installdir.patch 2103 BLAKE2B 342d75c0b8555828f836c751679f2c36953a1640a2c8e4a021ac75689e5687ad7895b3e16e1bdded78d45d2c6711777b2df4f5d1e945e557fed987dced551f17 SHA512 eec5fdda83a104b338db2a0f47e1b44a99311ea2b6196783c14ad36c993365909c234ce47cc3616e5790d3e4eaccfe059b5c5b9a2dec6b812e77f3ac91f3a15f
DIST breakpad-12207fd37bb8251919c112dcdd8f616a491857b34a451f7e4486490077206dc2a1ea.tar.gz 5475126 BLAKE2B 67af8bc3227723e9056eb5d7e6f85809037d1b6f62c57bf447b04648c43c299a3840ac7a9ced2431343beb47332079c1827fd4d0a301fe0c6b24992f9b1b6fd9 SHA512 740b70daaf150a7619839f467eea6dc6d5dcd599861a977b1638c308b7902cb2de5d3927081143c2314e9b0c46c07d646ecec0e9e8d5097ddaa958766c07074d
DIST fontconfig-12201149afb3326c56c05bb0a577f54f76ac20deece63aa2f5cd6ff31a4fa4fcb3b7.tar.gz 2122247 BLAKE2B c8f6a33b62141eb732e74194076627072fc7dca19eea797ae256e169f07e4722f47e20e65ffd3152bfb7c98eb5e8a5bc1b5d90b22640c911889c4f29fb2f7e34 SHA512 73287cc3f8f8261a27c2920b0f9430dd6e3ac8733fb2ba55e1b5934cee211023b6415e1d14ddad04ef3c7819727ed34d80aa503d2734bdfc2f1c733c4096463f
@@ -33,5 +34,5 @@ DIST zig_js-12205a66d423259567764fa0fc60c82be35365c21aeb76c5a7dc99698401f4f6fefc
DIST zigimg-1220dd654ef941fc76fd96f9ec6adadf83f69b9887a0d3f4ee5ac0a1a3e11be35cf5.tar.gz 132016 BLAKE2B ef50ad59811637d16b8eabfa4c16243fe48ff0de032f3de405af8cfea841d6320e34b9fb6e3c5bbdd8cb90681a69c7f82e6a8d2bce264de7e931b69998180560 SHA512 188173710eeeca319338c6d35fbfb6948f6ac5f8a354492db5d32d654e684c2f441676ea0160985969128aa0489a6ce841e700c721bd7d22c45d13b48f977c33
DIST ziglyph-12207831bce7d4abce57b5a98e8f3635811cfefd160bca022eb91fe905d36a02cf25.tar.gz 562290 BLAKE2B bc5efc55442634c17357182d71881b3ae8d92b338abaaeb25d0ec548fa4d940d0c0efd5b281167a6d02d20213261799ba3008f4513a5014cf7d9f92c7b6f0322 SHA512 b7d5502bc03a0396a064080ddaebf503ab35e13384fe3e332832f64696c241d5f978997816c09d8e855173ccc7d312244397f5f8076a4d207b065bd6f304ff0e
DIST zlib-1220fed0c74e1019b3ee29edae2051788b080cd96e90d56836eea857b0b966742efb.tar.gz 1572744 BLAKE2B 6d15d8f3c8feaf602043bb6e72316ee721c33ef24e110e3bf03fb12eac9703fd29e352268d202ecd2f18b526b4f1dbd90c8046e01ad8e64ddce3e55ad5db513e SHA512 8c9642495bafd6fad4ab9fb67f09b268c69ff9af0f4f20cf15dfc18852ff1f312bd8ca41de761b3f8d8e90e77d79f2ccacd3d4c5b19e475ecf09d021fdfe9088
-EBUILD ghostty-1.0.1-r1.ebuild 8650 BLAKE2B 1e1c0bd08216f848b2b2520b36b91a3fbb5c898436c961705a13432126f824ff4cf62de0715cf545fd79b30e2dc3396dcba19f8c3a974b17445529d38d8f23d4 SHA512 5e46d161ef9e65bc45524c7136ded0867b98b5cd536148264943166f39b6aadcae5bbb6e44721b721ec24df9c23b459f0313e19303eb08c30370ad5627e10749
+EBUILD ghostty-1.0.1-r2.ebuild 8729 BLAKE2B 942a089917b18a9906160a8cecfe2f33255a5a21f98cb760bb5af7a4d46ff33ed57c7f5efd77345c8d23b2c4a2c3410f93bd73fa4dc217a7996c2dd080723656 SHA512 c7fa9acf21916b30a22060c24defc9d35196413fc71ae20ec2b43fe5fa9b868b19b47f4232aed9da3f2b61d3134d1d0657ca663901d2a3922456dbfee943c087
MISC metadata.xml 1256 BLAKE2B d39c386cd087e0503b8f4387199e18e17fe3889f8195c8cfa6f91bb8549f2674767bad65aa47a0abb3f266c665658a7944b25d8ea4f9feb9f4c15f5d1f71d795 SHA512 494ddcb89c8ae6cc0a1ca46b24ccedf29f25d117cfeb7c53f3e36c1b260d7c548571de96e0bf218f20be9a3dc6c1b60d546f6e92ad279e4157abb8e800b782e5
diff --git a/x11-terms/ghostty/files/ghostty-1.0.1-apprt-gtk-move-most-version-checks-to-runtime.patch b/x11-terms/ghostty/files/ghostty-1.0.1-apprt-gtk-move-most-version-checks-to-runtime.patch
new file mode 100644
index 000000000000..f8dca8663911
--- /dev/null
+++ b/x11-terms/ghostty/files/ghostty-1.0.1-apprt-gtk-move-most-version-checks-to-runtime.patch
@@ -0,0 +1,125 @@
+From 83bb35ffa3dae7093b829aec380d1ef322a10efb Mon Sep 17 00:00:00 2001
+From: sin-ack <sin-ack@protonmail.com>
+Date: Tue, 7 Jan 2025 19:12:53 +0000
+Subject: [PATCH 1/2] apprt/gtk: Add version.runtimeAtLeast
+
+This will be used for version checks that are independent of the version
+of GTK we built against.
+---
+ src/apprt/gtk/version.zig | 38 ++++++++++++++++++++++++++++++--------
+ 1 file changed, 30 insertions(+), 8 deletions(-)
+
+diff --git a/src/apprt/gtk/version.zig b/src/apprt/gtk/version.zig
+index af7ad12ea0..d8686fa28a 100644
+--- a/src/apprt/gtk/version.zig
++++ b/src/apprt/gtk/version.zig
+@@ -7,6 +7,11 @@ const c = @import("c.zig").c;
+ /// in the headers. If it is run in a runtime context, it will
+ /// check the actual version of the library we are linked against.
+ ///
++/// This function should be used in cases where the version check
++/// would affect code generation, such as using symbols that are
++/// only available beyond a certain version. For checks which only
++/// depend on GTK's runtime behavior, use `runtimeAtLeast`.
++///
+ /// This is inlined so that the comptime checks will disable the
+ /// runtime checks if the comptime checks fail.
+ pub inline fn atLeast(
+@@ -26,6 +31,20 @@ pub inline fn atLeast(
+ // If we're in comptime then we can't check the runtime version.
+ if (@inComptime()) return true;
+
++ return runtimeAtLeast(major, minor, micro);
++}
++
++/// Verifies that the GTK version at runtime is at least the given
++/// version.
++///
++/// This function should be used in cases where the only the runtime
++/// behavior is affected by the version check. For checks which would
++/// affect code generation, use `atLeast`.
++pub inline fn runtimeAtLeast(
++ comptime major: u16,
++ comptime minor: u16,
++ comptime micro: u16,
++) bool {
+ // We use the functions instead of the constants such as
+ // c.GTK_MINOR_VERSION because the function gets the actual
+ // runtime version.
+@@ -44,15 +63,18 @@ test "atLeast" {
+ const std = @import("std");
+ const testing = std.testing;
+
+- try testing.expect(atLeast(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION));
++ const funs = &.{ atLeast, runtimeAtLeast };
++ inline for (funs) |fun| {
++ try testing.expect(fun(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION));
+
+- try testing.expect(!atLeast(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION + 1));
+- try testing.expect(!atLeast(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION + 1, c.GTK_MICRO_VERSION));
+- try testing.expect(!atLeast(c.GTK_MAJOR_VERSION + 1, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION));
++ try testing.expect(!fun(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION + 1));
++ try testing.expect(!fun(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION + 1, c.GTK_MICRO_VERSION));
++ try testing.expect(!fun(c.GTK_MAJOR_VERSION + 1, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION));
+
+- try testing.expect(atLeast(c.GTK_MAJOR_VERSION - 1, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION));
+- try testing.expect(atLeast(c.GTK_MAJOR_VERSION - 1, c.GTK_MINOR_VERSION + 1, c.GTK_MICRO_VERSION));
+- try testing.expect(atLeast(c.GTK_MAJOR_VERSION - 1, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION + 1));
++ try testing.expect(fun(c.GTK_MAJOR_VERSION - 1, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION));
++ try testing.expect(fun(c.GTK_MAJOR_VERSION - 1, c.GTK_MINOR_VERSION + 1, c.GTK_MICRO_VERSION));
++ try testing.expect(fun(c.GTK_MAJOR_VERSION - 1, c.GTK_MINOR_VERSION, c.GTK_MICRO_VERSION + 1));
+
+- try testing.expect(atLeast(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION - 1, c.GTK_MICRO_VERSION + 1));
++ try testing.expect(fun(c.GTK_MAJOR_VERSION, c.GTK_MINOR_VERSION - 1, c.GTK_MICRO_VERSION + 1));
++ }
+ }
+
+From 8a7e6c050c556463b126181e01f256a0043ca14a Mon Sep 17 00:00:00 2001
+From: sin-ack <sin-ack@protonmail.com>
+Date: Tue, 7 Jan 2025 19:53:27 +0000
+Subject: [PATCH 2/2] apprt/gtk: Move most version checks to runtime
+
+Unless we are guarding against symbols added in new versions we now
+check against the runtime version of GTK to handle them even when we
+didn't build against that version.
+---
+ src/apprt/gtk/App.zig | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig
+index 3cc1782c86..993dfcc328 100644
+--- a/src/apprt/gtk/App.zig
++++ b/src/apprt/gtk/App.zig
+@@ -104,12 +104,12 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
+ // Disabling Vulkan can improve startup times by hundreds of
+ // milliseconds on some systems. We don't use Vulkan so we can just
+ // disable it.
+- if (version.atLeast(4, 16, 0)) {
++ if (version.runtimeAtLeast(4, 16, 0)) {
+ // From gtk 4.16, GDK_DEBUG is split into GDK_DEBUG and GDK_DISABLE.
+ // For the remainder of "why" see the 4.14 comment below.
+ _ = internal_os.setenv("GDK_DISABLE", "gles-api,vulkan");
+ _ = internal_os.setenv("GDK_DEBUG", "opengl");
+- } else if (version.atLeast(4, 14, 0)) {
++ } else if (version.runtimeAtLeast(4, 14, 0)) {
+ // We need to export GDK_DEBUG to run on Wayland after GTK 4.14.
+ // Older versions of GTK do not support these values so it is safe
+ // to always set this. Forwards versions are uncertain so we'll have to
+@@ -131,7 +131,7 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
+ _ = internal_os.setenv("GDK_DEBUG", "vulkan-disable");
+ }
+
+- if (version.atLeast(4, 14, 0)) {
++ if (version.runtimeAtLeast(4, 14, 0)) {
+ // We need to export GSK_RENDERER to opengl because GTK uses ngl by
+ // default after 4.14
+ _ = internal_os.setenv("GSK_RENDERER", "opengl");
+@@ -983,7 +983,7 @@ fn loadRuntimeCss(
+ unfocused_fill.b,
+ });
+
+- if (version.atLeast(4, 16, 0)) {
++ if (version.runtimeAtLeast(4, 16, 0)) {
+ switch (window_theme) {
+ .ghostty => try writer.print(
+ \\:root {{
diff --git a/x11-terms/ghostty/ghostty-1.0.1-r1.ebuild b/x11-terms/ghostty/ghostty-1.0.1-r2.ebuild
index 95117192ae04..d9694b9dbe7c 100644
--- a/x11-terms/ghostty/ghostty-1.0.1-r1.ebuild
+++ b/x11-terms/ghostty/ghostty-1.0.1-r2.ebuild
@@ -99,6 +99,7 @@ QA_PRESTRIPPED="usr/bin/ghostty"
PATCHES=(
"${FILESDIR}"/${PN}-1.0.0-bzip2-dependency.patch
"${FILESDIR}"/${PN}-1.0.1-copy-terminfo-using-installdir.patch
+ "${FILESDIR}"/${PN}-1.0.1-apprt-gtk-move-most-version-checks-to-runtime.patch
)
src_configure() {