public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/irssi/, net-irc/irssi/files/
Date: Mon,  5 Oct 2020 09:06:03 +0000 (UTC)	[thread overview]
Message-ID: <1601888758.ec0152d219b9d7db6859d8257072c1b78f12dd77.polynomial-c@gentoo> (raw)

commit:     ec0152d219b9d7db6859d8257072c1b78f12dd77
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  5 09:05:41 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Oct  5 09:05:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0152d2

net-irc/irssi: Revbump to fix input issue with >=dev-libs/glib-2.63

Thanks-to: Tomasz Golinski <tomaszg <AT> alpha.uwb.edu.pl>
Closes: https://bugs.gentoo.org/746704
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../irssi-1.2.2-glib-2.63_NUL_unicode_fix.patch    | 38 ++++++++++++
 net-irc/irssi/irssi-1.2.2-r1.ebuild                | 67 ++++++++++++++++++++++
 2 files changed, 105 insertions(+)

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
new file mode 100644
index 00000000000..63d26958b7b
--- /dev/null
+++ b/net-irc/irssi/files/irssi-1.2.2-glib-2.63_NUL_unicode_fix.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:

diff --git a/net-irc/irssi/irssi-1.2.2-r1.ebuild b/net-irc/irssi/irssi-1.2.2-r1.ebuild
new file mode 100644
index 00000000000..ed231dbb3fa
--- /dev/null
+++ b/net-irc/irssi/irssi-1.2.2-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+GENTOO_DEPEND_ON_PERL="no"
+
+inherit perl-module
+
+# Keep for _rc compability
+MY_P="${P/_/-}"
+
+DESCRIPTION="A modular textUI IRC client with IPv6 support"
+HOMEPAGE="https://irssi.org/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV/_/-}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+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"
+IUSE="otr +perl selinux socks5 +proxy libressl"
+
+COMMON_DEPEND="
+	sys-libs/ncurses:0=
+	>=dev-libs/glib-2.6.0
+	!libressl? ( dev-libs/openssl:= )
+	libressl? ( >=dev-libs/libressl-2.7.4:= )
+	otr? ( >=dev-libs/libgcrypt-1.2.0:0=
+		>=net-libs/libotr-4.1.0 )
+	perl? ( dev-lang/perl:= )
+	socks5? ( >=net-proxy/dante-1.1.18 )"
+
+DEPEND="
+	${COMMON_DEPEND}
+	virtual/pkgconfig"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	selinux? ( sec-policy/selinux-irc )"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.2.2-glib-2.63_NUL_unicode_fix.patch" #746704
+)
+
+src_configure() {
+	# Disable automagic dependency on dev-libs/libutf8proc (bug #677804)
+	export ac_cv_lib_utf8proc_utf8proc_version=no
+
+	local myeconfargs=(
+		--with-perl-lib=vendor
+		--enable-true-color
+		$(use_with otr)
+		$(use_with proxy)
+		$(use_with perl)
+		$(use_with socks5 socks)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	use perl && perl_delete_localpod
+	rm -f "${ED}"/usr/$(get_libdir)/irssi/modules/*.{a,la} || die
+}


             reply	other threads:[~2020-10-05  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  9:06 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-31 20:47 [gentoo-commits] repo/gentoo:master commit in: net-irc/irssi/, net-irc/irssi/files/ Sam James
2022-06-12 10:42 Sam James
2021-05-16  8:26 Mikle Kolyada
2019-02-12 21:22 Lars Wendler
2019-02-12 17:05 Mikle Kolyada
2018-10-22 14:56 Mikle Kolyada
2017-03-17 15:13 Jeroen Roovers
2017-01-07 13:43 Sven Wegener
2016-09-30 16:50 Sven Wegener
2016-09-26 20:57 Sven Wegener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1601888758.ec0152d219b9d7db6859d8257072c1b78f12dd77.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox