newsboat: fix hardcoded paths
This commit is contained in:
parent
81a248dd1e
commit
18c14e17db
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="RSS/Atom feed reader for the text console"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_API_LEVEL=24
|
||||
TERMUX_PKG_VERSION=2.14.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SHA256=4bd0d3b1901a3fc7e0ef73b800587c28181a57b175c36b547dbd84636330df66
|
||||
TERMUX_PKG_SRCURL=https://newsboat.org/releases/${TERMUX_PKG_VERSION}/newsboat-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_DEPENDS="libandroid-support, libandroid-glob, json-c, libsqlite, libcurl, libxml2, stfl, ncurses, openssl"
|
||||
|
60
packages/newsboat/fix-paths.patch
Normal file
60
packages/newsboat/fix-paths.patch
Normal file
@ -0,0 +1,60 @@
|
||||
diff -uNr newsboat-2.14.1/src/controller.cpp newsboat-2.14.1.mod/src/controller.cpp
|
||||
--- newsboat-2.14.1/src/controller.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
+++ newsboat-2.14.1.mod/src/controller.cpp 2019-03-01 21:52:00.350784451 +0200
|
||||
@@ -768,7 +768,7 @@
|
||||
} else {
|
||||
snprintf(filename,
|
||||
sizeof(filename),
|
||||
- "/tmp/newsboat-article.XXXXXX");
|
||||
+ "@TERMUX_PREFIX@/tmp/newsboat-article.XXXXXX");
|
||||
}
|
||||
int fd = mkstemp(filename);
|
||||
if (fd != -1) {
|
||||
diff -uNr newsboat-2.14.1/src/formaction.cpp newsboat-2.14.1.mod/src/formaction.cpp
|
||||
--- newsboat-2.14.1/src/formaction.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
+++ newsboat-2.14.1.mod/src/formaction.cpp 2019-03-01 21:51:38.197304516 +0200
|
||||
@@ -540,7 +540,7 @@
|
||||
return "";
|
||||
} else {
|
||||
char* my_argv[4];
|
||||
- my_argv[0] = const_cast<char*>("/bin/sh");
|
||||
+ my_argv[0] = const_cast<char*>("@TERMUX_PREFIX@/bin/sh");
|
||||
my_argv[1] = const_cast<char*>("-c");
|
||||
my_argv[2] = const_cast<char*>(cmdline.c_str());
|
||||
my_argv[3] = nullptr;
|
||||
diff -uNr newsboat-2.14.1/src/itemrenderer.cpp newsboat-2.14.1.mod/src/itemrenderer.cpp
|
||||
--- newsboat-2.14.1/src/itemrenderer.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
+++ newsboat-2.14.1.mod/src/itemrenderer.cpp 2019-03-01 21:51:38.200637872 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
rnd.render(source, lines, thelinks, url);
|
||||
} else {
|
||||
char* argv[4];
|
||||
- argv[0] = const_cast<char*>("/bin/sh");
|
||||
+ argv[0] = const_cast<char*>("@TERMUX_PREFIX@/bin/sh");
|
||||
argv[1] = const_cast<char*>("-c");
|
||||
argv[2] = const_cast<char*>(renderer.c_str());
|
||||
argv[3] = nullptr;
|
||||
diff -uNr newsboat-2.14.1/src/pbcontroller.cpp newsboat-2.14.1.mod/src/pbcontroller.cpp
|
||||
--- newsboat-2.14.1/src/pbcontroller.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
+++ newsboat-2.14.1.mod/src/pbcontroller.cpp 2019-03-01 21:51:38.200637872 +0200
|
||||
@@ -281,7 +281,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.14.1/src/rssparser.cpp newsboat-2.14.1.mod/src/rssparser.cpp
|
||||
--- newsboat-2.14.1/src/rssparser.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
+++ newsboat-2.14.1.mod/src/rssparser.cpp 2019-03-01 21:51:38.203971227 +0200
|
||||
@@ -291,7 +291,7 @@
|
||||
{
|
||||
std::string buf = utils::retrieve_url(uri, cfgcont);
|
||||
|
||||
- char* argv[4] = {const_cast<char*>("/bin/sh"),
|
||||
+ char* argv[4] = {const_cast<char*>("@TERMUX_PREFIX@/bin/sh"),
|
||||
const_cast<char*>("-c"),
|
||||
const_cast<char*>(filter.c_str()),
|
||||
nullptr};
|
Loading…
Reference in New Issue
Block a user