From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 17B2E138334 for ; Sun, 4 Nov 2018 12:17:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E33D7E09A2; Sun, 4 Nov 2018 12:17:08 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A17DFE09A2 for ; Sun, 4 Nov 2018 12:17:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CFE59335C8D for ; Sun, 4 Nov 2018 12:17:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E125043E for ; Sun, 4 Nov 2018 12:17:04 +0000 (UTC) From: "Jeroen Roovers" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" Message-ID: <1541333818.7f0a3eaea4bad1f148cdf1c031a083e3e4e7abf9.jer@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-terms/sakura/, x11-terms/sakura/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-terms/sakura/files/sakura-3.6.0-tab-crash.patch x11-terms/sakura/sakura-3.6.0-r1.ebuild X-VCS-Directories: x11-terms/sakura/ x11-terms/sakura/files/ X-VCS-Committer: jer X-VCS-Committer-Name: Jeroen Roovers X-VCS-Revision: 7f0a3eaea4bad1f148cdf1c031a083e3e4e7abf9 X-VCS-Branch: master Date: Sun, 4 Nov 2018 12:17:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8dcf53e5-ad72-4f48-b032-76add79b10b5 X-Archives-Hash: acd617746750c7034076427a0268f879 commit: 7f0a3eaea4bad1f148cdf1c031a083e3e4e7abf9 Author: Jeroen Roovers gentoo org> AuthorDate: Sun Nov 4 12:16:25 2018 +0000 Commit: Jeroen Roovers gentoo org> CommitDate: Sun Nov 4 12:16:58 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f0a3eae x11-terms/sakura: Fix tab closing segmentation fault Fixes: https://bugs.gentoo.org/670216 Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Jeroen Roovers gentoo.org> .../sakura/files/sakura-3.6.0-tab-crash.patch | 60 +++++++++++++++++++ x11-terms/sakura/sakura-3.6.0-r1.ebuild | 67 ++++++++++++++++++++++ 2 files changed, 127 insertions(+) diff --git a/x11-terms/sakura/files/sakura-3.6.0-tab-crash.patch b/x11-terms/sakura/files/sakura-3.6.0-tab-crash.patch new file mode 100644 index 00000000000..4d1a33e2751 --- /dev/null +++ b/x11-terms/sakura/files/sakura-3.6.0-tab-crash.patch @@ -0,0 +1,60 @@ +--- a/src/sakura.c ++++ b/src/sakura.c +@@ -339,6 +339,7 @@ + bool label_set_byuser; + GtkBorder padding; /* inner-property data */ + int colorset; ++ gulong exit_handler_id; + }; + + +@@ -984,31 +985,6 @@ + if (npages==1) { + sakura_config_done(); + } +- +- /* Workaround for libvte strange behaviour. There is not child-exited signal for +- the last terminal, so we need to kill it here. Check with libvte authors about +- child-exited/eof signals */ +- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(sakura.notebook))==0) { +- +- term = sakura_get_page_term(sakura, 0); +- +- if (option_hold==TRUE) { +- SAY("hold option has been activated"); +- return; +- } +- +- //SAY("waiting for terminal pid (in eof) %d", term->pid); +- //waitpid(term->pid, &status, WNOHANG); +- /* TODO: check wait return */ +- /* Child should be automatically reaped because we don't use G_SPAWN_DO_NOT_REAP_CHILD flag */ +- g_spawn_close_pid(term->pid); +- +- sakura_del_tab(0); +- +- npages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(sakura.notebook)); +- if (npages==0) +- sakura_destroy(); +- } + } + + /* This handler is called when window title changes, and is used to change window and notebook pages titles */ +@@ -3167,7 +3143,7 @@ + g_signal_connect(G_OBJECT(term->vte), "bell", G_CALLBACK(sakura_beep), NULL); + g_signal_connect(G_OBJECT(term->vte), "increase-font-size", G_CALLBACK(sakura_increase_font), NULL); + g_signal_connect(G_OBJECT(term->vte), "decrease-font-size", G_CALLBACK(sakura_decrease_font), NULL); +- g_signal_connect(G_OBJECT(term->vte), "child-exited", G_CALLBACK(sakura_child_exited), NULL); ++ term->exit_handler_id = g_signal_connect(G_OBJECT(term->vte), "child-exited", G_CALLBACK(sakura_child_exited), NULL); + g_signal_connect(G_OBJECT(term->vte), "eof", G_CALLBACK(sakura_eof), NULL); + g_signal_connect(G_OBJECT(term->vte), "window-title-changed", G_CALLBACK(sakura_title_changed), NULL); + g_signal_connect_swapped(G_OBJECT(term->vte), "button-press-event", G_CALLBACK(sakura_button_press), sakura.menu); +@@ -3366,6 +3342,7 @@ + } + + gtk_widget_hide(term->hbox); ++ g_signal_handler_disconnect (term->vte, term->exit_handler_id); + gtk_notebook_remove_page(GTK_NOTEBOOK(sakura.notebook), page); + + /* Find the next page, if it exists, and grab focus */ + diff --git a/x11-terms/sakura/sakura-3.6.0-r1.ebuild b/x11-terms/sakura/sakura-3.6.0-r1.ebuild new file mode 100644 index 00000000000..9f68fad9974 --- /dev/null +++ b/x11-terms/sakura/sakura-3.6.0-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit cmake-utils eutils flag-o-matic gnome2-utils xdg-utils + +DESCRIPTION="sakura is a terminal emulator based on GTK and VTE" +HOMEPAGE="http://www.pleyades.net/david/projects/sakura/" +SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~x86-linux" + +RDEPEND=" + >=dev-libs/glib-2.20:2 + x11-libs/gtk+:3[X] + x11-libs/libX11 + >x11-libs/vte-0.50:2.91 +" +DEPEND=" + ${RDEPEND} + >=dev-lang/perl-5.10.1 + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-3.1.3-flags.patch + "${FILESDIR}"/${PN}-3.6.0-tab-crash.patch +) + +DOCS=( + AUTHORS +) + +src_prepare() { + sed -i "/FILES INSTALL/d" CMakeLists.txt || die + + strip-linguas -i po/ + local lingua + for lingua in po/*.po; do + lingua="${lingua/po\/}" + lingua="${lingua/.po}" + if ! has ${lingua} ${LINGUAS}; then + rm po/${lingua}.po || die + fi + done + + cmake-utils_src_prepare + # sakura.c:1740:3: warning: implicit declaration of function ‘readlink’ + # [-Wimplicit-function-declaration] + append-cppflags -D_DEFAULT_SOURCE + + # sakura.c:1348:9: error: ‘for’ loop initial declarations are only allowed + # in C99 or C11 mode + append-cflags -std=c99 +} + +pkg_postinst() { + gnome2_icon_cache_update + xdg_desktop_database_update +} + +pkg_postrm() { + gnome2_icon_cache_update + xdg_desktop_database_update +}