From 160c2401a5ad424662d58181da133be60d153489 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Fri, 31 Mar 2023 12:43:36 +0000 Subject: [PATCH 01/15] Merge pull request #1458 from ailin-nemui/help-toglev update level toggle help (cherry picked from commit c6ad171fe93573d73bb0ffad0e66de935c54ec15) --- docs/help/in/window.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/help/in/window.in b/docs/help/in/window.in index 23316911..2566668b 100644 --- a/docs/help/in/window.in +++ b/docs/help/in/window.in @@ -53,7 +53,7 @@ %|Add the required arguments for the given command. Without arguments, the details (size, immortality, levels, server, name and sticky group) of the currently active window are displayed. If used with a number as argument, same as WINDOW REFNUM. - %|LEVEL and HIDELEVEL modify the currently set level. Without arguments, the current level is displayed. Levels listed starting with `+' are added to the current levels. Levels listed starting with `-' are removed from the current levels. To clear the levels, start the new level setting with `NONE'. Levels listed starting with `^' are either removed or added from the current setting, depending on whether they were previously set or not (since Irssi 1.5). Levels listed as is are also added to the current levels. Afterwards, the new level setting is displayed. + %|LEVEL and HIDELEVEL modify the currently set level. Without arguments, the current level is displayed. Levels listed starting with `+' are added to the current levels. Levels listed starting with `-' are removed from the current levels. To clear the levels, start the new level setting with `NONE'. Levels listed starting with `^' are either removed or added from the current setting, depending on whether they were previously set or not (since Irssi 1.4.4). Levels listed as is are also added to the current levels. Afterwards, the new level setting is displayed. %9Description:%9 From 6b65492b65382215fc4eae047b024077a53ce0cc Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 4 Apr 2023 13:12:50 +0000 Subject: [PATCH 02/15] Merge pull request #1462 from mauke/upgrade-tilde-expand expand ~ to $HOME in /upgrade (cherry picked from commit 5c42345ea23a96bd0fbc28036af36e5db45d6059) --- src/core/session.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/core/session.c b/src/core/session.c index 5fe481fb..3a63a785 100644 --- a/src/core/session.c +++ b/src/core/session.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -59,13 +60,19 @@ void session_upgrade(void) static void cmd_upgrade(const char *data) { CONFIG_REC *session; - char *session_file, *str; + char *session_file, *str, *name; char *binary; if (*data == '\0') - data = irssi_binary; + name = irssi_binary; + else + name = convert_home(data); - if ((binary = g_find_program_in_path(data)) == NULL) + binary = g_find_program_in_path(name); + if (name != irssi_binary) + g_free(name); + + if (binary == NULL) cmd_return_error(CMDERR_PROGRAM_NOT_FOUND); /* save the session */ From 8afbd6511c095319406a37df16345ebb3d2f1449 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sat, 15 Apr 2023 14:08:31 +0000 Subject: [PATCH 03/15] Merge pull request #1467 from ScoreUnder/perl_warning_to_stderr Print perl import warning to STDERR (cherry picked from commit e732b601f7edd24b268051a8b6d62b8c7f1d9c82) --- src/perl/common/Irssi.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/perl/common/Irssi.pm b/src/perl/common/Irssi.pm index 786d0e52..bca0084b 100644 --- a/src/perl/common/Irssi.pm +++ b/src/perl/common/Irssi.pm @@ -153,7 +153,7 @@ eval { $in_irssi = $@ ? 0 : 1; if (!in_irssi()) { - print "Warning: This script should be run inside irssi\n"; + print STDERR "Warning: This script should be run inside irssi\n"; } else { bootstrap Irssi $VERSION if (!$static); From 7f67b5deb0ea59e866df4f3ec57b4fda62512aca Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 25 May 2023 11:00:40 +0000 Subject: [PATCH 04/15] Merge pull request #1471 from irssi/from-codeberg Sync (cherry picked from commit 274977a5879ca71d1a9b7ea7ce2f980325511a18) --- src/fe-common/irc/fe-irc-messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fe-common/irc/fe-irc-messages.c b/src/fe-common/irc/fe-irc-messages.c index 1419f934..5d820bbf 100644 --- a/src/fe-common/irc/fe-irc-messages.c +++ b/src/fe-common/irc/fe-irc-messages.c @@ -173,7 +173,7 @@ static void sig_message_own_action(IRC_SERVER_REC *server, const char *msg, oldtarget = target; target = fe_channel_skip_prefix(IRC_SERVER(server), target); if (server_ischannel(SERVER(server), target)) - item = irc_channel_find(server, target); + item = channel_find(SERVER(server), target); else item = irc_query_find(server, target); From 7f32ed012cc05b765b07f552b8cf2bcf3bd2730d Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 18 Jul 2023 22:05:28 +0000 Subject: [PATCH 05/15] Merge pull request #1474 from ailin-nemui/perl5380 fix usage of $type in ExtUtils::ParseXS 3.50 (cherry picked from commit da49ec62e6cc949d3e5359b88abbd0b038d3e23a) --- src/perl/common/typemap | 2 +- src/perl/irc/typemap | 2 +- src/perl/textui/typemap | 2 +- src/perl/ui/typemap | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/perl/common/typemap b/src/perl/common/typemap index 5b7e0c32..9b6c6668 100644 --- a/src/perl/common/typemap +++ b/src/perl/common/typemap @@ -28,5 +28,5 @@ T_IrssiObj $arg = iobject_bless((SERVER_REC *)$var); T_PlainObj - $arg = plain_bless($var, \"$type\"); + $arg = plain_bless($var, \"$ntype\"); diff --git a/src/perl/irc/typemap b/src/perl/irc/typemap index 9bf87647..c8a9b678 100644 --- a/src/perl/irc/typemap +++ b/src/perl/irc/typemap @@ -36,5 +36,5 @@ T_DccObj $arg = simple_iobject_bless((DCC_REC *)$var); T_PlainObj - $arg = plain_bless($var, \"$type\"); + $arg = plain_bless($var, \"$ntype\"); diff --git a/src/perl/textui/typemap b/src/perl/textui/typemap index 7710c2d2..e597c586 100644 --- a/src/perl/textui/typemap +++ b/src/perl/textui/typemap @@ -18,7 +18,7 @@ T_BufferLineWrapper OUTPUT T_PlainObj - $arg = plain_bless($var, \"$type\"); + $arg = plain_bless($var, \"$ntype\"); T_BufferLineWrapper $arg = perl_buffer_line_bless($var); diff --git a/src/perl/ui/typemap b/src/perl/ui/typemap index 4afb273d..98355191 100644 --- a/src/perl/ui/typemap +++ b/src/perl/ui/typemap @@ -13,5 +13,5 @@ T_PlainObj OUTPUT T_PlainObj - $arg = plain_bless($var, \"$type\"); + $arg = plain_bless($var, \"$ntype\"); From edfbc1f2f67eeb881673b0d83bd42e8afe89c4bf Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 19 Jul 2023 18:26:45 +0000 Subject: [PATCH 06/15] Merge pull request #1478 from ailin-nemui/buildperl update perl requirement in install file (cherry picked from commit 3f203dc3822b5f357fb3f64ce9020cf4ca367f46) --- INSTALL | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL b/INSTALL index 3dbe2ebd..376960d1 100644 --- a/INSTALL +++ b/INSTALL @@ -7,7 +7,7 @@ To compile Irssi you need: - meson-0.49 build system with ninja-1.5 or greater - glib-2.32 or greater - openssl (for ssl support) -- perl-5.6 or greater (for Perl support) +- perl-5.8 or greater (for building, and optionally Perl scripts) - terminfo or ncurses (for text frontend) For most people, this should work just fine: diff --git a/meson.build b/meson.build index 1a8c23f3..064376c4 100644 --- a/meson.build +++ b/meson.build @@ -394,7 +394,7 @@ int main() else xsubpp_file_c = meson.get_cross_property('perl_xsubpp', UNSET) if xsubpp_file_c == UNSET - xsubpp_file_c = run_command(build_perl, '-MExtUtils::ParseXS', '-Eprint $INC{"ExtUtils/ParseXS.pm"} =~ s{ParseXS\\.pm$}{xsubpp}r').stdout() + xsubpp_file_c = run_command(build_perl, '-MExtUtils::ParseXS', '-e($r = $INC{"ExtUtils/ParseXS.pm"}) =~ s{ParseXS\\.pm$}{xsubpp}; print $r').stdout() endif xsubpp = generator(build_perl, output : '@BASENAME@.c', From 590ca4dbdf5e6629c908091896d113473559cda0 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 9 Aug 2023 18:52:16 +0000 Subject: [PATCH 07/15] Merge pull request #1484 from ailin-nemui/realposix change realpath to use syntax based on _POSIX_VERSION (cherry picked from commit f9c9485d155c1b0545fb30b0d2d6d884079b2f76) --- src/lib-config/write.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/lib-config/write.c b/src/lib-config/write.c index 5dbbd1ed..b7c6edb5 100644 --- a/src/lib-config/write.c +++ b/src/lib-config/write.c @@ -305,6 +305,9 @@ int config_write(CONFIG_REC *rec, const char *fname, int create_mode) const char *base_name; char *tmp_name = NULL; char *dest_name = NULL; +#if !defined(_POSIX_VERSION) || _POSIX_VERSION < 200809L + char resolved_path[PATH_MAX] = { 0 }; +#endif g_return_val_if_fail(rec != NULL, -1); g_return_val_if_fail(fname != NULL || rec->fname != NULL, -1); @@ -313,16 +316,15 @@ int config_write(CONFIG_REC *rec, const char *fname, int create_mode) base_name = fname != NULL ? fname : rec->fname; /* expand all symlinks; else we may replace a symlink with a regular file */ - dest_name = realpath(base_name, NULL); - - if (errno == EINVAL) { - /* variable path length not supported by glibc < 2.3, Solaris < 11 */ - char resolved_path[PATH_MAX] = { 0 }; - errno = 0; - if ((dest_name = realpath(base_name, resolved_path)) != NULL) { - dest_name = g_strdup(dest_name); - } +#if !defined(_POSIX_VERSION) || _POSIX_VERSION < 200809L + /* variable path length not supported by glibc < 2.3, Solaris < 11 */ + errno = 0; + if ((dest_name = realpath(base_name, resolved_path)) != NULL) { + dest_name = g_strdup(dest_name); } +#else + dest_name = realpath(base_name, NULL); +#endif if (dest_name == NULL) { if (errno == ENOENT) { From 5a0dc0db093b11e7c2c5fcfb5f68165f566863cb Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 12 Sep 2023 14:53:59 +0000 Subject: [PATCH 08/15] Merge pull request #1488 from emilengler/remove-unused-var core: remove unused len variable (cherry picked from commit f04375668c569b1a8ded8a127f9e3d9ffe8f019d) --- src/irc/core/netsplit.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/irc/core/netsplit.c b/src/irc/core/netsplit.c index 38b63fe5..4a902c9e 100644 --- a/src/irc/core/netsplit.c +++ b/src/irc/core/netsplit.c @@ -222,7 +222,7 @@ NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server, int quitmsg_is_split(const char *msg) { const char *host2, *p; - int prev, len, host1_dot, host2_dot; + int prev, host1_dot, host2_dot; g_return_val_if_fail(msg != NULL, FALSE); @@ -242,7 +242,8 @@ int quitmsg_is_split(const char *msg) - can't contain ':' or '/' chars (some servers allow URLs) */ host2 = NULL; - prev = '\0'; len = 0; host1_dot = host2_dot = 0; + prev = '\0'; + host1_dot = host2_dot = 0; while (*msg != '\0') { if (*msg == ' ') { if (prev == '.' || prev == '\0') { @@ -254,7 +255,7 @@ int quitmsg_is_split(const char *msg) return FALSE; /* only one space allowed */ if (!host1_dot) return FALSE; /* host1 didn't have domain */ - host2 = msg+1; len = -1; + host2 = msg + 1; } else if (*msg == '.') { if (prev == '\0' || prev == ' ' || prev == '.') { /* domains can't start with '.' @@ -270,7 +271,7 @@ int quitmsg_is_split(const char *msg) return FALSE; prev = *msg; - msg++; len++; + msg++; } if (!host2_dot || prev == '.') From 1226a587b729866027f962eefaba59bfece573e4 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 6 Sep 2023 14:04:20 +0000 Subject: [PATCH 09/15] Merge pull request #1492 from ailin-nemui/meson-apple document meson apple workaround (cherry picked from commit 8c8e4e34d48c4f9bc830f88f6dbb7c6cc6861ac9) --- INSTALL | 8 ++++++++ docs/meson-macos-ar.txt | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 docs/meson-macos-ar.txt diff --git a/INSTALL b/INSTALL index 376960d1..9c6245a1 100644 --- a/INSTALL +++ b/INSTALL @@ -144,3 +144,11 @@ Getting perl scripting to work needs a few things: It doesn't hurt to be defined everywhere, so configure irssi with: CFLAGS='-DUSEIMPORTLIB' ./configure --with-perl-staticlib + + + Apple MacOS / Darwin + +At the time of writing, meson has an open issue with correctly linking +libraries on macos. + +See docs/meson-macos-ar.txt for a workaround. diff --git a/docs/meson-macos-ar.txt b/docs/meson-macos-ar.txt new file mode 100644 index 00000000..77e5cb8e --- /dev/null +++ b/docs/meson-macos-ar.txt @@ -0,0 +1,6 @@ +;; manual workaround for meson bug https://github.com/mesonbuild/meson/issues/11165 +;; fixes compilation with meson on apple macos +;; usage: meson --native-file ./docs/meson-macos-ar.txt ... + +[binaries] +ar = ['/bin/sh', '-c', 'ar=${AR:-ar}; ranlib=${RANLIB:-ranlib -c -}; case "x$1" in xcsr*) $ar "$@" && $ranlib "$2" || exit $?; ;; *) exec $ar "$@"; ;; esac;', 'ar'] From db4dad3dd0bc7185c862016ae9fc92bc132b9cef Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 12 Sep 2023 11:27:03 +0000 Subject: [PATCH 10/15] Merge pull request #1493 from ailin-nemui/macsuffix add explicit name_suffix to shared modules (cherry picked from commit f1c9fb4296f1f2795d61b031302bfd9fe1fc7d6b) --- meson.build | 10 ++++++++++ src/irc/proxy/meson.build | 1 + src/otr/meson.build | 1 + src/perl/common/meson.build | 1 + src/perl/irc/meson.build | 1 + src/perl/meson.build | 2 ++ src/perl/textui/meson.build | 1 + src/perl/ui/meson.build | 1 + 8 files changed, 18 insertions(+) diff --git a/meson.build b/meson.build index 064376c4..700fac21 100644 --- a/meson.build +++ b/meson.build @@ -73,6 +73,16 @@ def_scriptdir = '-D' + 'SCRIPTDIR' + '="' + (get_option('prefix') / scriptdir) def_suppress_printf_fallback = '-D' + 'SUPPRESS_PRINTF_FALLBACK' + +module_suffix = [] +perl_module_suffix = [] +# Meson uses the wrong module extensions on Mac. +# https://gitlab.gnome.org/GNOME/glib/issues/520 +if ['darwin', 'ios'].contains(host_machine.system()) + module_suffix = 'so' + perl_module_suffix = 'bundle' +endif + ############## # Help files # ############## diff --git a/src/irc/proxy/meson.build b/src/irc/proxy/meson.build index be91c7d5..30ac90a4 100644 --- a/src/irc/proxy/meson.build +++ b/src/irc/proxy/meson.build @@ -9,6 +9,7 @@ shared_module('irc_proxy', + [ irssi_version_h ], include_directories : rootinc, implicit_include_directories : false, + name_suffix : module_suffix, install : true, install_dir : moduledir, dependencies : dep, diff --git a/src/otr/meson.build b/src/otr/meson.build index 10b9fa55..5b7d256f 100644 --- a/src/otr/meson.build +++ b/src/otr/meson.build @@ -11,6 +11,7 @@ shared_module('otr_core', ), include_directories : rootinc, implicit_include_directories : false, + name_suffix : module_suffix, install : true, install_dir : moduledir, dependencies : dep, diff --git a/src/perl/common/meson.build b/src/perl/common/meson.build index f2a69bc9..4162756b 100644 --- a/src/perl/common/meson.build +++ b/src/perl/common/meson.build @@ -20,6 +20,7 @@ libperl_Irssi_a = shared_module('Irssi', ) + [ irssi_version_h ], name_prefix : '', + name_suffix : perl_module_suffix, install : true, install_dir : perlmoddir / 'auto' / 'Irssi', include_directories : rootinc, diff --git a/src/perl/irc/meson.build b/src/perl/irc/meson.build index 0a8fd9f9..c83d4b49 100644 --- a/src/perl/irc/meson.build +++ b/src/perl/irc/meson.build @@ -21,6 +21,7 @@ libperl_Irssi_Irc_a = shared_module('Irc', 'module.h', ), name_prefix : '', + name_suffix : perl_module_suffix, install : true, install_dir : perlmoddir / 'auto' / 'Irssi' / 'Irc', include_directories : rootinc, diff --git a/src/perl/meson.build b/src/perl/meson.build index d81173d9..0ae1ec26 100644 --- a/src/perl/meson.build +++ b/src/perl/meson.build @@ -34,6 +34,7 @@ libperl_core_a = shared_module('perl_core', ], include_directories : [ rootinc ] + [ generated_files_inc ], implicit_include_directories : false, + name_suffix : module_suffix, install : true, install_dir : moduledir, install_rpath : perl_rpath, @@ -57,6 +58,7 @@ libfe_perl_a = shared_module('fe_perl', ], include_directories : rootinc, implicit_include_directories : false, + name_suffix : module_suffix, install : true, install_dir : moduledir, dependencies : dep, diff --git a/src/perl/textui/meson.build b/src/perl/textui/meson.build index 1705fa36..429e988e 100644 --- a/src/perl/textui/meson.build +++ b/src/perl/textui/meson.build @@ -17,6 +17,7 @@ libperl_Irssi_TextUI_a = shared_module('TextUI', 'module.h', ), name_prefix : '', + name_suffix : perl_module_suffix, install : true, install_dir : perlmoddir / 'auto' / 'Irssi' / 'TextUI', include_directories : rootinc, diff --git a/src/perl/ui/meson.build b/src/perl/ui/meson.build index 14bc7699..26ef42eb 100644 --- a/src/perl/ui/meson.build +++ b/src/perl/ui/meson.build @@ -15,6 +15,7 @@ libperl_Irssi_UI_a = shared_module('UI', 'module.h', ), name_prefix : '', + name_suffix : perl_module_suffix, install : true, install_dir : perlmoddir / 'auto' / 'Irssi' / 'UI', include_directories : rootinc, From 7145e1ef20957c6aab6b9109108accadebc31c64 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sat, 9 Sep 2023 11:00:37 +0000 Subject: [PATCH 11/15] Merge pull request #1494 from RealKindOne/master Add -notls and -notls_verify into help file and src/core/chat-commands.c (cherry picked from commit e7f1268478dc07e356e7fc0d79b3f810f4d05e8f) --- docs/help/in/server.in | 4 +++- src/core/chat-commands.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/help/in/server.in b/docs/help/in/server.in index 47b2d524..84b5ad78 100644 --- a/docs/help/in/server.in +++ b/docs/help/in/server.in @@ -16,11 +16,13 @@ -4: Connects using IPv4. -6: Connects using IPv6. -tls: Connects using TLS encryption. + -notls: Connect without TLS encrption. -tls_cert: The TLS client certificate file. -tls_pkey: The TLS client private key, if not included in the certificate file. -tls_pass: The password for the TLS client private key or certificate. - -tls_verify: Verifies the TLS certificate of the server. + -tls_verify: Verifies the TLS certificate of the server. + -notls_verify: Doesn't verify the TLS certificate of the server. -tls_cafile: The file with the list of CA certificates. -tls_capath: The directory which contains the CA certificates. -tls_ciphers: TLS cipher suite preference lists. diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c index a88a27ab..faeec451 100644 --- a/src/core/chat-commands.c +++ b/src/core/chat-commands.c @@ -211,8 +211,8 @@ static void cmd_server(const char *data, SERVER_REC *server, WI_ITEM_REC *item) command_runsub("server", data, server, item); } -/* SYNTAX: SERVER CONNECT [-4 | -6] [-tls] [-tls_cert ] [-tls_pkey ] - [-tls_pass ] [-tls_verify] [-tls_cafile ] +/* SYNTAX: SERVER CONNECT [-4 | -6] [-tls | -notls] [-tls_cert ] [-tls_pkey ] + [-tls_pass ] [-tls_verify | -notls_verify] [-tls_cafile ] [-tls_capath ] [-tls_ciphers ] [-tls_pinned_cert ] [-tls_pinned_pubkey ] [-!] [-noautosendcmd] [-nocap] From 91593cfec39725d8505ef3f7fbb885073972b534 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 13 Sep 2023 20:55:21 +0000 Subject: [PATCH 12/15] Merge pull request #1495 from ailin-nemui/terminclude fe-text: include the real tputs(3) from term.h (cherry picked from commit db32744ee42ff30cfa710d32ef1c8bbc6f2ff9a1) --- src/fe-text/term-terminfo.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 78496a64..9902bc03 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -30,6 +30,13 @@ #include #include +#ifdef HAVE_TERM_H +#include +#else +/* TODO: This needs arguments, starting with C2X. */ +int tputs(); +#endif + /* returns number of characters in the beginning of the buffer being a a single character, or -1 if more input is needed. The character will be saved in result */ @@ -314,9 +321,6 @@ inline static int term_putchar(int c) return fputc(c, current_term->out); } -/* copied from terminfo-core.c */ -int tputs(); - static int termctl_set_color_24bit(int bg, unsigned int lc) { static char buf[20]; From 6438fcfe70712a019138cd0b4321867db74418e8 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sun, 1 Oct 2023 11:31:07 +0000 Subject: [PATCH 13/15] Merge pull request #1498 from ailin-nemui/perl5380locale Restore locale after loading Perl (cherry picked from commit 48bc90eb17ec3c6549afd69c5d6f16d07fd57db0) --- src/perl/irssi-core.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/perl/irssi-core.pl b/src/perl/irssi-core.pl index 46066a38..0999de9e 100644 --- a/src/perl/irssi-core.pl +++ b/src/perl/irssi-core.pl @@ -52,3 +52,10 @@ sub eval_file { die "cap_sasl has been unloaded from Irssi ".Irssi::version()." because it conflicts with the built-in SASL support. See /help network for configuring SASL or read the ChangeLog for more information."; } } + +if ( $] >= 5.037005 && $] <= 5.038000 ) { + # https://github.com/Perl/perl5/issues/21366 + print STDERR "\e7 \e[A Irssi: applying locale workaround for Perl 5.38.0 \e8"; + require POSIX; + POSIX::setlocale(&POSIX::LC_ALL, ""); +} From ce4dd911bc6e8fdf819c8b40365855f9bab3a7ec Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 14 Sep 2023 13:32:44 +0000 Subject: [PATCH 14/15] Merge pull request #1497 from ailin-nemui/github-workflow-error Slightly improve GitHub workflow (cherry picked from commit 2a1291f26f6dc47b1d3169d18faba8f995bd3ea6) --- .github/workflows/check.yml | 57 ++++++++++++++++++++++++++++++++++--- meson.build | 5 ++++ 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 97cb3feb..3e324649 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -114,9 +114,58 @@ jobs: ^set -clear log_day_changed ^set -clear log_open_string ^set log_timestamp * - ^window log on' > irssi-test/startup - echo load perl >> irssi-test/startup - echo load proxy >> irssi-test/startup - echo ^quit >> irssi-test/startup + ^window log on + load perl + load otr + load proxy + ^quit' > irssi-test/startup + irssi-build/bin/irssi --home irssi-test | perl -Mutf8 -C ~/render.pl + cat irc.log.* + annotation-warnings: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + env: + CC: clang + steps: + - name: prepare required software + run: | + sudo apt update && sudo apt install $apt_build_deps + - uses: actions/checkout@main + - name: Setup local annotations + uses: irssi-import/actions-irssi/problem-matchers@master + - name: set PATH + run: | + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: prepare required software + env: + meson_ver: ${{ matrix.meson_ver }} + setuptools_ver: ${{ matrix.setuptools_ver }} + run: | + sudo apt update && sudo apt install $apt_build_deps $apt_build_deps_meson + eval "$get_pip_build_deps_meson" + curl -SLf https://github.com/irssi-import/actions-irssi/raw/master/check-irssi/render.pl -o ~/render.pl && chmod +x ~/render.pl + - name: build and install with meson + run: | + meson Build $build_options_meson --prefix=${prefix/\~/~} + ninja -C Build + ninja -C Build install >/dev/null + - name: run launch test + env: + TERM: xterm + run: | + # automated irssi launch test + cd + mkdir irssi-test + echo 'echo automated irssi launch test + ^set settings_autosave off + ^set -clear log_close_string + ^set -clear log_day_changed + ^set -clear log_open_string + ^set log_timestamp * + ^window log on + load perl + load otr + load proxy + ^quit' > irssi-test/startup irssi-build/bin/irssi --home irssi-test | perl -Mutf8 -C ~/render.pl cat irc.log.* diff --git a/meson.build b/meson.build index 700fac21..b6ab6178 100644 --- a/meson.build +++ b/meson.build @@ -382,6 +382,11 @@ if want_perl if perl_version == UNSET perl_version = run_command(cross_perl, '-V::version:').stdout().split('\'')[1] endif + + # disable clang warning + if perl_version.version_compare('<5.35.2') + perl_cflags += cc.get_supported_arguments('-Wno-compound-token-split-by-macro') + endif perl_dep = declare_dependency(compile_args : perl_cflags, link_args : perl_ldflags, version : perl_version) From bcf07a2546b5adfecf0df56553f2e8be0920c6c5 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sun, 1 Oct 2023 15:46:01 +0200 Subject: [PATCH 15/15] tag as 1.4.5 --- NEWS | 21 +++++++++++++++++++++ configure.ac | 2 +- meson.build | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 63aea544..204d8f32 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,24 @@ +v1.4.5 2023-10-03 The Irssi team + + Add workaround for Perl 5.38.0 bug that breaks the Irssi + locale and glyph rendering (scripts.irssi.org#857, #1498) + - Fix Perl scripts broken by Perl 5.38 (scripts.irssi.org#851, + #1474). With input from Leon Timmermans + - Document workaround to fix linker errors when building with + meson on Apple (#1435, #1492) + - Fix meson using wrong filenames on Apple, leading to broken + Perl support (#1483, #1493) + - Fix /upgrade not accepting `~' (#1460, #1462). By Lukas Mai + - Improve compatibility with Perl5-IDEA (#1465, #1467). By + Charlie Daffern + - Fix logic in how own actions are printed for other protocols + (codeberg!5, #1471). By Andrej Kacian + - Fix crash on old PowerPC Mac (#1482, #1484) + - Fix wrong prototype of library function used in terminal + handling (#1495). By Emil Engler + - Minor cleanups (#1488, #1497). Includes work by Emil Engler + - Minor help and documentation fixes (#1458, #1494, #1477, + #1478). Includes work by KindOne + v1.4.4 2023-03-31 The Irssi team * Expose location of signals.txt via pkg-config (codeberg!1, #1439, #1446, #1447). By Andrej Kacian diff --git a/configure.ac b/configure.ac index 5c5ba3c6..9a5c2521 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(irssi, 1.4.4) +AC_INIT(irssi, 1.4.5) AC_CONFIG_SRCDIR([src]) AC_CONFIG_AUX_DIR(build-aux) AC_PREREQ(2.50) diff --git a/meson.build b/meson.build index b6ab6178..99809868 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('irssi', 'c', - version : '1.4.4', + version : '1.4.5', meson_version : '>=0.49', default_options : ['warning_level=1'])