aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Fish <gentoo@seaofdirac.net>2019-07-10 00:05:50 +0200
committerNicholas Fish <gentoo@seaofdirac.net>2019-07-10 00:05:50 +0200
commit85fbfbdfa8948d32c824156b762ddacadb82b26f (patch)
tree58559148ce5bfeb2bb877f78ae885dd2b5fd74a7
parentx11-libs/vte: Bump to 0.57.3 (diff)
downloadennui-85fbfbdfa8948d32c824156b762ddacadb82b26f.tar.gz
ennui-85fbfbdfa8948d32c824156b762ddacadb82b26f.tar.bz2
ennui-85fbfbdfa8948d32c824156b762ddacadb82b26f.zip
x11-libs/vte: Update OSC 777 patch
Signed-off-by: Nicholas Fish <gentoo@seaofdirac.net>
-rw-r--r--x11-libs/vte/Manifest4
-rw-r--r--x11-libs/vte/files/vte-0.57.3-command-notify.patch254
-rw-r--r--x11-libs/vte/vte-0.57.3.ebuild4
3 files changed, 257 insertions, 5 deletions
diff --git a/x11-libs/vte/Manifest b/x11-libs/vte/Manifest
index 75029b3..0ae5b9f 100644
--- a/x11-libs/vte/Manifest
+++ b/x11-libs/vte/Manifest
@@ -2,10 +2,10 @@ AUX vte-0.28.2-interix.patch 1566 BLAKE2B 1d6b4b7cfc1fee464779e3efb8de09554c9e52
AUX vte-0.28.2-limit-arguments.patch 1477 BLAKE2B 329e8eb93156244526ebe3ccb3c2a75234da7a57a994c2c1b42e283a65011d6245133f858778571efefec18bf18bc7db9afe5aeded0df0cec35a72a31507671b SHA512 e5639d94fd455195c354d03cab04bbb73eff98bc540c813cccf4ab5eb793f4c8ae645fcf2bd502924ed4d38412101341deaf2d28ea8aaea3530a98ffbba8256d
AUX vte-0.28.2-repaint-after-change-scroll-region.patch 3817 BLAKE2B d57f20415193bf9bc283399bcae4e3c2a23ff7f2f8ffee08e8a67c3af2956b137f788322e26bf2537e785c0d0ce6266b56269abe5a18e2e881ea548b5c1b4625 SHA512 46a54c96889c3a0c5a293a097f777dd2e24e5a3025b808d7fb0bbfe71e8938f7d30ba26a05e67cb6b63ad59719eace57d0f6e0ff9f2860fbe9f12c36e022b8ec
AUX vte-0.30.1-alt-meta.patch 2490 BLAKE2B b5046bea09bb7fee5f03eaaa0c88f88a9e05c3d4f97fa8d6b4ecfbaec8a35bf1989c0461c1ec1d31e1b22c9d35688775a30f34134028bcd4fdcae1b7d40129c4 SHA512 69ed3038f3dcbbd09709667caff5692e4e11e30926bc7692cdbbdef2bb1ae4584ef64b824b5afcb3c57c237a3c0db4d9588ec36778d0994a546b1e6f74c2e430
+AUX vte-0.57.3-command-notify.patch 9214 BLAKE2B e7ac2a1cf3d2939563e01585ba15f55bb217ebd14432f08629b0ee02f178944a374f64b14a11c3b9d15c7c25e98b6c158a655dd6207ffffd37bb752ecadcbe24 SHA512 5c259bab56600dc8bdbd67168c45c3274954bbf1f5db4973998c43ece10a7f76aae0ee6de142490b51e4ec77cc30e8b9ae54fd4652045a94d285d54150633d7b
AUX vte-ng-0.56.2.patch 5166 BLAKE2B a4b03685eae1755ef021f0a8b374c621737455bd3cdcceaaa9924e0b8208b6a4a2796f9d332454d5a16e19f146e53a796ca4a37b712d279de31a3de14e188bc9 SHA512 1d7e2da3ca28127d8f8558226c3e8fb22af9e6e0d00fbff538db700b46288c084bf9de488a4c1d6e6f6ef7d5d799593ed3d2e3f61e8fbf8a9aff9c1d8f33410b
DIST vte-0.28.2.tar.xz 962340 BLAKE2B 1e4b5977962265be77917ccfc9118ed93232c03d7a16b6c08a27e721fe71f8c1dd1783a439530d7b3d915111cb8cc78281f1e9e351d6a83edd31f224309ca1e9 SHA512 d6a50481aaa8946cca3779e0b328fef551be534d70366a75385d1f8ead3fcddec57bed85c7d4bc2d9f34546532129e63083aafa33cbb0efcbc7dc9d66e7c45f6
-DIST vte-0.54.1-command-notify.patch.xz 3428 BLAKE2B 75b0c22720276300be2e49e8444aa68fed77fb7a6cc6b0e93a5c2d41257626bd60ff1084d68579769cb3d85e7ec567927591746de48e860b138d0c1f24f64cc7 SHA512 a53da569f8168c8e9e21e186dcfc00bf9fdb78a0c767ba35033c1c1e4f836406b4d9bf70ee3e071f6c749fd6f72101a6960d201617bd0bc23021e1eeaac6fd0c
DIST vte-0.57.3.tar.xz 514028 BLAKE2B 2ae072fe575d0488a6d3c9cd833edfec612ea8566ef0079b8b4b4fa12f5acfa3c812010e4a8284d21dff9e8c3f4b43d8de5be867184f364a9d925f6f9a1a8df9 SHA512 f5496fd2b24af8d8eb895adaea59ee5ed4250c12a97745e025aacebca2d709901ae84befca58a3c5f1a54014a97af460ea53f844b1b1b9e32e192cc5883ecfed
EBUILD vte-0.28.2-r208.ebuild 3108 BLAKE2B 10f333485bef9d4fdb6f037096366430910cde1e95c86a134b99bcbe88394c929726094d351b841d279ade3e0bccdd33559e8774c144f00b34301edeaa5edc2d SHA512 4ec546d18bd142c798806ca547545997860df422b7ed5668e4d1ec2a2730b9a7d817deef222406fa6c441ad51077fccbdf42a63155cf50e758ef34bccd1db472
-EBUILD vte-0.57.3.ebuild 2387 BLAKE2B c4c18e6842726f858b06a2601ad7bfc6bbdc25a43e9242151ee0f295482c56f3795f431d85cd9bfb7dfd0c2859bf901a7173b828aeec0caa2fb4316459833c4e SHA512 b3d88d1fe6f1461921c2484b2df58fd840054873bfb03bf31acbb17ee9853a180852fcb172ea7d785a847e9d1b099245b969362fb19c2fec6a0dd8ab1e9da3a9
+EBUILD vte-0.57.3.ebuild 2268 BLAKE2B 1f6b192889f2335cf9cec0a17251c044f64539576acdfc6bd123e8db6e038cd783ddad459284b7cbdc03453268c74c1bb4d7d43ab891a618b47a1a6f920babc9 SHA512 191dbcfad2dc57c719f127d333ee5c15b6dcfd214ab9204cfe1f007eb1b01cf8ea112bae20aecfb13e2f0e51bb536b14b564356342ea4796b96c4ac4dc998e28
MISC metadata.xml 348 BLAKE2B 3bf56ab8eced6c72e3d4dcb9979464b9652010b09d6576da3f1b9061f92b508d9bfa11ae081083ff07b2d7ec05c8e72123e25d6ec8c6edfa738b241a9f4339cb SHA512 3e3da8172df02c72e955968530e757124b502cb2b3ff750fdc3c52f28c763f22d918fa9b2f08da7d1b87bf3719e4cc726528c9496adde96eee3111f08a54d8d4
diff --git a/x11-libs/vte/files/vte-0.57.3-command-notify.patch b/x11-libs/vte/files/vte-0.57.3-command-notify.patch
new file mode 100644
index 0000000..a14d3bd
--- /dev/null
+++ b/x11-libs/vte/files/vte-0.57.3-command-notify.patch
@@ -0,0 +1,254 @@
+diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala
+index fc26c2b0..634b8dde 100644
+--- a/bindings/vala/app.vala
++++ b/bindings/vala/app.vala
+@@ -309,6 +309,8 @@ class Window : Gtk.ApplicationWindow
+ if (Options.object_notifications)
+ terminal.notify.connect(notify_cb);
+
++ terminal.notification_received.connect(notification_received_cb);
++
+ /* Settings */
+ if (Options.no_double_buffer)
+ terminal.set_double_buffered(false);
+@@ -780,6 +782,11 @@ class Window : Gtk.ApplicationWindow
+ set_title(terminal.get_window_title());
+ }
+
++ private void notification_received_cb(Vte.Terminal terminal, string summary, string? body)
++ {
++ print ("[%s]: %s\n", summary, body);
++ }
++
+ } /* class Window */
+
+ class App : Gtk.Application
+diff --git a/src/app/app.cc b/src/app/app.cc
+index d845b5ce..90148baf 100644
+--- a/src/app/app.cc
++++ b/src/app/app.cc
+@@ -1679,6 +1679,14 @@ window_window_title_changed_cb(VteTerminal* terminal,
+ vte_terminal_get_window_title(window->terminal));
+ }
+
++static void
++notification_received_cb(VteTerminal *terminal,
++ const gchar *summary,
++ const gchar *body)
++{
++ g_print("[%s]: %s\n", summary, body);
++}
++
+ static void
+ window_lower_window_cb(VteTerminal* terminal,
+ VteappWindow* window)
+@@ -1907,6 +1915,8 @@ vteapp_window_constructed(GObject *object)
+ if (options.object_notifications)
+ g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window);
+
++ g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL);
++
+ /* Settings */
+ if (options.no_double_buffer)
+ gtk_widget_set_double_buffered(GTK_WIDGET(window->terminal), false);
+diff --git a/src/marshal.list b/src/marshal.list
+index 241128c3..4412cf3d 100644
+--- a/src/marshal.list
++++ b/src/marshal.list
+@@ -1,3 +1,4 @@
+ VOID:STRING,BOXED
++VOID:STRING,STRING
+ VOID:STRING,UINT
+ VOID:UINT,UINT
+diff --git a/src/vte.cc b/src/vte.cc
+index e7815b44..79d3248a 100644
+--- a/src/vte.cc
++++ b/src/vte.cc
+@@ -10696,6 +10696,15 @@ Terminal::emit_pending_signals()
+
+ emit_adjustment_changed();
+
++ if (m_notification_received) {
++ _vte_debug_print (VTE_DEBUG_SIGNALS,
++ "Emitting `notification-received'.\n");
++ g_signal_emit(object, signals[SIGNAL_NOTIFICATION_RECEIVED], 0,
++ m_notification_summary.c_str(),
++ m_notification_body.c_str());
++ m_notification_received = FALSE;
++ }
++
+ if (m_window_title_changed) {
+ if (m_window_title != m_window_title_pending) {
+ m_window_title.swap(m_window_title_pending);
+diff --git a/src/vte.sh b/src/vte.sh
+index c200493c..ee010aa3 100644
+--- a/src/vte.sh
++++ b/src/vte.sh
+@@ -50,10 +50,12 @@ __vte_osc7 () {
+ }
+
+ __vte_prompt_command() {
++ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//')
++ command="${command//;/ }"
+ local pwd='~'
+ [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/}
+ pwd="${pwd//[[:cntrl:]]}"
+- printf "\033]0;%s@%s:%s\033\\%s" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
++ printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\%s' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
+ }
+
+ case "$TERM" in
+diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
+index 18ac0714..ea5c9313 100644
+--- a/src/vte/vteterminal.h
++++ b/src/vte/vteterminal.h
+@@ -104,8 +104,10 @@ struct _VteTerminalClass {
+
+ void (*bell)(VteTerminal* terminal);
+
++ void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body);
++
+ /* Padding for future expansion. */
+- gpointer padding[16];
++ gpointer padding[15];
+
+ VteTerminalClassPrivate *priv;
+ };
+diff --git a/src/vtegtk.cc b/src/vtegtk.cc
+index c18a178a..61bc9c5a 100644
+--- a/src/vtegtk.cc
++++ b/src/vtegtk.cc
+@@ -739,6 +739,7 @@ vte_terminal_class_init(VteTerminalClass *klass)
+ klass->child_exited = NULL;
+ klass->encoding_changed = NULL;
+ klass->char_size_changed = NULL;
++ klass->notification_received = NULL;
+ klass->window_title_changed = NULL;
+ klass->icon_title_changed = NULL;
+ klass->selection_changed = NULL;
+@@ -820,6 +821,29 @@ vte_terminal_class_init(VteTerminalClass *klass)
+ G_OBJECT_CLASS_TYPE(klass),
+ g_cclosure_marshal_VOID__INTv);
+
++ /**
++ * VteTerminal::notification-received:
++ * @vteterminal: the object which received the signal
++ * @summary: The summary
++ * @body: (allow-none): Extra optional text
++ *
++ * Emitted when a process running in the terminal wants to
++ * send a notification to the desktop environment.
++ */
++ signals[SIGNAL_NOTIFICATION_RECEIVED] =
++ g_signal_new(I_("notification-received"),
++ G_OBJECT_CLASS_TYPE(klass),
++ G_SIGNAL_RUN_LAST,
++ G_STRUCT_OFFSET(VteTerminalClass, notification_received),
++ NULL,
++ NULL,
++ _vte_marshal_VOID__STRING_STRING,,
++ G_TYPE_NONE,
++ 2, G_TYPE_STRING, G_TYPE_STRING);
++ g_signal_set_va_marshaller(signals[SIGNAL_NOTIFICATION_RECEIVED],
++ G_OBJECT_CLASS_TYPE(klass),
++ _vte_marshal_VOID__STRING_STRINGv);
++
+ /**
+ * VteTerminal::window-title-changed:
+ * @vteterminal: the object which received the signal
+diff --git a/src/vtegtk.hh b/src/vtegtk.hh
+index e2515b34..c175f6d7 100644
+--- a/src/vtegtk.hh
++++ b/src/vtegtk.hh
+@@ -56,6 +56,7 @@ enum {
+ SIGNAL_TEXT_INSERTED,
+ SIGNAL_TEXT_MODIFIED,
+ SIGNAL_TEXT_SCROLLED,
++ SIGNAL_NOTIFICATION_RECEIVED,
+ SIGNAL_WINDOW_TITLE_CHANGED,
+ LAST_SIGNAL
+ };
+diff --git a/src/vteinternal.hh b/src/vteinternal.hh
+index b0b6239e..c64b0540 100644
+--- a/src/vteinternal.hh
++++ b/src/vteinternal.hh
+@@ -560,6 +560,11 @@ public:
+ gboolean m_cursor_moved_pending;
+ gboolean m_contents_changed_pending;
+
++ /* desktop notification */
++ gboolean m_notification_received;
++ std::string m_notification_summary;
++ std::string m_notification_body;
++
+ std::string m_window_title{};
+ std::string m_current_directory_uri{};
+ std::string m_current_file_uri{};
+@@ -1313,6 +1318,9 @@ public:
+ int osc) noexcept;
+
+ /* OSC handlers */
++ void handle_urxvt_extension(vte::parser::Sequence const& seq,
++ vte::parser::StringTokeniser::const_iterator& token,
++ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept;
+ void set_color(vte::parser::Sequence const& seq,
+ vte::parser::StringTokeniser::const_iterator& token,
+ vte::parser::StringTokeniser::const_iterator const& endtoken,
+diff --git a/src/vteseq.cc b/src/vteseq.cc
+index 9ee15477..fb877f28 100644
+--- a/src/vteseq.cc
++++ b/src/vteseq.cc
+@@ -1398,6 +1398,34 @@ Terminal::delete_lines(vte::grid::row_t param)
+ m_text_deleted_flag = TRUE;
+ }
+
++void
++Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq,
++ vte::parser::StringTokeniser::const_iterator& token,
++ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept
++{
++ if (token == endtoken) {
++ return;
++ }
++
++ if (*token == "notify") {
++ ++token;
++
++ if (token == endtoken)
++ return;
++
++ m_notification_summary = *token;
++ m_notification_body.clear();
++ m_notification_received = TRUE;
++ ++token;
++
++ if (token == endtoken)
++ return;
++
++ m_notification_body = *token;
++ return;
++ }
++}
++
+ bool
+ Terminal::get_osc_color_index(int osc,
+ int value,
+@@ -6488,6 +6516,10 @@ Terminal::OSC(vte::parser::Sequence const& seq)
+ reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE);
+ break;
+
++ case VTE_OSC_URXVT_EXTENSION:
++ handle_urxvt_extension(seq, it, cend);
++ break;
++
+ case VTE_OSC_XTERM_SET_ICON_TITLE:
+ case VTE_OSC_XTERM_SET_XPROPERTY:
+ case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG:
+@@ -6528,7 +6560,6 @@ Terminal::OSC(vte::parser::Sequence const& seq)
+ case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC:
+ case VTE_OSC_URXVT_VIEW_UP:
+ case VTE_OSC_URXVT_VIEW_DOWN:
+- case VTE_OSC_URXVT_EXTENSION:
+ case VTE_OSC_YF_RQGWR:
+ default:
+ break;
diff --git a/x11-libs/vte/vte-0.57.3.ebuild b/x11-libs/vte/vte-0.57.3.ebuild
index af2cefc..b054c96 100644
--- a/x11-libs/vte/vte-0.57.3.ebuild
+++ b/x11-libs/vte/vte-0.57.3.ebuild
@@ -16,8 +16,6 @@ IUSE="+crypt debug glade +introspection vala vanilla"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
REQUIRED_USE="vala? ( introspection )"
-SRC_URI="${SRC_URI} !vanilla? ( https://dev.gentoo.org/~leio/distfiles/${PN}-0.54.1-command-notify.patch.xz )"
-
RDEPEND="
>=dev-libs/glib-2.40:2
>=dev-libs/libpcre2-10.21
@@ -49,7 +47,7 @@ src_prepare() {
if ! use vanilla; then
# First half of http://pkgs.fedoraproject.org/cgit/rpms/vte291.git/tree/vte291-command-notify-scroll-speed.patch
# Adds OSC 777 support for desktop notifications in gnome-terminal or elsewhere
- eapply "${WORKDIR}"/${PN}-0.54.1-command-notify.patch
+ eapply "${FILESDIR}"/${P}-command-notify.patch
fi
use vala && vala_src_prepare