1 |
commit: ec0152d219b9d7db6859d8257072c1b78f12dd77 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 5 09:05:41 2020 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 5 09:05:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0152d2 |
7 |
|
8 |
net-irc/irssi: Revbump to fix input issue with >=dev-libs/glib-2.63 |
9 |
|
10 |
Thanks-to: Tomasz Golinski <tomaszg <AT> alpha.uwb.edu.pl> |
11 |
Closes: https://bugs.gentoo.org/746704 |
12 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
13 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
14 |
|
15 |
.../irssi-1.2.2-glib-2.63_NUL_unicode_fix.patch | 38 ++++++++++++ |
16 |
net-irc/irssi/irssi-1.2.2-r1.ebuild | 67 ++++++++++++++++++++++ |
17 |
2 files changed, 105 insertions(+) |
18 |
|
19 |
diff --git a/net-irc/irssi/files/irssi-1.2.2-glib-2.63_NUL_unicode_fix.patch b/net-irc/irssi/files/irssi-1.2.2-glib-2.63_NUL_unicode_fix.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..63d26958b7b |
22 |
--- /dev/null |
23 |
+++ b/net-irc/irssi/files/irssi-1.2.2-glib-2.63_NUL_unicode_fix.patch |
24 |
@@ -0,0 +1,38 @@ |
25 |
+From a0544571a80196e5b7705f56e6e2cbcdf7b4d80e Mon Sep 17 00:00:00 2001 |
26 |
+From: ailin-nemui <ailin-nemui@××××××××××××××××××××.com> |
27 |
+Date: Thu, 23 Apr 2020 21:45:15 +0200 |
28 |
+Subject: [PATCH] manually handle NUL unicode in g_utf8_get_next_char_validated |
29 |
+ |
30 |
+A change in GLib 2.63 broke some assumptions in Irssi that the null-byte |
31 |
+NUL / U+0000 is a valid Unicode character. This would occur when the |
32 |
+user types Ctrl+Space. As a result, the input loop never manages to |
33 |
+process the NUL-byte (and any other user input that follows, ever). |
34 |
+ |
35 |
+This patch adds a manual check that properly advances the input loop if |
36 |
+GLib returns -2 (incomplete character) despite the length being positive |
37 |
+and a NUL is in first position. |
38 |
+ |
39 |
+Fixes #1180 |
40 |
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/967 |
41 |
+https://gitlab.gnome.org/GNOME/glib/-/issues/2093 |
42 |
+--- |
43 |
+ src/fe-text/term-terminfo.c | 6 +++++- |
44 |
+ 1 file changed, 5 insertions(+), 1 deletion(-) |
45 |
+ |
46 |
+diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c |
47 |
+index 5235f72d2..78496a64f 100644 |
48 |
+--- a/src/fe-text/term-terminfo.c |
49 |
++++ b/src/fe-text/term-terminfo.c |
50 |
+@@ -672,7 +672,11 @@ void term_stop(void) |
51 |
+ |
52 |
+ static int input_utf8(const unsigned char *buffer, int size, unichar *result) |
53 |
+ { |
54 |
+- unichar c = g_utf8_get_char_validated((char *)buffer, size); |
55 |
++ unichar c = g_utf8_get_char_validated((char *) buffer, size); |
56 |
++ |
57 |
++ /* GLib >= 2.63 do not accept Unicode NUL anymore */ |
58 |
++ if (c == (unichar) -2 && *buffer == 0 && size > 0) |
59 |
++ c = 0; |
60 |
+ |
61 |
+ switch (c) { |
62 |
+ case (unichar)-1: |
63 |
|
64 |
diff --git a/net-irc/irssi/irssi-1.2.2-r1.ebuild b/net-irc/irssi/irssi-1.2.2-r1.ebuild |
65 |
new file mode 100644 |
66 |
index 00000000000..ed231dbb3fa |
67 |
--- /dev/null |
68 |
+++ b/net-irc/irssi/irssi-1.2.2-r1.ebuild |
69 |
@@ -0,0 +1,67 @@ |
70 |
+# Copyright 1999-2020 Gentoo Authors |
71 |
+# Distributed under the terms of the GNU General Public License v2 |
72 |
+ |
73 |
+EAPI=6 |
74 |
+ |
75 |
+GENTOO_DEPEND_ON_PERL="no" |
76 |
+ |
77 |
+inherit perl-module |
78 |
+ |
79 |
+# Keep for _rc compability |
80 |
+MY_P="${P/_/-}" |
81 |
+ |
82 |
+DESCRIPTION="A modular textUI IRC client with IPv6 support" |
83 |
+HOMEPAGE="https://irssi.org/" |
84 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV/_/-}/${MY_P}.tar.xz" |
85 |
+ |
86 |
+LICENSE="GPL-2" |
87 |
+SLOT="0" |
88 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
89 |
+IUSE="otr +perl selinux socks5 +proxy libressl" |
90 |
+ |
91 |
+COMMON_DEPEND=" |
92 |
+ sys-libs/ncurses:0= |
93 |
+ >=dev-libs/glib-2.6.0 |
94 |
+ !libressl? ( dev-libs/openssl:= ) |
95 |
+ libressl? ( >=dev-libs/libressl-2.7.4:= ) |
96 |
+ otr? ( >=dev-libs/libgcrypt-1.2.0:0= |
97 |
+ >=net-libs/libotr-4.1.0 ) |
98 |
+ perl? ( dev-lang/perl:= ) |
99 |
+ socks5? ( >=net-proxy/dante-1.1.18 )" |
100 |
+ |
101 |
+DEPEND=" |
102 |
+ ${COMMON_DEPEND} |
103 |
+ virtual/pkgconfig" |
104 |
+ |
105 |
+RDEPEND=" |
106 |
+ ${COMMON_DEPEND} |
107 |
+ selinux? ( sec-policy/selinux-irc )" |
108 |
+ |
109 |
+RESTRICT="test" |
110 |
+ |
111 |
+S="${WORKDIR}/${MY_P}" |
112 |
+ |
113 |
+PATCHES=( |
114 |
+ "${FILESDIR}/${PN}-1.2.2-glib-2.63_NUL_unicode_fix.patch" #746704 |
115 |
+) |
116 |
+ |
117 |
+src_configure() { |
118 |
+ # Disable automagic dependency on dev-libs/libutf8proc (bug #677804) |
119 |
+ export ac_cv_lib_utf8proc_utf8proc_version=no |
120 |
+ |
121 |
+ local myeconfargs=( |
122 |
+ --with-perl-lib=vendor |
123 |
+ --enable-true-color |
124 |
+ $(use_with otr) |
125 |
+ $(use_with proxy) |
126 |
+ $(use_with perl) |
127 |
+ $(use_with socks5 socks) |
128 |
+ ) |
129 |
+ econf "${myeconfargs[@]}" |
130 |
+} |
131 |
+ |
132 |
+src_install() { |
133 |
+ default |
134 |
+ use perl && perl_delete_localpod |
135 |
+ rm -f "${ED}"/usr/$(get_libdir)/irssi/modules/*.{a,la} || die |
136 |
+} |