diff --git a/recipes/wip/libs/gtk/vte/recipe.toml b/recipes/wip/libs/gtk/vte/recipe.toml new file mode 100644 index 000000000..948971ddf --- /dev/null +++ b/recipes/wip/libs/gtk/vte/recipe.toml @@ -0,0 +1,20 @@ +[source] +tar = "https://download.gnome.org/sources/vte/0.82/vte-0.82.1.tar.xz" +blake3 = "2d16b6808c0eaa801d59ccabcae13e76ccd6229869dad1efe0524a4c83b53a87" +patches = ["redox.patch"] + +[build] +dependencies = [ + "gnutls3", + "gtk3", + "lz4", + "simdutf", +] +template = "meson" +mesonflags = [ + "-Dgir=false", + "-Dgtk4=false", + "-Dvapi=false", + #TODO: package fast_float? + "--force-fallback-for=fast_float", +] diff --git a/recipes/wip/libs/gtk/vte/redox.patch b/recipes/wip/libs/gtk/vte/redox.patch new file mode 100644 index 000000000..3f3bda148 --- /dev/null +++ b/recipes/wip/libs/gtk/vte/redox.patch @@ -0,0 +1,63 @@ +diff -ruwN source-old/src/pty.cc source/src/pty.cc +--- source-old/src/pty.cc 2025-10-11 14:43:24.000000000 -0600 ++++ source/src/pty.cc 2025-11-17 17:54:03.387095202 -0700 +@@ -222,7 +222,7 @@ + if (peer_fd == -1) + _exit(127); + +-#ifdef TIOCSCTTY ++#if defined(TIOCSCTTY) && !defined(__redox__) + /* On linux, opening the PTY peer above already made it our controlling TTY (since + * previously there was none, after the setsid() call). However, it appears that e.g. + * on *BSD, that doesn't happen, so we need this explicit ioctl here. +diff -ruwN source-old/src/spawn.cc source/src/spawn.cc +--- source-old/src/spawn.cc 2025-10-11 14:43:24.000000000 -0600 ++++ source/src/spawn.cc 2025-11-17 17:53:20.394044419 -0700 +@@ -409,7 +409,7 @@ + if (peer_fd == -1) + return ExecError::GETPTPEER; + +-#ifdef TIOCSCTTY ++#if defined(TIOCSCTTY) && !defined(__redox__) + /* On linux, opening the PTY peer above already made it our controlling TTY (since + * previously there was none, after the setsid() call). However, it appears that e.g. + * on *BSD, that doesn't happen, so we need this explicit ioctl here. +diff -ruwN source-old/src/vte.cc source/src/vte.cc +--- source-old/src/vte.cc 2025-10-11 14:43:24.000000000 -0600 ++++ source/src/vte.cc 2025-11-17 17:54:44.394149937 -0700 +@@ -19,7 +19,9 @@ + #include "config.h" + + #include ++#if !defined(__redox__) + #include ++#endif + #include + #include + #include +diff -ruwN source-old/src/vteseq.cc source/src/vteseq.cc +--- source-old/src/vteseq.cc 2025-10-11 14:43:24.000000000 -0600 ++++ source/src/vteseq.cc 2025-11-17 17:59:27.278790468 -0700 +@@ -19,7 +19,9 @@ + + #include "config.h" + ++#if !defined(__redox__) + #include ++#endif + #include + #include + #include +diff -ruwN source-old/src/widget.cc source/src/widget.cc +--- source-old/src/widget.cc 2025-10-11 14:43:24.000000000 -0600 ++++ source/src/widget.cc 2025-11-17 18:22:10.229089619 -0700 +@@ -927,6 +927,9 @@ + } + + if (m_terminal->terminate_child()) { ++ #ifndef W_EXITCODE ++ #define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) ++ #endif + int status = W_EXITCODE(0, SIGKILL); + emit_child_exited(status); + }