aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2021-01-11 20:05:52 +0000
committerMilan P. Stanić <mps@arvanta.net>2021-01-11 20:05:52 +0000
commit1c7042e1acda8b519a674850306aa49170d43eb6 (patch)
treedea69a4bf82888dc91e55c8cd9acee5f28e085a4
parentf3c6cebf8fbb43ceb3058c76f765862416ffcc28 (diff)
downloadaports-1c7042e1acda8b519a674850306aa49170d43eb6.tar.gz
aports-1c7042e1acda8b519a674850306aa49170d43eb6.tar.bz2
aports-1c7042e1acda8b519a674850306aa49170d43eb6.tar.xz
main/irssi: fix issue 1180, ctrl+space freezes irssi on GLib >2.62
add patch from upstream: https://github.com/irssi/irssi/issues/1180
-rw-r--r--main/irssi/APKBUILD6
-rw-r--r--main/irssi/glib-2-63.patch38
2 files changed, 42 insertions, 2 deletions
diff --git a/main/irssi/APKBUILD b/main/irssi/APKBUILD
index ca6c64289f..80979b84bb 100644
--- a/main/irssi/APKBUILD
+++ b/main/irssi/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=irssi
pkgver=1.2.2
-pkgrel=3
+pkgrel=4
pkgdesc="Modular textUI IRC client with IPv6 support"
url="https://irssi.org/"
arch="all"
@@ -9,6 +9,7 @@ license="GPL-2.0-or-later WITH OpenSSL-Exception"
makedepends="glib-dev openssl-dev ncurses-dev perl-dev automake autoconf libtool libotr-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-proxy $pkgname-perl $pkgname-otr"
source="https://github.com/irssi/irssi/releases/download/$pkgver/irssi-$pkgver.tar.xz
+ glib-2-63.patch
"
# secfixes:
@@ -99,4 +100,5 @@ otr() {
mv "$pkgdir"/usr/share/irssi/help/otr "$subpkgdir"/usr/share/irssi/help/
}
-sha512sums="5444ac102ff9ad3a6399a47c967d138e181330dd226eac68886d35fee4ad455932b9306a367bee3478095158e41ba67fb46deb8f0a33512046b9b83bae37c610 irssi-1.2.2.tar.xz"
+sha512sums="5444ac102ff9ad3a6399a47c967d138e181330dd226eac68886d35fee4ad455932b9306a367bee3478095158e41ba67fb46deb8f0a33512046b9b83bae37c610 irssi-1.2.2.tar.xz
+bfcdbfb1c06a13412594d5d14f4441ba06c3db3a4260aaa1c8bbfa1c68841ad1efc1c8af07f3fe4d12bb2e4c9fa7f067ace2b439745293082de6427a30242547 glib-2-63.patch"
diff --git a/main/irssi/glib-2-63.patch b/main/irssi/glib-2-63.patch
new file mode 100644
index 0000000000..63d26958b7
--- /dev/null
+++ b/main/irssi/glib-2-63.patch
@@ -0,0 +1,38 @@
+From a0544571a80196e5b7705f56e6e2cbcdf7b4d80e Mon Sep 17 00:00:00 2001
+From: ailin-nemui <ailin-nemui@users.noreply.github.com>
+Date: Thu, 23 Apr 2020 21:45:15 +0200
+Subject: [PATCH] manually handle NUL unicode in g_utf8_get_next_char_validated
+
+A change in GLib 2.63 broke some assumptions in Irssi that the null-byte
+NUL / U+0000 is a valid Unicode character. This would occur when the
+user types Ctrl+Space. As a result, the input loop never manages to
+process the NUL-byte (and any other user input that follows, ever).
+
+This patch adds a manual check that properly advances the input loop if
+GLib returns -2 (incomplete character) despite the length being positive
+and a NUL is in first position.
+
+Fixes #1180
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/967
+https://gitlab.gnome.org/GNOME/glib/-/issues/2093
+---
+ src/fe-text/term-terminfo.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c
+index 5235f72d2..78496a64f 100644
+--- a/src/fe-text/term-terminfo.c
++++ b/src/fe-text/term-terminfo.c
+@@ -672,7 +672,11 @@ void term_stop(void)
+
+ static int input_utf8(const unsigned char *buffer, int size, unichar *result)
+ {
+- unichar c = g_utf8_get_char_validated((char *)buffer, size);
++ unichar c = g_utf8_get_char_validated((char *) buffer, size);
++
++ /* GLib >= 2.63 do not accept Unicode NUL anymore */
++ if (c == (unichar) -2 && *buffer == 0 && size > 0)
++ c = 0;
+
+ switch (c) {
+ case (unichar)-1: