summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2020-11-24 13:14:05 +0100
committerJuergen Daubert <jue@jue.li>2020-11-24 13:14:05 +0100
commitcc8aeffc096c4ef306c0a19a66802894759cc1f6 (patch)
tree4a1766ce7f1ce86db1128e59da57905adab6598b
parent94da1a0acb710f76c540cca33a662d2c6ee6427e (diff)
downloadopt-cc8aeffc096c4ef306c0a19a66802894759cc1f6.tar.gz
opt-cc8aeffc096c4ef306c0a19a66802894759cc1f6.tar.xz
irssi: add patch to fix freeze with glib > 2.62
-rw-r--r--irssi/.signature5
-rw-r--r--irssi/Pkgfile35
-rw-r--r--irssi/glib-2-63.patch38
3 files changed, 61 insertions, 17 deletions
diff --git a/irssi/.signature b/irssi/.signature
index bc57dd081..a06555060 100644
--- a/irssi/.signature
+++ b/irssi/.signature
@@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/WheJ4uhmM70ZQtSMGHIhtokpsUXP3nhrvvzWli2mBbqetOmYOsEF2HFa2k/qpxrB6cSfYemZ+X9+BatPHbDhAw=
-SHA256 (Pkgfile) = f7507228e564179fdb54cea6c43012820af1ecd9f5480c76928153c547c68fac
+RWSE3ohX2g5d/b1LXsyh30rzT4Oc+GnJ42IHhI93eNu92Gz/Bb23WZaZpxTpVbwvmuSMIy2uBBi1YeDk/9QCArELY8/PSkHZuw4=
+SHA256 (Pkgfile) = 3aabcd78deb59dc7794a34c43262487c227fe555c4961bc9f86475109814de34
SHA256 (.footprint) = 5129f4f7464bf8dd66d81be3bed82a3d0c7a965e6861e6c863d4bda7905bd5f5
SHA256 (irssi-1.2.2.tar.xz) = 6727060c918568ba2ff4295ad736128dba0b995d7b20491bca11f593bd857578
+SHA256 (glib-2-63.patch) = 6a899083058d83f4a2d134977202afebea845641b346303fde563bf6205cef8e
diff --git a/irssi/Pkgfile b/irssi/Pkgfile
index 4f32ac240..ecb085b12 100644
--- a/irssi/Pkgfile
+++ b/irssi/Pkgfile
@@ -5,24 +5,29 @@
name=irssi
version=1.2.2
-release=1
-source=(https://github.com/irssi-import/irssi/releases/download/$version/$name-$version.tar.xz)
+release=2
+source=(https://github.com/irssi-import/irssi/releases/download/$version/$name-$version.tar.xz
+ glib-2-63.patch)
build () {
- cd $name-$version
+ cd $name-$version
- ./configure \
- --prefix=/usr \
- --with-proxy \
- --with-perl-lib=site
+ patch -p1 -i $SRC/glib-2-63.patch
- make
- make DESTDIR=$PKG install
+ export CFLAGS+=" -Wno-deprecated-declarations"
- find $PKG \
- -name .packlist -or \
- -name perllocal.pod -or \
- -name '*.bs' -or \
- -name autosplit.ix | xargs rm
- rm -rf $PKG/usr/{include,share/doc}
+ ./configure \
+ --prefix=/usr \
+ --with-proxy \
+ --with-perl-lib=site
+
+ make
+ make DESTDIR=$PKG install
+
+ find $PKG \
+ -name .packlist -or \
+ -name perllocal.pod -or \
+ -name '*.bs' -or \
+ -name autosplit.ix | xargs rm
+ rm -rf $PKG/usr/{include,share/doc}
}
diff --git a/irssi/glib-2-63.patch b/irssi/glib-2-63.patch
new file mode 100644
index 000000000..63d26958b
--- /dev/null
+++ b/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:

Generated by cgit