newsboat: update to 2.22

This commit is contained in:
Leonid Pliushch 2021-01-07 16:18:15 +02:00
parent 51f69feca5
commit 1aaf87e72a
No known key found for this signature in database
GPG Key ID: 45F2964132545795
4 changed files with 79 additions and 36 deletions

View File

@ -1,16 +1,16 @@
diff -u -r ../newsboat-2.20.1/Makefile ./Makefile
--- ../newsboat-2.20.1/Makefile 2020-06-24 09:51:43.000000000 +0000
+++ ./Makefile 2020-07-27 08:08:05.365435000 +0000
@@ -18,7 +18,7 @@
diff -uNr newsboat-2.22/Makefile newsboat-2.22.mod/Makefile
--- newsboat-2.22/Makefile 2020-12-21 21:56:47.000000000 +0200
+++ newsboat-2.22.mod/Makefile 2021-01-07 16:01:58.247353229 +0200
@@ -47,7 +47,7 @@
WARNFLAGS=-Werror -Wall -Wextra -Wunreachable-code
INCLUDES=-Iinclude -Istfl -Ifilter -I. -Irss
WARNFLAGS=-Werror -Wall -Wextra -Wunreachable-code -Wno-unknown-warning-option -Wno-unknown-pragmas
INCLUDES=-Iinclude -Istfl -Ifilter -I. -Irss -I$(relative_cargo_target_dir)/cxxbridge/libnewsboat-ffi/src/
-BARE_CXXFLAGS=-std=c++11 -O2 -ggdb $(INCLUDES)
+BARE_CXXFLAGS=-std=c++11 -O2 $(INCLUDES)
LDFLAGS+=-L.
PACKAGE=newsboat
@@ -32,7 +32,7 @@
# Constants
@@ -65,7 +65,7 @@
LDFLAGS+=-fprofile-arcs -ftest-coverage
endif
@ -19,7 +19,7 @@ diff -u -r ../newsboat-2.20.1/Makefile ./Makefile
CXXFLAGS_FOR_BUILD?=$(CXXFLAGS)
LIB_SOURCES:=$(shell cat mk/libboat.deps)
@@ -46,7 +46,7 @@
@@ -79,7 +79,7 @@
NEWSBOAT=newsboat
NEWSBOAT_SOURCES:=$(shell cat mk/newsboat.deps)
NEWSBOAT_OBJS:=$(patsubst %.cpp,%.o,$(NEWSBOAT_SOURCES))
@ -28,7 +28,7 @@ diff -u -r ../newsboat-2.20.1/Makefile ./Makefile
RSSPPLIB_SOURCES=$(sort $(wildcard rss/*.cpp))
RSSPPLIB_OBJS=$(patsubst rss/%.cpp,rss/%.o,$(RSSPPLIB_SOURCES))
@@ -75,7 +75,7 @@
@@ -105,7 +105,7 @@
PODBOAT=podboat
PODBOAT_SOURCES:=$(shell cat mk/podboat.deps)
PODBOAT_OBJS:=$(patsubst %.cpp,%.o,$(PODBOAT_SOURCES))

View File

@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://newsboat.org/
TERMUX_PKG_DESCRIPTION="RSS/Atom feed reader for the text console"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.21
TERMUX_PKG_VERSION=2.22
TERMUX_PKG_SRCURL=https://newsboat.org/releases/${TERMUX_PKG_VERSION}/newsboat-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=0c46b3dd46bb578dd6dd4915db4cfdffb4352ab258f251080ad14655c75a9c31
TERMUX_PKG_SHA256=5286f815d9a00b4752a5572d99bbd9bc512b69c06931453faa415968881cd790
TERMUX_PKG_DEPENDS="libc++, libiconv, libandroid-support, libandroid-glob, json-c, libsqlite, libcurl, libxml2, stfl, ncurses, openssl"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_RM_AFTER_INSTALL="share/locale"

View File

@ -1,32 +1,27 @@
diff -u -r ../newsboat-2.21/rust/libnewsboat/src/filterparser.rs ./rust/libnewsboat/src/filterparser.rs
--- ../newsboat-2.21/rust/libnewsboat/src/filterparser.rs 2020-09-20 19:14:02.000000000 +0000
+++ ./rust/libnewsboat/src/filterparser.rs 2020-10-21 22:14:04.513211800 +0000
diff -uNr newsboat-2.22/rust/libnewsboat/src/filterparser.rs newsboat-2.22.mod/rust/libnewsboat/src/filterparser.rs
--- newsboat-2.22/rust/libnewsboat/src/filterparser.rs 2020-12-21 21:56:47.000000000 +0200
+++ newsboat-2.22.mod/rust/libnewsboat/src/filterparser.rs 2021-01-07 16:15:19.150160249 +0200
@@ -1,6 +1,5 @@
//! Parses filter expressions.
-use gettextrs::gettext;
use lazy_static::lazy_static;
use nom::{
branch::alt,
@@ -74,14 +73,14 @@
lazy_static! {
static ref ID_TO_I18N: BTreeMap<&'static str, String> = {
let mut result = BTreeMap::new();
- result.insert(EXPECTED_ATTRIBUTE_NAME, gettext("attribute name"));
+ result.insert(EXPECTED_ATTRIBUTE_NAME, "attribute name".to_string());
result.insert(
EXPECTED_OPERATORS,
- gettext("one of: =~, ==, =, !~, !=, <=, >=, <, >, between, #, !#"),
+ "one of: =~, ==, =, !~, !=, <=, >=, <, >, between, #, !#".to_string(),
);
result.insert(
EXPECTED_VALUE,
- gettext("one of: quoted string, range, number"),
+ "one of: quoted string, range, number".to_string(),
);
result
};
@@ -291,19 +290,19 @@
bytes::complete::{escaped, is_not, tag, take, take_while, take_while1},
@@ -60,9 +59,9 @@
/// indicating the thing thah was expected.
fn translate_expected(expected: Expected) -> String {
match expected {
- Expected::AttributeName => gettext("attribute name"),
- Expected::Operators => gettext("one of: =~, ==, =, !~, !=, <=, >=, <, >, between, #, !#"),
- Expected::Value => gettext("one of: quoted string, range, number"),
+ Expected::AttributeName => "attribute name".to_string(),
+ Expected::Operators => "one of: =~, ==, =, !~, !=, <=, >=, <, >, between, #, !#".to_string(),
+ Expected::Value => "one of: quoted string, range, number".to_string(),
}
}
@@ -353,19 +352,19 @@
let err = match error {
Error::TrailingCharacters(pos, tail) => fmt!(
// The "%{}" thing is a number, a zero-based offset into a string.
@ -42,7 +37,7 @@ diff -u -r ../newsboat-2.21/rust/libnewsboat/src/filterparser.rs ./rust/libnewsb
+ "Parse error at position %{}: expected %s",
PRIu64,
pos as u64,
expected_to_i18n_msg(expected)
&translate_expected(expected)
),
- Error::Internal => fmt!(&gettext("Internal parse error")),
+ Error::Internal => fmt!("Internal parse error"),

View File

@ -0,0 +1,48 @@
diff -uNr newsboat-2.22/rust/libnewsboat/src/fslock.rs newsboat-2.22.mod/rust/libnewsboat/src/fslock.rs
--- newsboat-2.22/rust/libnewsboat/src/fslock.rs 2020-12-21 21:56:47.000000000 +0200
+++ newsboat-2.22.mod/rust/libnewsboat/src/fslock.rs 2021-01-07 16:16:48.102924240 +0200
@@ -1,5 +1,4 @@
use crate::logger::{self, Level};
-use gettextrs::gettext;
use std::fs::{self, File, OpenOptions};
use std::io::{Error, Read, Write};
use std::os::unix::fs::OpenOptionsExt;
@@ -54,10 +53,10 @@
Ok(file) => file,
Err(reason) => {
return Err(fmt!(
- &gettext("Failed to open lock file: '%s' (%s)"),
+ "Failed to open lock file: '%s' (%s)",
new_lock_path
.to_str()
- .unwrap_or(&gettext("<filename containing invalid UTF-8 codepoint>")),
+ .unwrap_or("<filename containing invalid UTF-8 codepoint>"),
reason.to_string()
))
}
@@ -77,10 +76,10 @@
{
log!(Level::Debug, "FsLock: Failed to write PID");
return Err(fmt!(
- &gettext("Failed to write PID to lock file: '%s' (%s)"),
+ "Failed to write PID to lock file: '%s' (%s)",
new_lock_path
.to_str()
- .unwrap_or(&gettext("<filename containing invalid UTF-8 codepoint>")),
+ .unwrap_or("<filename containing invalid UTF-8 codepoint>"),
reason.to_string()
));
}
@@ -109,10 +108,10 @@
pid
);
Err(fmt!(
- &gettext("Failed to lock '%s', already locked by process with PID %{}"),
+ "Failed to lock '%s', already locked by process with PID %{}",
new_lock_path
.to_str()
- .unwrap_or(&gettext("<filename containing invalid UTF-8 codepoint>")),
+ .unwrap_or("<filename containing invalid UTF-8 codepoint>"),
PRIi64,
*pid as i64
))