pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/chat/hexchat hexchat: Backport a message parser fix an...
details: https://anonhg.NetBSD.org/pkgsrc/rev/878ca7e6633d
branches: trunk
changeset: 405679:878ca7e6633d
user: nia <nia%pkgsrc.org@localhost>
date: Wed Dec 04 11:57:05 2019 +0000
description:
hexchat: Backport a message parser fix and clean up the Makefile a bit.
This fixes some small problems (e.g. with the display of the date the topic
was set) when connecting to IRC networks running newer, standards-compliant
server implementations.
I'm backporting these fixes because I'm not expecting a new HexChat release
to be made any time soon.
Bump PKGREVISION
diffstat:
chat/hexchat/Makefile | 21 ++++------
chat/hexchat/distinfo | 5 ++-
chat/hexchat/options.mk | 3 +-
chat/hexchat/patches/patch-src_common_modes.c | 26 +++++++++++++
chat/hexchat/patches/patch-src_common_proto-irc.c | 44 +++++++++++++++++++++++
chat/hexchat/patches/patch-src_common_proto-irc.h | 17 ++++++++
6 files changed, 102 insertions(+), 14 deletions(-)
diffs (181 lines):
diff -r 468b7d508a7c -r 878ca7e6633d chat/hexchat/Makefile
--- a/chat/hexchat/Makefile Wed Dec 04 11:46:56 2019 +0000
+++ b/chat/hexchat/Makefile Wed Dec 04 11:57:05 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.38 2019/10/07 09:28:09 prlw1 Exp $
+# $NetBSD: Makefile,v 1.39 2019/12/04 11:57:05 nia Exp $
DISTNAME= hexchat-2.14.2
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= chat
MASTER_SITES= https://dl.hexchat.net/hexchat/
EXTRACT_SUFX= .tar.xz
@@ -20,17 +20,12 @@
# XXX fails without GNU msgfmt
_TOOLS_USE_PKGSRC.msgfmt= yes
-.include "options.mk"
+# Meson
+PYTHON_VERSIONS_INCOMPATIBLE= 27
MESON_ARGS+= -Dwith-text=true
MESON_ARGS+= -Dwith-appdata=false
-# XXX meson
-PYTHON_VERSIONS_INCOMPATIBLE= 27
-.if empty(PKG_OPTIONS:Mpython)
-PYTHON_FOR_BUILD_ONLY= yes
-.endif
-.include "../../lang/python/pyversion.mk"
REPLACE_PYTHON+= plugins/perl/generate_header.py
REPLACE_PYTHON+= src/common/make-te.py
REPLACE_PYTHON+= meson_post_install.py
@@ -42,12 +37,14 @@
LDFLAGS.SunOS+= -lsocket -lnsl
+.include "options.mk"
.include "../../devel/meson/build.mk"
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/pango/buildlink3.mk"
+.include "../../lang/python/pyversion.mk"
.include "../../textproc/iso-codes/buildlink3.mk"
-.include "../../devel/pango/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
-.include "../../converters/libiconv/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
-.include "../../devel/glib2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 468b7d508a7c -r 878ca7e6633d chat/hexchat/distinfo
--- a/chat/hexchat/distinfo Wed Dec 04 11:46:56 2019 +0000
+++ b/chat/hexchat/distinfo Wed Dec 04 11:57:05 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2019/07/17 10:53:22 nia Exp $
+$NetBSD: distinfo,v 1.10 2019/12/04 11:57:05 nia Exp $
SHA1 (hexchat-2.14.2.tar.xz) = 650f6247cc68c022ba4fee09ebde578dc2ec1c33
RMD160 (hexchat-2.14.2.tar.xz) = a41067f7dd9b0eceaf2252aa7a8b8eca7dd228fd
@@ -10,3 +10,6 @@
SHA1 (patch-plugins_sysinfo_unix_pci.c) = db2d20261419bed6d6c4b716b4416d73b3386053
SHA1 (patch-plugins_sysinfo_unix_pci.h) = 018b74796143b26d6a1f9ad821f3889b74b09cc8
SHA1 (patch-src_common_meson.build) = 56f1376208c6ab198162d62ae990c8a6ed6c2b58
+SHA1 (patch-src_common_modes.c) = aa9972dcd405600a850173cd0605f4df3dc464af
+SHA1 (patch-src_common_proto-irc.c) = 93c92648a2781a21cd00e14e3dbc230c04ca1b50
+SHA1 (patch-src_common_proto-irc.h) = c9153d74a7abd39d511b59288c9245052216ee09
diff -r 468b7d508a7c -r 878ca7e6633d chat/hexchat/options.mk
--- a/chat/hexchat/options.mk Wed Dec 04 11:46:56 2019 +0000
+++ b/chat/hexchat/options.mk Wed Dec 04 11:57:05 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.8 2019/11/02 22:18:22 rillig Exp $
+# $NetBSD: options.mk,v 1.9 2019/12/04 11:57:05 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.hexchat
PKG_SUPPORTED_OPTIONS= dbus gtk2 libcanberra libnotify libpci libproxy
@@ -95,4 +95,5 @@
MESON_ARGS+= -Dwith-python=python-${PYVERSSUFFIX}
.else
MESON_ARGS+= -Dwith-python=false
+PYTHON_FOR_BUILD_ONLY= tool
.endif
diff -r 468b7d508a7c -r 878ca7e6633d chat/hexchat/patches/patch-src_common_modes.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/hexchat/patches/patch-src_common_modes.c Wed Dec 04 11:57:05 2019 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_common_modes.c,v 1.1 2019/12/04 11:57:05 nia Exp $
+
+Fixes a message parser bug.
+
+https://github.com/hexchat/hexchat/commit/804f959a1d0c9bfe88166a7541af4371460b468b.patch
+
+--- src/common/modes.c.orig 2018-08-29 21:13:25.000000000 +0000
++++ src/common/modes.c
+@@ -735,6 +735,8 @@ handle_mode (server * serv, char *word[]
+ if (!(*word[i + offset]))
+ break;
+ num_args++;
++ if (word[i + offset][0] == ':')
++ break;
+ }
+
+ /* count the number of modes (without the -/+ chars */
+@@ -765,7 +767,7 @@ handle_mode (server * serv, char *word[]
+ if ((all_modes_have_args || mode_has_arg (serv, sign, *modes)) && arg < (num_args + 1))
+ {
+ arg++;
+- argstr = word[arg + offset];
++ argstr = STRIP_COLON(word, word_eol, arg+offset);
+ }
+ handle_single_mode (&mr, sign, *modes, nick, chan,
+ argstr, numeric_324 || prefs.hex_irc_raw_modes,
diff -r 468b7d508a7c -r 878ca7e6633d chat/hexchat/patches/patch-src_common_proto-irc.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/hexchat/patches/patch-src_common_proto-irc.c Wed Dec 04 11:57:05 2019 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_common_proto-irc.c,v 1.1 2019/12/04 11:57:05 nia Exp $
+
+Fixes a message parser bug.
+
+https://github.com/hexchat/hexchat/commit/804f959a1d0c9bfe88166a7541af4371460b468b.patch
+
+--- src/common/proto-irc.c.orig 2018-08-29 21:13:25.000000000 +0000
++++ src/common/proto-irc.c
+@@ -714,7 +714,7 @@ process_numeric (session * sess, int n,
+ break;
+
+ case 333:
+- inbound_topictime (serv, word[4], word[5], atol (word[6]), tags_data);
++ inbound_topictime (serv, word[4], word[5], atol (STRIP_COLON(word, word_eol, 6)), tags_data);
+ break;
+
+ #if 0
+@@ -726,7 +726,7 @@ process_numeric (session * sess, int n,
+ #endif
+
+ case 341: /* INVITE ACK */
+- EMIT_SIGNAL_TIMESTAMP (XP_TE_UINVITE, sess, word[4], word[5],
++ EMIT_SIGNAL_TIMESTAMP (XP_TE_UINVITE, sess, word[4], STRIP_COLON(word, word_eol, 5),
+ serv->servername, NULL, 0, tags_data->timestamp);
+ break;
+
+@@ -1142,7 +1142,7 @@ process_named_msg (session *sess, char *
+ {
+
+ case WORDL('A','C','C','O'):
+- inbound_account (serv, nick, word[3], tags_data);
++ inbound_account (serv, nick, STRIP_COLON(word, word_eol, 3), tags_data);
+ return;
+
+ case WORDL('A', 'U', 'T', 'H'):
+@@ -1150,7 +1150,7 @@ process_named_msg (session *sess, char *
+ return;
+
+ case WORDL('C', 'H', 'G', 'H'):
+- inbound_user_info (sess, NULL, word[3], word[4], NULL, nick, NULL,
++ inbound_user_info (sess, NULL, word[3], STRIP_COLON(word, word_eol, 4), NULL, nick, NULL,
+ NULL, 0xff, tags_data);
+ return;
+
diff -r 468b7d508a7c -r 878ca7e6633d chat/hexchat/patches/patch-src_common_proto-irc.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/hexchat/patches/patch-src_common_proto-irc.h Wed Dec 04 11:57:05 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_common_proto-irc.h,v 1.1 2019/12/04 11:57:05 nia Exp $
+
+Fixes a message parser bug.
+
+https://github.com/hexchat/hexchat/commit/804f959a1d0c9bfe88166a7541af4371460b468b.patch
+
+--- src/common/proto-irc.h.orig 2018-08-29 21:13:25.000000000 +0000
++++ src/common/proto-irc.h
+@@ -28,6 +28,8 @@
+ (time_t)0, /* timestamp */ \
+ }
+
++#define STRIP_COLON(word, word_eol, idx) (word)[(idx)][0] == ':' ? (word_eol)[(idx)]+1 : (word)[(idx)]
++
+ /* Message tag information that might be passed along with a server message
+ *
+ * See http://ircv3.atheme.org/specification/capability-negotiation-3.1
Home |
Main Index |
Thread Index |
Old Index