community/lxterminal: fix build with gcc 14

based on a942d55227
This commit is contained in:
Natanael Copa 2024-09-10 13:01:45 +02:00
parent e9cc5dc360
commit ef4fdec2f5
2 changed files with 31 additions and 3 deletions

View file

@ -2,14 +2,15 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxterminal
pkgver=0.4.0
pkgrel=1
pkgrel=2
pkgdesc="Desktop-independent VTE-based terminal emulator"
url="https://lxde.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="gtk+3.0-dev intltool vte3-dev pcre2-dev"
subpackages="$pkgname-doc $pkgname-lang"
source="https://downloads.sourceforge.net/lxde/lxterminal-$pkgver.tar.xz"
source="https://downloads.sourceforge.net/lxde/lxterminal-$pkgver.tar.xz
gcc14.patch"
# secfixes:
# 0.3.0-r1:
@ -36,4 +37,7 @@ package() {
make DESTDIR="$pkgdir" install
}
sha512sums="d1462bf9739c5e9022cbabe9f9c8f70bbb882c0aba7a39d1f87d804f4002056151165d7555cace6f439c0acfbdcd3c959a420993379f646d066f5d30af71232e lxterminal-0.4.0.tar.xz"
sha512sums="
d1462bf9739c5e9022cbabe9f9c8f70bbb882c0aba7a39d1f87d804f4002056151165d7555cace6f439c0acfbdcd3c959a420993379f646d066f5d30af71232e lxterminal-0.4.0.tar.xz
06ee08a824702a8ace9f51c3d2be4a9334fcde815977e4336121fc701d76996aff9dfb01eb05fa8883efd44a6ca021f41d5fe7f8ebfdf2f9fee6f5480aef9e3f gcc14.patch
"

View file

@ -0,0 +1,24 @@
diff --git a/src/lxterminal.c b/src/lxterminal.c
index 015f5e4..32e3b68 100644
--- a/src/lxterminal.c
+++ b/src/lxterminal.c
@@ -1210,6 +1210,8 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch
vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
ret = vte_terminal_match_add_regex(VTE_TERMINAL(term->vte), dingus2, 0);
vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
+ 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);
@@ -1217,9 +1219,9 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch
vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
ret = vte_terminal_match_add_gregex(VTE_TERMINAL(term->vte), dingus2, 0);
vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
-#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();