This commit is contained in:
ailin-nemui 2026-01-24 11:29:02 +01:00 committed by GitHub
commit 8abd86943b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 46 additions and 31 deletions

View file

@ -3,7 +3,7 @@ name: abicheck
env: env:
build_options: -Dbuildtype=debug -Denable-true-color=yes -Dwith-proxy=yes -Dc_args=-DPERL_EUPXS_ALWAYS_EXPORT build_options: -Dbuildtype=debug -Denable-true-color=yes -Dwith-proxy=yes -Dc_args=-DPERL_EUPXS_ALWAYS_EXPORT
prefix: /usr/local prefix: /usr/local
apt_build_deps: ninja-build libutf8proc-dev libperl-dev libotr5-dev apt_build_deps: ninja-build libutf8proc-dev libperl-dev libotr5-dev libglib2.0-dev
get_pip_build_deps: pip3 install setuptools; pip3 install wheel; pip3 install 'meson<0.59.0' get_pip_build_deps: pip3 install setuptools; pip3 install wheel; pip3 install 'meson<0.59.0'
getabidef_def: getabidef() { awk '$1=="#define" && $2=="IRSSI_ABI_VERSION" { print $3 }' "$1"/include/irssi/src/common.h; } getabidef_def: getabidef() { awk '$1=="#define" && $2=="IRSSI_ABI_VERSION" { print $3 }' "$1"/include/irssi/src/common.h; }
jobs: jobs:
@ -17,7 +17,7 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: prepare required software - name: prepare required software
run: | run: |
sudo apt install $apt_build_deps sudo apt update; sudo apt install $apt_build_deps
eval "$get_pip_build_deps" eval "$get_pip_build_deps"
- name: checkout base ref - name: checkout base ref
uses: actions/checkout@main uses: actions/checkout@main
@ -36,8 +36,8 @@ jobs:
base_abi=$(getabidef base$prefix) base_abi=$(getabidef base$prefix)
echo base abi : $base_abi echo base abi : $base_abi
./base$prefix/bin/irssi --version ./base$prefix/bin/irssi --version
echo "::set-output name=base_abi::$base_abi" echo base_abi=$base_abi >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v4
with: with:
name: base.inst name: base.inst
path: base path: base
@ -52,7 +52,7 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: prepare required software - name: prepare required software
run: | run: |
sudo apt install $apt_build_deps sudo apt update; sudo apt install $apt_build_deps
eval "$get_pip_build_deps" eval "$get_pip_build_deps"
- name: checkout merge ref - name: checkout merge ref
uses: actions/checkout@main uses: actions/checkout@main
@ -70,8 +70,8 @@ jobs:
merge_abi=$(getabidef merge$prefix) merge_abi=$(getabidef merge$prefix)
echo merge abi : $merge_abi echo merge abi : $merge_abi
./merge$prefix/bin/irssi --version ./merge$prefix/bin/irssi --version
echo "::set-output name=merge_abi::$merge_abi" echo merge_abi=$merge_abi >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v4
with: with:
name: merge.inst name: merge.inst
path: merge path: merge
@ -87,14 +87,14 @@ jobs:
steps: steps:
- name: prepare required software - name: prepare required software
run: | run: |
sudo apt install abigail-tools sudo apt update; sudo apt install abigail-tools
- name: fetch base build - name: fetch base build
uses: actions/download-artifact@v2 uses: actions/download-artifact@v4
with: with:
name: base.inst name: base.inst
path: base path: base
- name: fetch merge build - name: fetch merge build
uses: actions/download-artifact@v2 uses: actions/download-artifact@v4
with: with:
name: merge.inst name: merge.inst
path: merge path: merge
@ -103,7 +103,7 @@ jobs:
abipkgdiff -l base merge >abipkgdiff.out && diff_ret=0 || diff_ret=$? abipkgdiff -l base merge >abipkgdiff.out && diff_ret=0 || diff_ret=$?
echo "diff_ret=$diff_ret" >> $GITHUB_ENV echo "diff_ret=$diff_ret" >> $GITHUB_ENV
cat abipkgdiff.out cat abipkgdiff.out
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v4
with: with:
path: abipkgdiff.out path: abipkgdiff.out
- run: | - run: |

View file

@ -5,7 +5,7 @@ on:
pull_request: pull_request:
name: Check Irssi name: Check Irssi
env: env:
apt_build_deps: libutf8proc-dev libperl-dev libotr5-dev apt_build_deps: libutf8proc-dev libperl-dev libotr5-dev libglib2.0-dev
apt_build_deps_meson: ninja-build apt_build_deps_meson: ninja-build
apt_build_deps_autotools: autoconf automake libtool apt_build_deps_autotools: autoconf automake libtool
get_pip_build_deps_meson: pip3 install setuptools${setuptools_ver}; pip3 install wheel; pip3 install meson${meson_ver} get_pip_build_deps_meson: pip3 install setuptools${setuptools_ver}; pip3 install wheel; pip3 install meson${meson_ver}
@ -25,7 +25,7 @@ jobs:
# make dist # make dist
./autogen.sh $build_options_configure ./autogen.sh $build_options_configure
make dist make dist
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v4
with: with:
path: irssi-*.tar.gz path: irssi-*.tar.gz
retention-days: 1 retention-days: 1
@ -38,24 +38,24 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-18.04, ubuntu-latest] os: [ubuntu-20.04, ubuntu-latest]
builder: [meson, configure] builder: [meson, configure]
compiler: [clang, gcc] compiler: [clang, gcc]
flags: [regular] flags: [regular]
include: include:
- os: ubuntu-18.04 - os: ubuntu-20.04
builder: meson builder: meson
meson_ver: ==0.49.2 meson_ver: ==0.53.2
setuptools_ver: <51 setuptools_ver: <51
- os: ubuntu-latest - os: ubuntu-latest
builder: meson builder: meson
meson_ver: <0.60.0 meson_ver: <0.63.0
- os: ubuntu-latest - os: ubuntu-latest
builder: meson builder: meson
flags: meson-latest FAILURE-OK flags: meson-latest FAILURE-OK
steps: steps:
- name: fetch dist - name: fetch dist
uses: actions/download-artifact@v2 uses: actions/download-artifact@v4
- name: set PATH - name: set PATH
run: | run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.local/bin" >> $GITHUB_PATH

View file

@ -44,7 +44,7 @@ jobs:
dry-run: false dry-run: false
sanitizer: ${{ matrix.sanitizer }} sanitizer: ${{ matrix.sanitizer }}
- name: Upload Crash - name: Upload Crash
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success' if: failure() && steps.build.outcome == 'success'
with: with:
name: ${{ matrix.sanitizer }}-artifacts name: ${{ matrix.sanitizer }}-artifacts

View file

@ -22,7 +22,7 @@ jobs:
| |
CLANG_FORMAT=clang-format-14 git-clang-format-14 --diff FETCH_HEAD HEAD | tee git-clang-format.diff CLANG_FORMAT=clang-format-14 git-clang-format-14 --diff FETCH_HEAD HEAD | tee git-clang-format.diff
cmp -s <(echo no modified files to format) git-clang-format.diff || cmp -s <(echo -n) git-clang-format.diff cmp -s <(echo no modified files to format) git-clang-format.diff || cmp -s <(echo -n) git-clang-format.diff
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: git-clang-format.diff name: git-clang-format.diff

View file

@ -52,10 +52,3 @@ 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."; 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, "");
}

View file

@ -18,6 +18,11 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <wchar.h>
#define NEED_PERL_H #define NEED_PERL_H
#define PERL_NO_GET_CONTEXT #define PERL_NO_GET_CONTEXT
#include "module.h" #include "module.h"
@ -111,15 +116,18 @@ static void xs_init(pTHX)
void perl_scripts_init(void) void perl_scripts_init(void)
{ {
char *code, *use_code; char *code, *use_code;
int broken_perl;
perl_scripts = NULL; perl_scripts = NULL;
perl_sources_start(); perl_sources_start();
perl_signals_start(); perl_signals_start();
my_perl = perl_alloc(); my_perl = perl_alloc();
broken_perl = wcwidth(160);
perl_construct(my_perl); perl_construct(my_perl);
broken_perl = broken_perl != wcwidth(160);
perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args)-1, perl_args, NULL); perl_parse(my_perl, xs_init, G_N_ELEMENTS(perl_args) - 1, perl_args, NULL);
#if PERL_STATIC_LIBS == 1 #if PERL_STATIC_LIBS == 1
perl_eval_pv("Irssi::Core::->boot_Irssi_Core(0.9);", TRUE); perl_eval_pv("Irssi::Core::->boot_Irssi_Core(0.9);", TRUE);
#endif #endif
@ -129,6 +137,20 @@ void perl_scripts_init(void)
use_code = perl_get_use_list(); use_code = perl_get_use_list();
code = g_strdup_printf(irssi_core_code, PERL_STATIC_LIBS, use_code); code = g_strdup_printf(irssi_core_code, PERL_STATIC_LIBS, use_code);
perl_eval_pv(code, TRUE); perl_eval_pv(code, TRUE);
if (broken_perl) {
g_warning("applying locale workaround for Perl %d.%d, see "
"https://github.com/Perl/perl5/issues/21366",
PERL_REVISION, PERL_VERSION);
perl_eval_pv("package Irssi::Core;"
/* https://github.com/Perl/perl5/issues/21746 */
"if ( $] == $] )"
"{"
"require POSIX;"
"POSIX::setlocale(&POSIX::LC_ALL, \"\");"
"}"
"1;",
TRUE);
}
g_free(code); g_free(code);
g_free(use_code); g_free(use_code);