pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/chat/hexchat



Module Name:    pkgsrc
Committed By:   nia
Date:           Wed Dec  4 11:57:05 UTC 2019

Modified Files:
        pkgsrc/chat/hexchat: Makefile distinfo options.mk
Added Files:
        pkgsrc/chat/hexchat/patches: patch-src_common_modes.c
            patch-src_common_proto-irc.c patch-src_common_proto-irc.h

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 pkgsrc/chat/hexchat/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/chat/hexchat/distinfo
cvs rdiff -u -r1.8 -r1.9 pkgsrc/chat/hexchat/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/hexchat/patches/patch-src_common_modes.c \
    pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.c \
    pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/chat/hexchat/Makefile
diff -u pkgsrc/chat/hexchat/Makefile:1.38 pkgsrc/chat/hexchat/Makefile:1.39
--- pkgsrc/chat/hexchat/Makefile:1.38   Mon Oct  7 09:28:09 2019
+++ pkgsrc/chat/hexchat/Makefile        Wed Dec  4 11:57:05 2019
@@ -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 @@ PKGCONFIG_OVERRIDE+=        share/pkgconfig/hex
 # 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 @@ PLIST_SUBST+=               SOEXT=${SOEXT}
 
 LDFLAGS.SunOS+=                -lsocket -lnsl
 
+.include "options.mk"
 .include "../../devel/meson/build.mk"
-.include "../../textproc/iso-codes/buildlink3.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 "../../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"

Index: pkgsrc/chat/hexchat/distinfo
diff -u pkgsrc/chat/hexchat/distinfo:1.9 pkgsrc/chat/hexchat/distinfo:1.10
--- pkgsrc/chat/hexchat/distinfo:1.9    Wed Jul 17 10:53:22 2019
+++ pkgsrc/chat/hexchat/distinfo        Wed Dec  4 11:57:05 2019
@@ -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_parse.c
 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

Index: pkgsrc/chat/hexchat/options.mk
diff -u pkgsrc/chat/hexchat/options.mk:1.8 pkgsrc/chat/hexchat/options.mk:1.9
--- pkgsrc/chat/hexchat/options.mk:1.8  Sat Nov  2 22:18:22 2019
+++ pkgsrc/chat/hexchat/options.mk      Wed Dec  4 11:57:05 2019
@@ -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 @@ PLIST.python=         yes
 MESON_ARGS+=           -Dwith-python=python-${PYVERSSUFFIX}
 .else
 MESON_ARGS+=           -Dwith-python=false
+PYTHON_FOR_BUILD_ONLY= tool
 .endif

Added files:

Index: pkgsrc/chat/hexchat/patches/patch-src_common_modes.c
diff -u /dev/null pkgsrc/chat/hexchat/patches/patch-src_common_modes.c:1.1
--- /dev/null   Wed Dec  4 11:57:05 2019
+++ pkgsrc/chat/hexchat/patches/patch-src_common_modes.c        Wed Dec  4 11:57:05 2019
@@ -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,
Index: pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.c
diff -u /dev/null pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.c:1.1
--- /dev/null   Wed Dec  4 11:57:05 2019
+++ pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.c    Wed Dec  4 11:57:05 2019
@@ -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;
+ 
Index: pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.h
diff -u /dev/null pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.h:1.1
--- /dev/null   Wed Dec  4 11:57:05 2019
+++ pkgsrc/chat/hexchat/patches/patch-src_common_proto-irc.h    Wed Dec  4 11:57:05 2019
@@ -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