newsboat: Update from 2.20.1 to 2.21

This commit is contained in:
Fredrik Fornwall 2020-10-22 00:37:58 +02:00
parent 4347589111
commit ae3e39f833
7 changed files with 93 additions and 42 deletions

View File

@ -1,9 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://newsboat.org/
TERMUX_PKG_DESCRIPTION="RSS/Atom feed reader for the text console"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=2.20.1
TERMUX_PKG_VERSION=2.21
TERMUX_PKG_SRCURL=https://newsboat.org/releases/${TERMUX_PKG_VERSION}/newsboat-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=82782079b75fe307f7a5a17dff9e712aa5975678fa550fb728d5a46867943566
TERMUX_PKG_SHA256=0c46b3dd46bb578dd6dd4915db4cfdffb4352ab258f251080ad14655c75a9c31
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

@ -34,18 +34,6 @@ diff -uNr newsboat-2.19/src/itemrenderer.cpp newsboat-2.19.mod/src/itemrenderer.
argv[1] = "-c";
argv[2] = renderer.c_str();
argv[3] = nullptr;
diff -uNr newsboat-2.19/src/pbcontroller.cpp newsboat-2.19.mod/src/pbcontroller.cpp
--- newsboat-2.19/src/pbcontroller.cpp 2020-03-22 20:54:24.000000000 +0200
+++ newsboat-2.19.mod/src/pbcontroller.cpp 2020-03-29 22:59:00.641650867 +0300
@@ -283,7 +283,7 @@
cfgparser.register_handler("reset-unread-on-update", &null_cah);
try {
- cfgparser.parse("/etc/newsboat/config");
+ cfgparser.parse("@TERMUX_PREFIX@/etc/newsboat/config");
cfgparser.parse(config_file);
} catch (const ConfigException& ex) {
std::cout << ex.what() << std::endl;
diff -uNr newsboat-2.19/src/rssparser.cpp newsboat-2.19.mod/src/rssparser.cpp
--- newsboat-2.19/src/rssparser.cpp 2020-03-22 20:54:24.000000000 +0200
+++ newsboat-2.19.mod/src/rssparser.cpp 2020-03-29 22:59:48.009885990 +0300

View File

@ -1,20 +1,22 @@
diff -u -r ../newsboat-2.20.1/rust/libnewsboat/Cargo.toml ./rust/libnewsboat/Cargo.toml
--- ../newsboat-2.20.1/rust/libnewsboat/Cargo.toml 2020-06-24 09:51:43.000000000 +0000
+++ ./rust/libnewsboat/Cargo.toml 2020-08-12 07:29:42.738724000 +0000
@@ -20,7 +20,6 @@
diff -u -r ../newsboat-2.21/rust/libnewsboat/Cargo.toml ./rust/libnewsboat/Cargo.toml
--- ../newsboat-2.21/rust/libnewsboat/Cargo.toml 2020-09-20 19:14:02.000000000 +0000
+++ ./rust/libnewsboat/Cargo.toml 2020-10-21 22:26:52.328755304 +0000
@@ -18,8 +18,7 @@
unicode-width = "0.1.8"
nom = "5"
curl-sys = "0.4.5"
libc = "0.2"
-gettext-rs = "0.4.1"
-libc = "0.2"
-gettext-rs = "0.5.0"
+libc = { git = "https://github.com/fornwall/libc", branch = "android-lockf-operations" }
natord = "1.0.9"
lazy_static = "1.4.0"
# We don't use the following crates, but we pin their versions to make sure
@@ -43,12 +42,6 @@
@@ -34,12 +33,6 @@
# I want as little dependencies as practically possible.
default-features = false
-[dependencies.gettext-sys]
-version = "0.19.8"
-version = "0.19.9"
-# Don't let the crate build its own copy of gettext; force it to use the one
-# built into glibc.
-features = [ "gettext-system" ]

View File

@ -1,15 +1,15 @@
diff -u -r ../newsboat-2.20.1/rust/libnewsboat/src/configpaths.rs ./rust/libnewsboat/src/configpaths.rs
--- ../newsboat-2.20.1/rust/libnewsboat/src/configpaths.rs 2020-06-24 09:51:43.000000000 +0000
+++ ./rust/libnewsboat/src/configpaths.rs 2020-08-12 07:28:22.784578000 +0000
@@ -2,7 +2,6 @@
diff -u -r ../newsboat-2.21/rust/libnewsboat/src/configpaths.rs ./rust/libnewsboat/src/configpaths.rs
--- ../newsboat-2.21/rust/libnewsboat/src/configpaths.rs 2020-09-20 19:14:02.000000000 +0000
+++ ./rust/libnewsboat/src/configpaths.rs 2020-10-21 22:08:19.501440414 +0000
@@ -1,7 +1,6 @@
use crate::cliargsparser::CliArgsParser;
use crate::logger::{self, Level};
use crate::utils;
use dirs;
-use gettextrs::gettext;
use libc;
use std::fs::{self, DirBuilder};
use std::io;
@@ -84,11 +83,10 @@
use std::os::unix::fs::DirBuilderExt;
@@ -81,11 +80,10 @@
let uid = unsafe { libc::getuid() };
config_paths.error_message = fmt!(
@ -22,7 +22,7 @@ diff -u -r ../newsboat-2.20.1/rust/libnewsboat/src/configpaths.rs ./rust/libnews
uid
);
@@ -146,7 +144,7 @@
@@ -143,7 +141,7 @@
if !self.silent {
eprintln!(
"{}",
@ -31,7 +31,7 @@ diff -u -r ../newsboat-2.20.1/rust/libnewsboat/src/configpaths.rs ./rust/libnews
);
}
@@ -202,7 +200,7 @@
@@ -199,7 +197,7 @@
if !self.silent {
eprintln!(
"{}",
@ -40,7 +40,7 @@ diff -u -r ../newsboat-2.20.1/rust/libnewsboat/src/configpaths.rs ./rust/libnews
);
}
@@ -214,7 +212,7 @@
@@ -211,7 +209,7 @@
eprintln!(
"{}",
&fmt!(

View File

@ -0,0 +1,51 @@
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
@@ -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 @@
let err = match error {
Error::TrailingCharacters(pos, tail) => fmt!(
// The "%{}" thing is a number, a zero-based offset into a string.
- &gettext("Parse error: trailing characters after position %{}: %s"),
+ "Parse error: trailing characters after position %{}: %s",
PRIu64,
pos as u64,
tail
),
Error::AtPos(pos, expected) => fmt!(
// The "%{}" thing is a number, a zero-based offset into a string.
- &gettext("Parse error at position %{}: expected %s"),
+ "Parse error at position %{}: expected %s",
PRIu64,
pos as u64,
expected_to_i18n_msg(expected)
),
- Error::Internal => fmt!(&gettext("Internal parse error")),
+ Error::Internal => fmt!("Internal parse error"),
};
Err(err)
}

View File

@ -1,10 +1,8 @@
diff -u -r ../newsboat-2.20.1/rust/regex-rs/Cargo.toml ./rust/regex-rs/Cargo.toml
--- ../newsboat-2.20.1/rust/regex-rs/Cargo.toml 2020-06-24 09:51:43.000000000 +0000
+++ ./rust/regex-rs/Cargo.toml 2020-08-12 07:44:18.635260000 +0000
@@ -11,5 +11,4 @@
strprintf = { path="../strprintf" }
diff -u -r ../newsboat-2.21/rust/regex-rs/Cargo.toml ./rust/regex-rs/Cargo.toml
--- ../newsboat-2.21/rust/regex-rs/Cargo.toml 2020-09-20 19:14:02.000000000 +0000
+++ ./rust/regex-rs/Cargo.toml 2020-10-21 22:09:31.909107906 +0000
@@ -12,4 +12,3 @@
bitflags = "1.0"
-libc = ">=0.2.69"
-gettext-rs = "0.4.1"
+libc = { git = "https://github.com/fornwall/libc", branch = "android-regex" }
bitflags = "1.2"
libc = ">=0.2.69"
-gettext-rs = "0.5.0"

View File

@ -0,0 +1,12 @@
diff -u -r ../newsboat-2.21/src/pbcontroller.cpp ./src/pbcontroller.cpp
--- ../newsboat-2.21/src/pbcontroller.cpp 2020-09-20 19:14:02.000000000 +0000
+++ ./src/pbcontroller.cpp 2020-10-21 22:02:08.424677867 +0000
@@ -279,7 +279,7 @@
cfgparser.register_handler("reset-unread-on-update", null_cah);
try {
- cfgparser.parse_file("/etc/newsboat/config");
+ cfgparser.parse_file("@TERMUX_PREFIX@/etc/newsboat/config");
cfgparser.parse_file(config_file);
} catch (const ConfigException& ex) {
std::cout << ex.what() << std::endl;