forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lxde-base/lxterminal: add 0.4.0_p20230917
Take a snapshot as Fedora did and include the patches they have for Modern C. Closes: https://bugs.gentoo.org/919094 Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
0e7cb33
commit 60a6dd2
Showing
4 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST lxterminal-0.4.0.tar.xz 201856 BLAKE2B 2fe72007e36c5324b868b9dfc54b04422f85f93f71265126f65eb0b6e0510e60eefb0a2a53acadee6f2c44adcd3c498117b709c9eaa1eb2241dd9016558b9e5c SHA512 d1462bf9739c5e9022cbabe9f9c8f70bbb882c0aba7a39d1f87d804f4002056151165d7555cace6f439c0acfbdcd3c959a420993379f646d066f5d30af71232e | ||
DIST lxterminal-0.4.0_p20230917.tar.gz 163085 BLAKE2B c26051fdf814da3989d74a14ad726b72e45afb1189c01ac6f3897daecc2473c3cfe1574976ab96bfe08ce7e2b84652471b6e839a17dd0c44932244c5936bd8c1 SHA512 4d00e979add7c2322703d0761707d9a935bb839ffcc981a61c51f28cb37466768c373dc03b9d8ae159e0e919d824c7d7f20bb9b2abda465092016c3692449c9d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
https://bugs.gentoo.org/919094 | ||
https://github.com/lxde/lxterminal/issues/121 | ||
https://github.com/lxde/lxterminal/pull/122 | ||
https://src.fedoraproject.org/rpms/lxterminal/blob/rawhide/f/lxterminal-pr122-fix-gcc14-incompatible-pointer-types.patch | ||
|
||
From c947b9065b470c24064ac1b1c4935e8093970531 Mon Sep 17 00:00:00 2001 | ||
From: Mamoru TASAKA <[email protected]> | ||
Date: Wed, 21 Feb 2024 17:01:14 +0900 | ||
Subject: [PATCH] Fix: support gcc14 -Werror=incompatible-pointer-types | ||
|
||
gcc14 now defaults to -Werror=incompatible-pointer-types . | ||
Fix code to support this. | ||
|
||
* Add GTK cast for GTK_STYLE_PROVIDER | ||
* VteRegex must be deref'ed with vte_regex_unref | ||
|
||
Fixes #121 . | ||
--- | ||
src/lxterminal.c | 6 ++++-- | ||
1 file changed, 4 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/lxterminal.c b/src/lxterminal.c | ||
index 680e411..dcd7405 100644 | ||
--- a/src/lxterminal.c | ||
+++ b/src/lxterminal.c | ||
@@ -1208,7 +1208,7 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch | ||
GtkStyleContext* box_style_ctx = | ||
gtk_widget_get_style_context(GTK_WIDGET(terminal->box)); | ||
gtk_style_context_add_provider( | ||
- box_style_ctx, box_css_provider, | ||
+ box_style_ctx, GTK_STYLE_PROVIDER(box_css_provider), | ||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | ||
#endif | ||
|
||
@@ -1232,6 +1232,8 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch | ||
vte_terminal_match_set_cursor_name(VTE_TERMINAL(term->vte), ret, "pointer"); | ||
ret = vte_terminal_match_add_regex(VTE_TERMINAL(term->vte), dingus2, 0); | ||
vte_terminal_match_set_cursor_name(VTE_TERMINAL(term->vte), ret, "pointer"); | ||
+ vte_regex_unref(dingus1); | ||
+ vte_regex_unref(dingus2); | ||
#else | ||
GRegex * dingus1 = g_regex_new(DINGUS1, G_REGEX_OPTIMIZE, 0, NULL); | ||
GRegex * dingus2 = g_regex_new(DINGUS2, G_REGEX_OPTIMIZE, 0, NULL); | ||
@@ -1239,9 +1241,9 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch | ||
vte_terminal_match_set_cursor_name(VTE_TERMINAL(term->vte), ret, "pointer"); | ||
ret = vte_terminal_match_add_gregex(VTE_TERMINAL(term->vte), dingus2, 0); | ||
vte_terminal_match_set_cursor_name(VTE_TERMINAL(term->vte), ret, "pointer"); | ||
-#endif | ||
g_regex_unref(dingus1); | ||
g_regex_unref(dingus2); | ||
+#endif | ||
|
||
/* Create a horizontal box inside an event box as the toplevel for the tab label. */ | ||
term->tab = gtk_event_box_new(); |
57 changes: 57 additions & 0 deletions
57
lxde-base/lxterminal/files/lxterminal-0.4.0-crash-on-exit.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
https://src.fedoraproject.org/rpms/lxterminal/blob/rawhide/f/lxterminal-0.4.0-avoid-segv-on-window-close.patch | ||
--- lxterminal-0.4.0/src/lxterminal.c.orig 2023-05-26 13:59:55.800250980 +0900 | ||
+++ lxterminal-0.4.0/src/lxterminal.c 2023-06-09 14:03:22.478441852 +0900 | ||
@@ -59,6 +59,7 @@ static void terminal_new_window_activate | ||
static void terminal_new_tab_activate_event(GtkAction * action, LXTerminal * terminal); | ||
static void terminal_close_tab_activate_event(GtkAction * action, LXTerminal * terminal); | ||
static void terminal_close_window_activate_event(GtkAction * action, LXTerminal * terminal); | ||
+static void terminal_close_window_activate_event_internal(GtkAction * action, LXTerminal * terminal); | ||
static void terminal_open_url_activate_event(GtkAction * action, LXTerminal * terminal); | ||
static void terminal_copy_url_activate_event(GtkAction * action, LXTerminal * terminal); | ||
static void terminal_copy_activate_event(GtkAction * action, LXTerminal * terminal); | ||
@@ -480,15 +481,28 @@ static void terminal_close_window_activa | ||
if (!terminal_close_window_confirmation_dialog(terminal)) { | ||
return; | ||
} | ||
+ terminal_close_window_activate_event_internal(action, terminal); | ||
+} | ||
|
||
+static void terminal_close_window_activate_event_internal(GtkAction * action, LXTerminal * terminal) | ||
+{ | ||
/* Play it safe and delete tabs one by one. */ | ||
- while(terminal->terms->len > 0) { | ||
+ while(1 /* terminal->terms->len > 0 */) { | ||
+ /* terminal_child_exited_event() finally frees terminal->terms */ | ||
+ /* terminal_window_exit() finally frees terminal itself | ||
+ when closing one window of multiple ones | ||
+ */ | ||
+ guint len = terminal->terms->len; | ||
Term *term = g_ptr_array_index(terminal->terms, 0); | ||
#if VTE_CHECK_VERSION (0, 38, 0) | ||
terminal_child_exited_event(VTE_TERMINAL(term->vte), 0, term); | ||
#else | ||
terminal_child_exited_event(VTE_TERMINAL(term->vte), term); | ||
#endif | ||
+ if (len <= 1) { | ||
+ break; | ||
+ } | ||
+ | ||
} | ||
} | ||
|
||
@@ -838,7 +852,15 @@ static void terminal_window_title_change | ||
/* Handler for "delete-event" signal on a LXTerminal. */ | ||
static gboolean terminal_close_window_confirmation_event(GtkWidget * widget, GdkEventButton * event, LXTerminal * terminal) | ||
{ | ||
+#if 0 | ||
return !terminal_close_window_confirmation_dialog(terminal); | ||
+#else | ||
+ gboolean status = terminal_close_window_confirmation_dialog(terminal); | ||
+ if (status) { | ||
+ terminal_close_window_activate_event_internal(NULL, terminal); | ||
+ } | ||
+ return TRUE; /* Always nuke this event, call the above function explicitly */ | ||
+#endif | ||
} | ||
|
||
/* Display closing tabs warning */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit autotools xdg | ||
|
||
DESCRIPTION="Lightweight vte-based tabbed terminal emulator for LXDE" | ||
HOMEPAGE="https://wiki.lxde.org/en/LXTerminal" | ||
if [[ ${PV} == *_p* ]] ; then | ||
TERMINAL_COMMIT="9b4299c292567b371158368686088900a4c0a128" | ||
SRC_URI="https://github.com/lxde/lxterminal/archive/${TERMINAL_COMMIT}.tar.gz -> ${P}.tar.gz" | ||
S="${WORKDIR}"/${PN}-${TERMINAL_COMMIT} | ||
else | ||
SRC_URI="https://downloads.sourceforge.net/lxde/${P}.tar.xz" | ||
fi | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~riscv ~x86 ~amd64-linux ~x86-linux" | ||
|
||
DEPEND=" | ||
dev-libs/glib:2 | ||
x11-libs/gdk-pixbuf:2 | ||
x11-libs/gtk+:3 | ||
x11-libs/libX11 | ||
x11-libs/pango | ||
>=x11-libs/vte-0.28.0:2.91 | ||
" | ||
RDEPEND="${DEPEND}" | ||
BDEPEND=" | ||
app-text/docbook-xsl-stylesheets | ||
>=dev-util/intltool-0.40.0 | ||
sys-devel/gettext | ||
virtual/pkgconfig | ||
" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-0.4.0-crash-on-exit.patch | ||
"${FILESDIR}"/${PN}-0.4.0-c99.patch | ||
) | ||
|
||
src_prepare() { | ||
default | ||
|
||
xdg_environment_reset | ||
|
||
eautoreconf | ||
} | ||
|
||
src_configure() { | ||
econf --enable-man --enable-gtk3 | ||
} |