diff options
39 files changed, 698 insertions, 214 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82c96b160..a5e0ef1e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: - { name: "gcc", cc: "gcc", cxx: "g++", buildargs: "" } - { name: "gcc_ninja", cc: "gcc", cxx: "g++", buildargs: "-G Ninja" } - { name: "gcc_no_nls", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_NLS=OFF -DENABLE_DOC=OFF" } + - { name: "gcc_no_zstd", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_ZSTD=OFF -DENABLE_DOC=OFF" } - { name: "gcc_coverage", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_CODE_COVERAGE=ON" } - { name: "clang", cc: "clang", cxx: "clang++", buildargs: "" } diff --git a/CMakeLists.txt b/CMakeLists.txt index 6949c22a6..cc310a9ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,6 +99,7 @@ option(ENABLE_NCURSES "Compile the Ncurses interface" ON) option(ENABLE_HEADLESS "Compile the headless binary" ON) option(ENABLE_NLS "Enable Native Language Support" ON) option(ENABLE_LARGEFILE "Enable Large File Support" ON) +option(ENABLE_ZSTD "Enable Zstandard compression" ON) option(ENABLE_ALIAS "Enable Alias plugin" ON) option(ENABLE_BUFLIST "Enable Buflist plugin" ON) option(ENABLE_CHARSET "Enable Charset plugin" ON) @@ -230,7 +231,10 @@ list(APPEND EXTRA_LIBS gnutls) find_package(ZLIB REQUIRED) # Check for zstd -pkg_check_modules(LIBZSTD REQUIRED libzstd) +if(ENABLE_ZSTD) + pkg_check_modules(LIBZSTD REQUIRED libzstd) + add_definitions(-DHAVE_ZSTD) +endif() # Check for iconv find_package(Iconv) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 2c50fc234..b886b4ed7 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -73,6 +73,10 @@ Tests:: * core: add tests on GUI buffer functions +Build:: + + * core: make zstd dependency optional (issue #2024) + [[v4.0.5]] == Version 4.0.5 (2023-09-24) diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc index 7627c6c54..7eb2adc96 100644 --- a/doc/de/weechat_user.de.adoc +++ b/doc/de/weechat_user.de.adoc @@ -135,10 +135,6 @@ Die folgende Tabelle zeigt eine Auflistung der Pakete, die zum Erstellen von Wee | Logger-Erweitertung: Kompression von rotierenden Protokolldateien (gzip). + Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). + Script-Erweiterung: Lesen der Repository-Indexdatei (gzip). - -| libzstd-dev | ≥ 0.8.1 -| Logger-Erweiterung: Kompression von rotierenden Protokolldateien. + - Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). |=== [NOTE] @@ -152,26 +148,68 @@ WeeChat optional sind: [width="100%",cols="5,^3,.^15",options="header"] |=== -| Paket ^(1)^ | Version | Funktionen -| {cpp} compiler (pass:[g++ / clang++]) | | zum Erstellen der Binärdatei und um Test auszuführen, JavaScript Erweiterung. -| gettext | | Internationalisierung (Übersetzung der Mitteilungen; Hauptsprache ist englisch). -| ca-certificates | | Zertifikate für TLS Verbindungen. -| libaspell-dev / libenchant-dev | | Spell Erweiterung. -| python3-dev | ≥ 3.0 | Python Erweiterung. -| libperl-dev | | Perl Erweiterung. -| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Ruby Erweiterung. -| liblua5.4-dev | | Lua Erweiterung. -| tcl-dev | ≥ 8.5 | Tcl Erweiterung. -| guile-3.0-dev | ≥ 2.0 | Guile (scheme) Erweiterung. -| libv8-dev | ≤ 3.24.3 | JavaScript Erweiterung. -| php-dev | ≥ 7.0 | PHP Erweiterung. -| libphp-embed | ≥ 7.0 | PHP Erweiterung. -| libxml2-dev | | PHP Erweiterung. -| libargon2-dev | | PHP Erweiterung (wenn PHP ≥ 7.2). -| libsodium-dev | | PHP Erweiterung (wenn PHP ≥ 7.2). -| asciidoctor | ≥ 1.5.4 | zum Erstellen der man page und der Dokumentation. -| ruby-pygments.rb | | Build Dokumentation. -| libcpputest-dev | ≥ 3.4 | zum Erstellen und um Test auszuführen. +| Paket ^(1)^ | Version | Funktionen + +| {cpp} compiler (pass:[g++ / clang++]) | +| zum Erstellen der Binärdatei und um Test auszuführen, JavaScript Erweiterung. + +| gettext | +| Internationalisierung (Übersetzung der Mitteilungen; Hauptsprache ist englisch). + +| ca-certificates | +| Zertifikate für TLS Verbindungen. + +| libzstd-dev | ≥ 0.8.1 +| Logger-Erweiterung: Kompression von rotierenden Protokolldateien (zstandard). + + Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). + +| libaspell-dev / libenchant-dev | +| Spell Erweiterung. + +| python3-dev | ≥ 3.0 +| Python Erweiterung. + +| libperl-dev | +| Perl Erweiterung. + +| ruby3.1, ruby3.1-dev | ≥ 1.9.1 +| Ruby Erweiterung. + +| liblua5.4-dev | +| Lua Erweiterung. + +| tcl-dev | ≥ 8.5 +| Tcl Erweiterung. + +| guile-3.0-dev | ≥ 2.0 +| Guile (scheme) Erweiterung. + +| libv8-dev | ≤ 3.24.3 +| JavaScript Erweiterung. + +| php-dev | ≥ 7.0 +| PHP Erweiterung. + +| libphp-embed | ≥ 7.0 +| PHP Erweiterung. + +| libxml2-dev | +| PHP Erweiterung. + +| libargon2-dev | +| PHP Erweiterung (wenn PHP ≥ 7.2). + +| libsodium-dev | +| PHP Erweiterung (wenn PHP ≥ 7.2). + +| asciidoctor | ≥ 1.5.4 +| zum Erstellen der man page und der Dokumentation. + +| ruby-pygments.rb | +| Build Dokumentation. + +| libcpputest-dev | ≥ 3.4 +| zum Erstellen und um Test auszuführen. |=== [NOTE] @@ -212,7 +250,8 @@ $ make install Optionen für CMake können mit dem Format, `-DOPTION=VALUE`, genutzt werden. -Liste von häufig verwendeten Optionen: +// TRANSLATION MISSING +List of available options: [width="100%",cols="3m,3,3m,10",options="header"] |=== @@ -266,6 +305,10 @@ Liste von häufig verwendeten Optionen: | ENABLE_GUILE | `ON`, `OFF` | ON | kompiliert <<scripting_plugins,Guile Erweiterung>> (Scheme). +// TRANSLATION MISSING +| ENABLE_HEADLESS | `ON`, `OFF` | ON +| Compile headless binary. + | ENABLE_IRC | `ON`, `OFF` | ON | kompiliert <<irc,IRC Erweiterung>>. @@ -324,6 +367,10 @@ Liste von häufig verwendeten Optionen: | ENABLE_XFER | `ON`, `OFF` | ON | kompiliert <<xfer,Xfer Erweiterung>>. +// TRANSLATION MISSING +| ENABLE_ZSTD | `ON`, `OFF` | ON +| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression. + | ENABLE_TESTS | `ON`, `OFF` | OFF | kompiliert Testumgebung. diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index db27e3fa3..2be3f7237 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -4484,7 +4484,8 @@ Arguments: * _to_: destination file * _compressor_: the compressor to use, one of: ** _gzip_: gzip compression -** _zstd_: zstandard compression +** _zstd_: zstandard compression (available only if zstd was enabled when + WeeChat was compiled) * _compression_level_: compression level, between 1 (fast, low compression) to 100 (slow, best compression) diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index c7b1b515f..61e0d69fe 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -130,10 +130,6 @@ WeeChat: | Logger plugin: compression of rotated log files (gzip). + Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). + Script plugin: read of repository index file (gzip). - -| libzstd-dev | ≥ 0.8.1 -| Logger plugin: compression of rotated log files. + - Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). |=== [NOTE] @@ -147,26 +143,68 @@ WeeChat: [width="100%",cols="5,^3,.^15",options="header"] |=== -| Package ^(1)^ | Version | Features -| {cpp} compiler (pass:[g++ / clang++]) | | Build and run tests, JavaScript plugin. -| gettext | | Internationalization (translation of messages; base language is English). -| ca-certificates | | Certificates for TLS connections. -| libaspell-dev / libenchant-dev | | Spell plugin. -| python3-dev | ≥ 3.0 | Python plugin. -| libperl-dev | | Perl plugin. -| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Ruby plugin. -| liblua5.4-dev | | Lua plugin. -| tcl-dev | ≥ 8.5 | Tcl plugin. -| guile-3.0-dev | ≥ 2.0 | Guile (scheme) plugin. -| libv8-dev | ≤ 3.24.3 | JavaScript plugin. -| php-dev | ≥ 7.0 | PHP plugin. -| libphp-embed | ≥ 7.0 | PHP plugin. -| libxml2-dev | | PHP plugin. -| libargon2-dev | | PHP plugin (if PHP ≥ 7.2). -| libsodium-dev | | PHP plugin (if PHP ≥ 7.2). -| asciidoctor | ≥ 1.5.4 | Build man page and documentation. -| ruby-pygments.rb | | Build documentation. -| libcpputest-dev | ≥ 3.4 | Build and run tests. +| Package ^(1)^ | Version | Features + +| {cpp} compiler (pass:[g++ / clang++]) | +| Build and run tests, JavaScript plugin. + +| gettext | +| Internationalization (translation of messages; base language is English). + +| ca-certificates | +| Certificates for TLS connections. + +| libzstd-dev | ≥ 0.8.1 +| Logger plugin: compression of rotated log files (zstandard). + + Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). + +| libaspell-dev / libenchant-dev | +| Spell plugin. + +| python3-dev | ≥ 3.0 +| Python plugin. + +| libperl-dev | +| Perl plugin. + +| ruby3.1, ruby3.1-dev | ≥ 1.9.1 +| Ruby plugin. + +| liblua5.4-dev | +| Lua plugin. + +| tcl-dev | ≥ 8.5 +| Tcl plugin. + +| guile-3.0-dev | ≥ 2.0 +| Guile (scheme) plugin. + +| libv8-dev | ≤ 3.24.3 +| JavaScript plugin. + +| php-dev | ≥ 7.0 +| PHP plugin. + +| libphp-embed | ≥ 7.0 +| PHP plugin. + +| libxml2-dev | +| PHP plugin. + +| libargon2-dev | +| PHP plugin (if PHP ≥ 7.2). + +| libsodium-dev | +| PHP plugin (if PHP ≥ 7.2). + +| asciidoctor | ≥ 1.5.4 +| Build man page and documentation. + +| ruby-pygments.rb | +| Build documentation. + +| libcpputest-dev | ≥ 3.4 +| Build and run tests. |=== [NOTE] @@ -206,7 +244,7 @@ $ make install Options can be used for CMake, with format: `-DOPTION=VALUE`. -List of commonly used options: +List of available options: [width="100%",cols="3m,3,3m,10",options="header"] |=== @@ -260,6 +298,9 @@ List of commonly used options: | ENABLE_GUILE | `ON`, `OFF` | ON | Compile <<scripting_plugins,Guile plugin>> (Scheme). +| ENABLE_HEADLESS | `ON`, `OFF` | ON +| Compile headless binary. + | ENABLE_IRC | `ON`, `OFF` | ON | Compile <<irc,IRC plugin>>. @@ -318,6 +359,9 @@ List of commonly used options: | ENABLE_XFER | `ON`, `OFF` | ON | Compile <<xfer,Xfer plugin>>. +| ENABLE_ZSTD | `ON`, `OFF` | ON +| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression. + | ENABLE_TESTS | `ON`, `OFF` | OFF | Compile tests. diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index cfbd43498..42b1ff747 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -4562,7 +4562,8 @@ Paramètres : * _to_ : fichier cible * _compressor_ : le compresseur à utiliser, un parmi : ** _gzip_ : compression gzip -** _zstd_ : compression zstandard +** _zstd_ : compression zstandard (disponible seulement si zstd a été activé + lors de la compilation de WeeChat) * _compression_level_ : niveau de compression, entre 1 (rapide, peu de compression) à 100 (lent, meilleure compression) diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc index 9434320fb..f741e18e3 100644 --- a/doc/fr/weechat_user.fr.adoc +++ b/doc/fr/weechat_user.fr.adoc @@ -130,10 +130,6 @@ Le tableau suivant liste les paquets *requis* pour construire WeeChat : | Extension Logger : compression des fichiers de log qui tournent (gzip). + Extention Relay : compression des messages (WeeChat -> client) avec https://zlib.net/[zlib ^↗^^] (protocole weechat). + Extension Script : lecture du fichier d'index du dépôt (gzip). - -| libzstd-dev | ≥ 0.8.1 -| Extension Logger : compression des fichiers de log qui tournent. + - Extension Relay : compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^^] (protocole weechat). |=== [NOTE] @@ -146,26 +142,68 @@ Le tableau suivant liste les paquets optionnels pour compiler WeeChat : [width="100%",cols="5,^3,.^15",options="header"] |=== -| Paquet ^(1)^ | Version | Fonctionnalités -| compilateur {cpp} (pass:[g++ / clang++]) | | Construction et lancement des tests, extension JavaScript. -| gettext | | Internationalisation (traduction des messages ; la langue de base est l'anglais). -| ca-certificates | | Certificats pour les connexions TLS. -| libaspell-dev / libenchant-dev | | Extension spell. -| python3-dev | ≥ 3.0 | Extension python. -| libperl-dev | | Extension perl. -| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Extension ruby. -| liblua5.4-dev | | Extension lua. -| tcl-dev | ≥ 8.5 | Extension tcl. -| guile-3.0-dev | ≥ 2.0 | Extension guile (scheme). -| libv8-dev | ≤ 3.24.3 | Extension javascript. -| php-dev | ≥ 7.0 | Extension PHP. -| libphp-embed | ≥ 7.0 | Extension PHP. -| libxml2-dev | | Extension PHP. -| libargon2-dev | | Extension PHP (si PHP ≥ 7.2). -| libsodium-dev | | Extension PHP (si PHP ≥ 7.2). -| asciidoctor | ≥ 1.5.4 | Construction de la page man et de la documentation. -| ruby-pygments.rb | | Construction de la documentation. -| libcpputest-dev | ≥ 3.4 | Construction et lancement des tests. +| Paquet ^(1)^ | Version | Fonctionnalités + +| compilateur {cpp} (pass:[g++ / clang++]) | +| Construction et lancement des tests, extension JavaScript. + +| gettext | +| Internationalisation (traduction des messages ; la langue de base est l'anglais). + +| ca-certificates | +| Certificats pour les connexions TLS. + +| libzstd-dev | ≥ 0.8.1 +| Extension Logger : compression des fichiers de log qui tournent (zstandard). + + Extension Relay : compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^^] (protocole weechat). + +| libaspell-dev / libenchant-dev | +| Extension spell. + +| python3-dev | ≥ 3.0 +| Extension python. + +| libperl-dev | +| Extension perl. + +| ruby3.1, ruby3.1-dev | ≥ 1.9.1 +| Extension ruby. + +| liblua5.4-dev | +| Extension lua. + +| tcl-dev | ≥ 8.5 +| Extension tcl. + +| guile-3.0-dev | ≥ 2.0 +| Extension guile (scheme). + +| libv8-dev | ≤ 3.24.3 +| Extension javascript. + +| php-dev | ≥ 7.0 +| Extension PHP. + +| libphp-embed | ≥ 7.0 +| Extension PHP. + +| libxml2-dev | +| Extension PHP. + +| libargon2-dev | +| Extension PHP (si PHP ≥ 7.2). + +| libsodium-dev | +| Extension PHP (si PHP ≥ 7.2). + +| asciidoctor | ≥ 1.5.4 +| Construction de la page man et de la documentation. + +| ruby-pygments.rb | +| Construction de la documentation. + +| libcpputest-dev | ≥ 3.4 +| Construction et lancement des tests. |=== [NOTE] @@ -205,7 +243,7 @@ $ make install Des options peuvent être utilisées pour CMake, avec le format : `-DOPTION=VALUE`. -Liste des options couramment utilisées : +Liste des options disponibles : [width="100%",cols="3m,3,3m,10",options="header"] |=== @@ -259,6 +297,9 @@ Liste des options couramment utilisées : | ENABLE_GUILE | `ON`, `OFF` | ON | Compiler <<scripting_plugins,l'extension Guile>> (Scheme). +| ENABLE_HEADLESS | `ON`, `OFF` | ON +| Compiler le binaire sans interface (« headless »). + | ENABLE_IRC | `ON`, `OFF` | ON | Compiler <<irc,l'extension IRC>>. @@ -317,6 +358,9 @@ Liste des options couramment utilisées : | ENABLE_XFER | `ON`, `OFF` | ON | Compiler <<xfer,l'extension Xfer>>. +| ENABLE_ZSTD | `ON`, `OFF` | ON +| Activer la compression https://facebook.github.io/zstd/[Zstandard ^↗^^]. + | ENABLE_TESTS | `ON`, `OFF` | OFF | Compiler les tests. diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index dc380b1ae..6efd0c6e9 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -4685,7 +4685,8 @@ Argomenti: * _to_: destination file * _compressor_: the compressor to use, one of: ** _gzip_: gzip compression -** _zstd_: zstandard compression +** _zstd_: zstandard compression (available only if zstd was enabled when + WeeChat was compiled) * _compression_level_: compression level, between 1 (fast, low compression) to 100 (slow, best compression) diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc index b8da2bd0d..9e8eb09e5 100644 --- a/doc/it/weechat_user.it.adoc +++ b/doc/it/weechat_user.it.adoc @@ -159,11 +159,6 @@ WeeChat: | Logger plugin: compression of rotated log files (gzip). + Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). + Script plugin: read of repository index file (gzip). - -// TRANSLATION MISSING -| libzstd-dev | ≥ 0.8.1 -| Logger plugin: compression of rotated log files. + - Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). |=== [NOTE] @@ -181,32 +176,75 @@ WeeChat: [width="100%",cols="5,^3,.^15",options="header"] |=== // TRANSLATION MISSING -| Pacchetto ^(1)^ | Versione | Features +| Pacchetto ^(1)^ | Versione | Features + // TRANSLATION MISSING -| {cpp} compiler (pass:[g++ / clang++]) | | Build and run tests, plugin JavaScript. -| gettext | | Internazionalizzazione (traduzione dei messaggi; la lingua base è l'inglese). -| ca-certificates | | Certificati per le connessioni TLS. -| libaspell-dev / libenchant-dev | | Plugin spell. -| python3-dev | ≥ 3.0 | Plugin python. -| libperl-dev | | Plugin perl. -| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Plugin ruby. -| liblua5.4-dev | | Plugin lua. -| tcl-dev | ≥ 8.5 | Plugin tcl. -| guile-3.0-dev | ≥ 2.0 | Plugin guile (scheme). -| libv8-dev | ≤ 3.24.3 | Plugin javascript. -| php-dev | ≥ 7.0 | Plugin php. -| libphp-embed | ≥ 7.0 | Plugin php. -| libxml2-dev | | Plugin php. +| {cpp} compiler (pass:[g++ / clang++]) | +| Build and run tests, plugin JavaScript. + +| gettext | +| Internazionalizzazione (traduzione dei messaggi; la lingua base è l'inglese). + +| ca-certificates | +| Certificati per le connessioni TLS. + // TRANSLATION MISSING -| libargon2-dev | | Plugin php (if PHP ≥ 7.2). +| libzstd-dev | ≥ 0.8.1 +| Logger plugin: compression of rotated log files (zstandard). + + Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). + +| libaspell-dev / libenchant-dev | +| Plugin spell. + +| python3-dev | ≥ 3.0 +| Plugin python. + +| libperl-dev | +| Plugin perl. + +| ruby3.1, ruby3.1-dev | ≥ 1.9.1 +| Plugin ruby. + +| liblua5.4-dev | +| Plugin lua. + +| tcl-dev | ≥ 8.5 +| Plugin tcl. + +| guile-3.0-dev | ≥ 2.0 +| Plugin guile (scheme). + +| libv8-dev | ≤ 3.24.3 +| Plugin javascript. + +| php-dev | ≥ 7.0 +| Plugin php. + +| libphp-embed | ≥ 7.0 +| Plugin php. + +| libxml2-dev | +| Plugin php. + +// TRANSLATION MISSING +| libargon2-dev | +| Plugin php (if PHP ≥ 7.2). + // TRANSLATION MISSING -| libsodium-dev | | Plugin php (if PHP ≥ 7.2). +| libsodium-dev | +| Plugin php (if PHP ≥ 7.2). + // TRANSLATION MISSING -| asciidoctor | ≥ 1.5.4 | Build man page and documentation. +| asciidoctor | ≥ 1.5.4 +| Build man page and documentation. + // TRANSLATION MISSING -| ruby-pygments.rb | | Build documentation. +| ruby-pygments.rb | +| Build documentation. + // TRANSLATION MISSING -| libcpputest-dev | ≥ 3.4 | Build and run tests. +| libcpputest-dev | ≥ 3.4 +| Build and run tests. |=== [NOTE] @@ -252,7 +290,7 @@ $ make install Options can be used for CMake, with format: `-DOPTION=VALUE`. // TRANSLATION MISSING -List of commonly used options: +List of available options: // TRANSLATION MISSING [width="100%",cols="3m,3,3m,10",options="header"] @@ -266,7 +304,6 @@ List of commonly used options: | CMAKE_INSTALL_PREFIX | directory | /usr/local | The directory where WeeChat will be installed. -// TRANSLATION MISSING | WEECHAT_HOME | directory | (empty string) | The default home directory when running WeeChat. + With an empty value (recommended), XDG directories are used by default. @@ -289,7 +326,6 @@ List of commonly used options: | ENABLE_DOC | `ON`, `OFF` | OFF | Build HTML documentation. -// TRANSLATION MISSING | ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF | Force build of documentation even if some plugins are not compiled (not recommended: docs will be incomplete). @@ -309,6 +345,9 @@ List of commonly used options: | ENABLE_GUILE | `ON`, `OFF` | ON | Compile <<scripting_plugins,Guile plugin>> (Scheme). +| ENABLE_HEADLESS | `ON`, `OFF` | ON +| Compile headless binary. + | ENABLE_IRC | `ON`, `OFF` | ON | Compile <<irc,IRC plugin>>. @@ -367,6 +406,10 @@ List of commonly used options: | ENABLE_XFER | `ON`, `OFF` | ON | Compile <<xfer,Xfer plugin>>. +// TRANSLATION MISSING +| ENABLE_ZSTD | `ON`, `OFF` | ON +| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression. + | ENABLE_TESTS | `ON`, `OFF` | OFF | Compile tests. diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index a93d50da6..f651d640d 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -4601,7 +4601,8 @@ int weechat_file_compress (const char *from, const char *to, * _to_: destination file * _compressor_: the compressor to use, one of: ** _gzip_: gzip compression -** _zstd_: zstandard compression +** _zstd_: zstandard compression (available only if zstd was enabled when + WeeChat was compiled) * _compression_level_: compression level, between 1 (fast, low compression) to 100 (slow, best compression) diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc index 51a73021b..c8f6b8149 100644 --- a/doc/ja/weechat_user.ja.adoc +++ b/doc/ja/weechat_user.ja.adoc @@ -146,11 +146,6 @@ WeeChat: | Logger plugin: compression of rotated log files (gzip). + Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). + Script plugin: read of repository index file (gzip). - -// TRANSLATION MISSING -| libzstd-dev | ≥ 0.8.1 -| Logger plugin: compression of rotated log files. + - Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). |=== [NOTE] @@ -167,27 +162,70 @@ WeeChat: [width="100%",cols="5,^3,.^15",options="header"] |=== // TRANSLATION MISSING -| パッケージ ^(1)^ | バージョン | Features -| {cpp} コンパイラ (pass:[g++ / clang++]) | | ビルドとテストの実行、JavaScript プラグイン -| gettext | | 国際化 (メッセージの翻訳; ベース言語は英語です) -| ca-certificates | | TLS 接続に必要な証明書、relay プラグインで TLS サポート -| libaspell-dev / libenchant-dev | | spell プラグイン -| python3-dev | 3.0 以上 | python プラグイン -| libperl-dev | | perl プラグイン -| ruby3.1, ruby3.1-dev | 1.9.1 以上 | ruby プラグイン -| liblua5.4-dev | | lua プラグイン -| tcl-dev | 8.5 以上 | tcl プラグイン -| guile-3.0-dev | 2.0 以上 | guile (scheme) プラグイン -| libv8-dev | 3.24.3 以下 | javascript プラグイン -| php-dev | 7.0 以上 | PHP プラグイン -| libphp-embed | 7.0 以上 | PHP プラグイン -| libxml2-dev | | PHP プラグイン -| libargon2-dev | | PHP プラグイン (PHP 7.2 以上の場合) -| libsodium-dev | | PHP プラグイン (PHP 7.2 以上の場合) -| asciidoctor | 1.5.4 以上 | man ページと文書のビルド -// TRANSLATION MISSING -| ruby-pygments.rb | | Build documentation. -| libcpputest-dev | 3.4 以上 | ビルドとテストの実行 +| パッケージ ^(1)^ | バージョン | Features + +| {cpp} コンパイラ (pass:[g++ / clang++]) | +| ビルドとテストの実行、JavaScript プラグイン + +| gettext | +| 国際化 (メッセージの翻訳; ベース言語は英語です) + +| ca-certificates | +| TLS 接続に必要な証明書、relay プラグインで TLS サポート + +// TRANSLATION MISSING +| libzstd-dev | ≥ 0.8.1 +| Logger plugin: compression of rotated log files (zstandard). + + Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol). + +| libaspell-dev / libenchant-dev | +| spell プラグイン + +| python3-dev | 3.0 以上 +| python プラグイン + +| libperl-dev | +| perl プラグイン + +| ruby3.1, ruby3.1-dev | 1.9.1 以上 +| ruby プラグイン + +| liblua5.4-dev | +| lua プラグイン + +| tcl-dev | 8.5 以上 +| tcl プラグイン + +| guile-3.0-dev | 2.0 以上 +| guile (scheme) プラグイン + +| libv8-dev | 3.24.3 以下 +| javascript プラグイン + +| php-dev | 7.0 以上 +| PHP プラグイン + +| libphp-embed | 7.0 以上 +| PHP プラグイン + +| libxml2-dev | +| PHP プラグイン + +| libargon2-dev | +| PHP プラグイン (PHP 7.2 以上の場合) + +| libsodium-dev | +| PHP プラグイン (PHP 7.2 以上の場合) + +| asciidoctor | 1.5.4 以上 +| man ページと文書のビルド + +// TRANSLATION MISSING +| ruby-pygments.rb | +| Build documentation. + +| libcpputest-dev | 3.4 以上 +| ビルドとテストの実行 |=== [NOTE] @@ -229,7 +267,8 @@ $ make install CMake に対するオプションを指定するには、以下の書式を使ってください: `-DOPTION=VALUE`。 -よく利用されるオプションのリスト: +// TRANSLATION MISSING +List of available options: [width="100%",cols="3m,3,3m,10",options="header"] |=== @@ -285,6 +324,10 @@ CMake に対するオプションを指定するには、以下の書式を使 | ENABLE_GUILE | `ON`, `OFF` | ON | <<scripting_plugins,Guile プラグイン>> (Scheme) のコンパイル。 +// TRANSLATION MISSING +| ENABLE_HEADLESS | `ON`, `OFF` | ON +| Compile headless binary. + | ENABLE_IRC | `ON`, `OFF` | ON | <<irc,IRC プラグイン>>のコンパイル @@ -343,6 +386,10 @@ CMake に対するオプションを指定するには、以下の書式を使 | ENABLE_XFER | `ON`, `OFF` | ON | <<xfer,Xfer プラグイン>>のコンパイル。 +// TRANSLATION MISSING +| ENABLE_ZSTD | `ON`, `OFF` | ON +| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression. + | ENABLE_TESTS | `ON`, `OFF` | OFF | コンパイルテスト。 diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc index 5cd6f3c17..1354d7182 100644 --- a/doc/pl/weechat_user.pl.adoc +++ b/doc/pl/weechat_user.pl.adoc @@ -134,10 +134,6 @@ WeeChat: | Wtyczka logger: kompresja rotowanych plików z logami (gzip). + Wtyczka relay: kompresja wiadomości (WeeChat -> klient) za pomocą https://zlib.net/[zlib ^↗^^] (protokół weechat). + Wtyczka script: odczyt repozytorium ze skryptami (gzip). - -| libzstd-dev | ≥ 0.8.1 -| Wtyczka logger: kompresja rotowanych plików z logami. + - Wtyczka Relay: kompresja wiadomości (WeeChat -> klient) za pomocą https://facebook.github.io/zstd/[Zstandard ^↗^^] (protokół weechat). |=== [NOTE] @@ -151,26 +147,68 @@ WeeChat: [width="100%",cols="5,^3,.^15",options="header"] |=== -| Pakiet ^(1)^ | Wersja | Funkcje -| kompilator {cpp} (pass:[g++ / clang++]) | | Kompilacja i uruchamianie testów, wtyczka JavaScript. -| gettext | | Internacjonalizacja (tłumaczenie wiadomości; język bazowy to Angielski). -| ca-certificates | | Certyfikaty dla połączeń TLS. -| libaspell-dev / libenchant-dev | | Wtyczka spell. -| python3-dev | ≥ 3.0 | Wtyczka python. -| libperl-dev | | Wtyczka perl. -| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Wtyczka ruby. -| liblua5.4-dev | | Wtyczka lua. -| tcl-dev | ≥ 8.5 | Wtyczka tcl. -| guile-3.0-dev | ≥ 2.0 | Wtyczka guile (scheme). -| libv8-dev | ≤ 3.24.3 | Wtyczka javascript. -| php-dev | ≥ 7.0 | Wtyczka PHP. -| libphp-embed | ≥ 7.0 | Wtyczka PHP. -| libxml2-dev | | Wtyczka PHP. -| libargon2-dev | | Wtyczka PHP (jeśli PHP ≥ 7.2). -| libsodium-dev | | Wtyczka PHP (jeśli PHP ≥ 7.2). -| asciidoctor | ≥ 1.5.4 | Tworzenie strony man i dokumentacji. -| ruby-pygments.rb | | Dokumentacja budowania. -| libcpputest-dev | ≥ 3.4 | Kompilacja i uruchamianie testów. +| Pakiet ^(1)^ | Wersja | Funkcje + +| kompilator {cpp} (pass:[g++ / clang++]) | +| Kompilacja i uruchamianie testów, wtyczka JavaScript. + +| gettext | +| Internacjonalizacja (tłumaczenie wiadomości; język bazowy to Angielski). + +| ca-certificates | +| Certyfikaty dla połączeń TLS. + +| libzstd-dev | ≥ 0.8.1 +| Wtyczka logger: kompresja rotowanych plików z logami (zstandard). + + Wtyczka Relay: kompresja wiadomości (WeeChat -> klient) za pomocą https://facebook.github.io/zstd/[Zstandard ^↗^^] (protokół weechat). + +| libaspell-dev / libenchant-dev | +| Wtyczka spell. + +| python3-dev | ≥ 3.0 +| Wtyczka python. + +| libperl-dev | +| Wtyczka perl. + +| ruby3.1, ruby3.1-dev | ≥ 1.9.1 +| Wtyczka ruby. + +| liblua5.4-dev | +| Wtyczka lua. + +| tcl-dev | ≥ 8.5 +| Wtyczka tcl. + +| guile-3.0-dev | ≥ 2.0 +| Wtyczka guile (scheme). + +| libv8-dev | ≤ 3.24.3 +| Wtyczka javascript. + +| php-dev | ≥ 7.0 +| Wtyczka PHP. + +| libphp-embed | ≥ 7.0 +| Wtyczka PHP. + +| libxml2-dev | +| Wtyczka PHP. + +| libargon2-dev | +| Wtyczka PHP (jeśli PHP ≥ 7.2). + +| libsodium-dev | +| Wtyczka PHP (jeśli PHP ≥ 7.2). + +| asciidoctor | ≥ 1.5.4 +| Tworzenie strony man i dokumentacji. + +| ruby-pygments.rb | +| Dokumentacja budowania. + +| libcpputest-dev | ≥ 3.4 +| Kompilacja i uruchamianie testów. |=== [NOTE] @@ -210,7 +248,8 @@ $ make install Opcje mogą zostać przekazane do CMake, format `-DOPCJA=WARTOŚĆ`. -Lista popularnych opcji: +// TRANSLATION MISSING +List of available options: [width="100%",cols="3m,3,3m,10",options="header"] |=== @@ -264,6 +303,10 @@ Lista popularnych opcji: | ENABLE_GUILE | `ON`, `OFF` | ON | Kompilacja <<scripting_plugins,wtyczki guile>> (Scheme). +// TRANSLATION MISSING +| ENABLE_HEADLESS | `ON`, `OFF` | ON +| Compile headless binary. + | ENABLE_IRC | `ON`, `OFF` | ON | Kompilacja <<irc,wtyczki IRC>>. @@ -322,6 +365,10 @@ Lista popularnych opcji: | ENABLE_XFER | `ON`, `OFF` | ON | Kompilacja <<xfer,wtyczki xfer>>. +// TRANSLATION MISSING +| ENABLE_ZSTD | `ON`, `OFF` | ON +| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression. + | ENABLE_TESTS | `ON`, `OFF` | OFF | Kompiluje testy. diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 0048e8667..dc9e538b8 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -4326,11 +4326,6 @@ if (weechat_file_copy ("/tmp/test.txt", "/path/to/test2.txt")) [NOTE] Ова функција није доступна у API скриптовања. -[[util]] -=== Алати - -Неке корисне функције. - ==== file_compress _WeeChat ≥ 3.7._ @@ -4351,7 +4346,9 @@ int weechat_file_compress (const char *from, const char *to, * _to_: одредишни фајл * _compressor_: компресор који треба да се користи, једно од: ** _gzip_: gzip компресија -** _zstd_: zstandard компресија +// TRANSLATION MISSING +** _zstd_: zstandard компресија (available only if zstd was enabled when + WeeChat was compiled) * _compression_level_: ниво компресије, између 1 (брзо, ниска компресија) и 100 (споро, најбоља компресија) @@ -4372,6 +4369,11 @@ if (weechat_file_compress ("/tmp/test.txt", "/tmp/test.txt.zst", "zstd", 50)) [NOTE] Ова функција није доступна у API скриптовања. +[[util]] +=== Алати + +Неке корисне функције. + ==== util_timeval_cmp Пореди две „timeval” структуре. diff --git a/doc/sr/weechat_user.sr.adoc b/doc/sr/weechat_user.sr.adoc index fb93b5a09..cff381ff3 100644 --- a/doc/sr/weechat_user.sr.adoc +++ b/doc/sr/weechat_user.sr.adoc @@ -129,10 +129,6 @@ WeeChat мора да се изгради са CMake. | Logger додатак: компресија ротирајућих лог фајлова (gzip). + Relay додатак: компресија порука (WeeChat -> клијент) са https://zlib.net/[zlib ^↗^^] (weechat протокол). + Script додатак: читање индекс фајла репозиторијума (gzip). - -| libzstd-dev | ≥ 0.8.1 -| Logger додатак: компресија ротирајућих лог фајлова. + - Relay додатак: компресија порука (WeeChat -> клијент) са https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat протокол). |=== [NOTE] @@ -144,26 +140,68 @@ WeeChat мора да се изгради са CMake. [width="100%", cols="5,^3,.^15", options="header"] |=== -| Пакет ^(1)^ | Верзија | Могућности -| {cpp} компајлер (pass:[g++ / clang++]) | | Изградња и покретање тестова, JavaScript додатак. -| gettext | | Интернационализација (превод порука; основни језик је енглески). -| ca-certificates | | Сертификати за TLS везе. -| libaspell-dev / libenchant-dev | | Spell додатак. -| python3-dev | ≥ 3.0 | Python додатак. -| libperl-dev | | Perl додатак. -| ruby3.1, ruby3.1-dev | ≥ 1.9.1 | Ruby додатак. -| liblua5.4-dev | | Lua додатак. -| tcl-dev | ≥ 8.5 | Tcl додатак. -| guile-3.0-dev | ≥ 2.0 | Guile (scheme) додатак. -| libv8-dev | ≤ 3.24.3 | JavaScript додатак. -| php-dev | ≥ 7.0 | PHP додатак. -| libphp-embed | ≥ 7.0 | PHP додатак. -| libxml2-dev | | PHP додатак. -| libargon2-dev | | PHP додатак (ако је PHP ≥ 7.2). -| libsodium-dev | | PHP додатак (ако је PHP ≥ 7.2). -| asciidoctor | ≥ 1.5.4 | Изградња man странице и документације. -| ruby-pygments.rb | | Документација изградње. -| libcpputest-dev | ≥ 3.4 | Изградња и покретање тестова. +| Пакет ^(1)^ | Верзија | Могућности + +| {cpp} компајлер (pass:[g++ / clang++]) | +| Изградња и покретање тестова, JavaScript додатак. + +| gettext | +| Интернационализација (превод порука; основни језик је енглески). + +| ca-certificates | +| Сертификати за TLS везе. + +| libzstd-dev | ≥ 0.8.1 +| Logger додатак: компресија ротирајућих лог фајлова (zstandard). + + Relay додатак: компресија порука (WeeChat -> клијент) са https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat протокол). + +| libaspell-dev / libenchant-dev | +| Spell додатак. + +| python3-dev | ≥ 3.0 +| Python додатак. + +| libperl-dev | +| Perl додатак. + +| ruby3.1, ruby3.1-dev | ≥ 1.9.1 +| Ruby додатак. + +| liblua5.4-dev | +| Lua додатак. + +| tcl-dev | ≥ 8.5 +| Tcl додатак. + +| guile-3.0-dev | ≥ 2.0 +| Guile (scheme) додатак. + +| libv8-dev | ≤ 3.24.3 +| JavaScript додатак. + +| php-dev | ≥ 7.0 +| PHP додатак. + +| libphp-embed | ≥ 7.0 +| PHP додатак. + +| libxml2-dev | +| PHP додатак. + +| libargon2-dev | +| PHP додатак (ако је PHP ≥ 7.2). + +| libsodium-dev | +| PHP додатак (ако је PHP ≥ 7.2). + +| asciidoctor | ≥ 1.5.4 +| Изградња man странице и документације. + +| ruby-pygments.rb | +| Документација изградње. + +| libcpputest-dev | ≥ 3.4 +| Изградња и покретање тестова. |=== [NOTE] @@ -201,7 +239,8 @@ $ make install Можете да користите опције за CMake, у формату: `-DОПЦИЈА=ВРЕДНОСТ`. -Листа често коришћених опција: +// TRANSLATION MISSING +List of available options: [width="100%", cols="3m,3,3m,10", options="header"] |=== @@ -255,6 +294,10 @@ $ make install | ENABLE_GUILE | `ON`, `OFF` | ON | Компајлира <<scripting_plugins,Guile додатак>> (Scheme). +// TRANSLATION MISSING +| ENABLE_HEADLESS | `ON`, `OFF` | ON +| Compile headless binary. + | ENABLE_IRC | `ON`, `OFF` | ON | Компајлира <<irc,IRC додатак>>. @@ -313,6 +356,10 @@ $ make install | ENABLE_XFER | `ON`, `OFF` | ON | Компајлира <<xfer,Xfer додатак>>. +// TRANSLATION MISSING +| ENABLE_ZSTD | `ON`, `OFF` | ON +| Enable https://facebook.github.io/zstd/[Zstandard ^↗^^] compression. + | ENABLE_TESTS | `ON`, `OFF` | OFF | Компајлира тестове. @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11260,6 +11260,11 @@ msgstr "" " použije adresář pro každý IRC server a v něm soubor pro každý kanál:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-15 12:46+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -13832,6 +13832,11 @@ msgstr "" "eine eigene Protokoll-Datei, für jeden Kanal:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -12000,6 +12000,11 @@ msgstr "" "canal:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" -"PO-Revision-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" +"PO-Revision-Date: 2023-10-01 16:11+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -13432,6 +13432,13 @@ msgstr "" " utiliser un répertoire par serveur IRC et un fichier par canal dedans :\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" +"%s%s : la compression zstd n'est pas disponible, les fichiers de logger ne " +"seront pas compressés" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10610,6 +10610,11 @@ msgid "" " /set logger.mask.irc \"$server/$channel.weechatlog\"" msgstr "" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11719,6 +11719,11 @@ msgstr "" "interno:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -12984,6 +12984,11 @@ msgstr "" " IRC サーバごとのディレクトリ、チャンネルごとのファイルを使う:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -14192,6 +14192,11 @@ msgstr "" "kanałów:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -12692,6 +12692,11 @@ msgstr "" " usar um diretório por servidor IRC e um ficheiro por canal:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" diff --git a/po/pt_BR.po b/po/pt_BR.po index a2b2660d7..c25ed5bdb 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11221,6 +11221,11 @@ msgid "" " /set logger.mask.irc \"$server/$channel.weechatlog\"" msgstr "" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10655,6 +10655,11 @@ msgid "" " /set logger.mask.irc \"$server/$channel.weechatlog\"" msgstr "" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -13253,6 +13253,11 @@ msgstr "" "за сваки канал:\n" " /set logger.mask.irc „$server/$channel.weechatlog”" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -13672,6 +13672,11 @@ msgstr "" " IRC sunucusu başına bir dizin ve içinde kanal başına bir dosya kullan:\n" " /set logger.mask.irc \"$server/$channel.weechatlog\"" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" diff --git a/po/weechat.pot b/po/weechat.pot index a4f61d851..f460eca45 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-10-01 12:11+0200\n" +"POT-Creation-Date: 2023-10-01 16:11+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9622,6 +9622,11 @@ msgid "" " /set logger.mask.irc \"$server/$channel.weechatlog\"" msgstr "" +#, c-format +msgid "" +"%s%s: zstd compression is not available, logger files will not be compressed" +msgstr "" + msgid "" "logging level for this buffer (0 = logging disabled, 1 = a few messages " "(most important) .. 9 = all messages)" diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 0769999a4..2f21d146a 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -91,7 +91,9 @@ include_directories(${GNUTLS_INCLUDE_PATH}) include_directories(${CURL_INCLUDE_DIRS}) -include_directories(${ZSTD_INCLUDE_DIRS}) +if(ENABLE_ZSTD) + include_directories(${ZSTD_INCLUDE_DIRS}) +endif() include_directories("${CMAKE_BINARY_DIR}") add_library(weechat_core STATIC ${LIB_CORE_SRC}) diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index b0bc8a4f1..ef93135db 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -33,7 +33,9 @@ #include <gcrypt.h> #include <curl/curl.h> #include <zlib.h> +#ifdef HAVE_ZSTD #include <zstd.h> +#endif #include <gnutls/gnutls.h> @@ -683,11 +685,13 @@ debug_libs_cb (const void *pointer, void *data, gui_chat_printf (NULL, " zlib: (?)"); #endif /* ZLIB_VERSION */ +#ifdef HAVE_ZSTD /* display zstd version */ gui_chat_printf (NULL, " zstd: %d.%d.%d", ZSTD_VERSION_MAJOR, ZSTD_VERSION_MINOR, ZSTD_VERSION_RELEASE); +#endif /* HAVE_ZSTD */ return WEECHAT_RC_OK; } diff --git a/src/core/wee-dir.c b/src/core/wee-dir.c index bd1252616..d05280861 100644 --- a/src/core/wee-dir.c +++ b/src/core/wee-dir.c @@ -45,7 +45,9 @@ #include <dirent.h> #include <ftw.h> #include <zlib.h> +#ifdef HAVE_ZSTD #include <zstd.h> +#endif #include "weechat.h" #include "wee-config.h" @@ -1135,6 +1137,7 @@ int dir_file_compress_zstd (const char *from, const char *to, int compression_level) { +#ifdef HAVE_ZSTD FILE *source, *dest; void *buffer_in, *buffer_out; size_t buffer_in_size, buffer_out_size, num_read, remaining; @@ -1297,6 +1300,14 @@ end: fclose (dest); return rc; +#else + /* make C compiler happy */ + (void) from; + (void) to; + (void) compression_level; + + return 0; +#endif /* HAVE_ZSTD */ } /* @@ -1306,7 +1317,7 @@ end: * * Supported values for parameter "compressor": * - "gzip": gzip compression (via zlib) - * - "zstd": zstandard compression + * - "zstd": zstandard compression (it must be enabled at build time) * * Parameter "compression_level" is the compression level as percentage: * from 1 (fast, low compression) to 100 (slow, best compression). diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt index 585c0d5a7..21e19aacb 100644 --- a/src/gui/curses/CMakeLists.txt +++ b/src/gui/curses/CMakeLists.txt @@ -48,7 +48,10 @@ list(APPEND EXTRA_LIBS "m") list(APPEND EXTRA_LIBS ${CURL_LIBRARIES}) list(APPEND EXTRA_LIBS ${ZLIB_LIBRARY}) -list(APPEND EXTRA_LIBS ${LIBZSTD_LDFLAGS}) + +if(ENABLE_ZSTD) + list(APPEND EXTRA_LIBS ${LIBZSTD_LDFLAGS}) +endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # link with resolv lib on macOS diff --git a/src/plugins/logger/logger-buffer.c b/src/plugins/logger/logger-buffer.c index 571cd5c87..dcbd8b7e3 100644 --- a/src/plugins/logger/logger-buffer.c +++ b/src/plugins/logger/logger-buffer.c @@ -375,6 +375,7 @@ logger_buffer_compress_file (struct t_logger_buffer *logger_buffer) unlink (filename); } break; +#ifdef HAVE_ZSTD case LOGGER_BUFFER_COMPRESSION_ZSTD: if (weechat_file_compress (filename, new_filename, "zstd", compression_level)) @@ -382,6 +383,7 @@ logger_buffer_compress_file (struct t_logger_buffer *logger_buffer) unlink (filename); } break; +#endif default: break; } @@ -477,6 +479,12 @@ logger_buffer_rotate (struct t_logger_buffer *logger_buffer) compression_type = weechat_config_enum ( logger_config_file_rotation_compression_type); + +#ifndef HAVE_ZSTD + if (compression_type == LOGGER_BUFFER_COMPRESSION_ZSTD) + compression_type = LOGGER_BUFFER_COMPRESSION_NONE; +#endif + ptr_extension = logger_buffer_compression_extension[compression_type]; /* find the highest existing extension index */ diff --git a/src/plugins/logger/logger-config.c b/src/plugins/logger/logger-config.c index 67ebb6020..287dffb10 100644 --- a/src/plugins/logger/logger-config.c +++ b/src/plugins/logger/logger-config.c @@ -94,6 +94,32 @@ logger_config_change_file_option_restart_log (const void *pointer, void *data, } /* + * Callback for changes on compression type option. + */ + +void +logger_config_change_file_rotation_comp_type (const void *pointer, + void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) option; + +#ifndef HAVE_ZSTD + if (weechat_config_enum (option) == LOGGER_BUFFER_COMPRESSION_ZSTD) + { + weechat_printf (NULL, + _("%s%s: zstd compression is not available, " + "logger files will not be compressed"), + weechat_prefix ("error"), + LOGGER_PLUGIN_NAME); + } +#endif +} + +/* * Callback for changes on option "logger.file.color_lines". */ @@ -666,7 +692,9 @@ logger_config_init () "new type (or decompress files), then change the option in " "logger.conf, then load the logger plugin"), "none|gzip|zstd", 0, 0, "none", NULL, 0, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + NULL, NULL, NULL, + &logger_config_change_file_rotation_comp_type, NULL, NULL, + NULL, NULL, NULL); logger_config_file_rotation_size_max = weechat_config_new_option ( logger_config_file, logger_config_section_file, "rotation_size_max", "string", diff --git a/src/plugins/relay/CMakeLists.txt b/src/plugins/relay/CMakeLists.txt index dee24c307..953aa7227 100644 --- a/src/plugins/relay/CMakeLists.txt +++ b/src/plugins/relay/CMakeLists.txt @@ -50,8 +50,10 @@ list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS}) list(APPEND LINK_LIBS ${ZLIB_LIBRARY}) -include_directories(${ZSTD_INCLUDE_DIRS}) -list(APPEND LINK_LIBS ${LIBZSTD_LDFLAGS}) +if(ENABLE_ZSTD) + include_directories(${ZSTD_INCLUDE_DIRS}) + list(APPEND LINK_LIBS ${LIBZSTD_LDFLAGS}) +endif() target_link_libraries(relay ${LINK_LIBS} coverage_config) diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c index af2bd3d78..aab57d87e 100644 --- a/src/plugins/relay/weechat/relay-weechat-msg.c +++ b/src/plugins/relay/weechat/relay-weechat-msg.c @@ -29,7 +29,9 @@ #include <errno.h> #include <arpa/inet.h> #include <zlib.h> +#ifdef HAVE_ZSTD #include <zstd.h> +#endif #include "../../weechat-plugin.h" #include "../relay.h" @@ -1111,6 +1113,7 @@ int relay_weechat_msg_compress_zstd (struct t_relay_client *client, struct t_relay_weechat_msg *msg) { +#ifdef HAVE_ZSTD char raw_message[1024]; uint32_t size32; Bytef *dest; @@ -1169,6 +1172,13 @@ error: free (dest); return rc; +#else + /* make C compiler happy */ + (void) client; + (void) msg; + + return 0; +#endif /* HAVE_ZSTD */ } /* @@ -1190,10 +1200,12 @@ relay_weechat_msg_send (struct t_relay_client *client, if (relay_weechat_msg_compress_zlib (client, msg)) return; break; +#ifdef HAVE_ZSTD case RELAY_WEECHAT_COMPRESSION_ZSTD: if (relay_weechat_msg_compress_zstd (client, msg)) return; break; +#endif default: break; } diff --git a/src/plugins/relay/weechat/relay-weechat.c b/src/plugins/relay/weechat/relay-weechat.c index c61aacf3a..cfb39922b 100644 --- a/src/plugins/relay/weechat/relay-weechat.c +++ b/src/plugins/relay/weechat/relay-weechat.c @@ -40,8 +40,14 @@ #include "../relay-raw.h" -char *relay_weechat_compression_string[] = /* strings for compression */ -{ "off", "zlib", "zstd" }; +/* strings for compression */ +char *relay_weechat_compression_string[RELAY_WEECHAT_NUM_COMPRESSIONS] = { + "off", + "zlib", +#ifdef HAVE_ZSTD + "zstd", +#endif +}; /* diff --git a/src/plugins/relay/weechat/relay-weechat.h b/src/plugins/relay/weechat/relay-weechat.h index 469536aac..b2b0438b7 100644 --- a/src/plugins/relay/weechat/relay-weechat.h +++ b/src/plugins/relay/weechat/relay-weechat.h @@ -34,7 +34,9 @@ enum t_relay_weechat_compression { RELAY_WEECHAT_COMPRESSION_OFF = 0, /* no compression of binary objects */ RELAY_WEECHAT_COMPRESSION_ZLIB, /* zlib compression */ +#ifdef HAVE_ZSTD RELAY_WEECHAT_COMPRESSION_ZSTD, /* Zstandard compression */ +#endif /* number of compressions */ RELAY_WEECHAT_NUM_COMPRESSIONS, }; |