Leonid Plyushch
7 years ago
committed by
Fredrik Fornwall
2 changed files with 125 additions and 4 deletions
@ -1,9 +1,13 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://elinks.or.cz |
|||
TERMUX_PKG_DESCRIPTION="Full-Featured Text WWW Browser" |
|||
TERMUX_PKG_VERSION=0.12pre6 |
|||
TERMUX_PKG_REVISION=4 |
|||
TERMUX_PKG_SRCURL=http://archive.ubuntu.com/ubuntu/pool/universe/e/elinks/elinks_0.12~pre6.orig.tar.gz |
|||
TERMUX_PKG_SHA256=c0b3a7871f4aea954b0a66d5bbc6ce6de55ad17aa25aba3987f775707067c800 |
|||
_COMMIT=f86be659718c0cd0a67f88b42f07044c23d0d028 |
|||
TERMUX_PKG_VERSION=0.13.GIT |
|||
TERMUX_PKG_SRCURL=https://github.com/xeffyr/elinks/archive/${_COMMIT}.zip |
|||
TERMUX_PKG_SHA256=3e65aaabcc4f6b2418643cf965786c00e3f196330f3e7863ca83f9e546d5e609 |
|||
TERMUX_PKG_DEPENDS="libexpat, libidn, openssl, libbz2" |
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-256-colors --enable-true-color --with-openssl --mandir=$TERMUX_PREFIX/share/man --without-gc" |
|||
TERMUX_MAKE_PROCESSES=1 |
|||
|
|||
termux_step_pre_configure() { |
|||
./autogen.sh |
|||
} |
|||
|
@ -0,0 +1,117 @@ |
|||
diff --git a/contrib/proxy/gen.c b/contrib/proxy/gen.c
|
|||
index 6e7807ab..8b5b2b1a 100644
|
|||
--- a/contrib/proxy/gen.c
|
|||
+++ b/contrib/proxy/gen.c
|
|||
@@ -5,7 +5,7 @@
|
|||
#include <unistd.h> |
|||
|
|||
struct stat st; |
|||
-char *file = "/tmp/log";
|
|||
+char *file = "/data/data/com.termux/files/usr/tmp/log";
|
|||
unsigned char *data; |
|||
int counter = 0; |
|||
|
|||
@@ -17,7 +17,7 @@ struct {
|
|||
} tab[100000]; /* should be enough */ |
|||
|
|||
unsigned char header[] = |
|||
-"#!/usr/bin/env python\n"
|
|||
+"#!/data/data/com.termux/files/usr/bin/env python\n"
|
|||
"import BaseHTTPServer\n\n"; |
|||
|
|||
unsigned char footer[] = |
|||
diff --git a/src/network/socket.c b/src/network/socket.c
|
|||
index 3426b681..480d7378 100644
|
|||
--- a/src/network/socket.c
|
|||
+++ b/src/network/socket.c
|
|||
@@ -83,7 +83,7 @@ static INIT_LIST_OF(struct socket_weak_ref, socket_weak_refs);
|
|||
/* To enable logging of tranfers, for debugging purposes. */ |
|||
#if 0 |
|||
|
|||
-#define DEBUG_TRANSFER_LOGFILE "/tmp/log"
|
|||
+#define DEBUG_TRANSFER_LOGFILE "/data/data/com.termux/files/usr/tmp/log"
|
|||
|
|||
static void |
|||
debug_transfer_log(unsigned char *data, int len) |
|||
diff --git a/src/osdep/unix/sysinfo.h b/src/osdep/unix/sysinfo.h
|
|||
index 7b4ef587..d2653d87 100644
|
|||
--- a/src/osdep/unix/sysinfo.h
|
|||
+++ b/src/osdep/unix/sysinfo.h
|
|||
@@ -6,7 +6,7 @@
|
|||
|
|||
#define SYSTEM_NAME "Unix" |
|||
#define SYSTEM_STR "unix" |
|||
-#define DEFAULT_SHELL "/bin/sh"
|
|||
+#define DEFAULT_SHELL "/data/data/com.termux/files/usr/bin/sh"
|
|||
#define GETSHELL getenv("SHELL") |
|||
|
|||
static inline int dir_sep(char x) { return x == '/'; } |
|||
diff --git a/src/protocol/file/mailcap.c b/src/protocol/file/mailcap.c
|
|||
index 24b47025..06eff352 100644
|
|||
--- a/src/protocol/file/mailcap.c
|
|||
+++ b/src/protocol/file/mailcap.c
|
|||
@@ -110,7 +110,7 @@ mailcap_protocol_handler(struct connection *conn)
|
|||
/* We implicitly chain stderr to ELinks' stderr. */ |
|||
close_all_non_term_fd(); |
|||
|
|||
- if (execl("/bin/sh", "/bin/sh", "-c", script, (char *) NULL)) {
|
|||
+ if (execl("/data/data/com.termux/files/usr/bin/sh", "/data/data/com.termux/files/usr/bin/sh", "-c", script, (char *) NULL)) {
|
|||
_exit(3); |
|||
} |
|||
|
|||
diff --git a/src/session/download.c b/src/session/download.c
|
|||
index 000bbe97..538f1715 100644
|
|||
--- a/src/session/download.c
|
|||
+++ b/src/session/download.c
|
|||
@@ -373,7 +373,7 @@ exec_mailcap_command(void *data)
|
|||
add_to_string(&string, "mailcap:"); |
|||
add_to_string(&string, exec_mailcap->command); |
|||
if (exec_mailcap->file) { |
|||
- add_to_string(&string, " && /bin/rm -f ");
|
|||
+ add_to_string(&string, " && /data/data/com.termux/files/usr/bin/rm -f ");
|
|||
add_to_string(&string, exec_mailcap->file); |
|||
} |
|||
|
|||
@@ -1067,7 +1067,7 @@ subst_file(unsigned char *prog, unsigned char *file)
|
|||
struct string s; |
|||
|
|||
if (init_string(&s)) { |
|||
- add_to_string(&s, "/bin/cat ");
|
|||
+ add_to_string(&s, "/data/data/com.termux/files/usr/bin/cat ");
|
|||
add_shell_quoted_to_string(&s, file, strlen(file)); |
|||
add_to_string(&s, " | "); |
|||
add_string_to_string(&s, &name); |
|||
diff --git a/src/setup.h b/src/setup.h
|
|||
index 572610f5..5b69de99 100644
|
|||
--- a/src/setup.h
|
|||
+++ b/src/setup.h
|
|||
@@ -83,11 +83,11 @@
|
|||
|
|||
/* Default mime settings */ |
|||
#define DEFAULT_MIME_TYPE "application/octet-stream" |
|||
-#define DEFAULT_PAGER_PATH "/usr/bin/pager"
|
|||
-#define DEFAULT_LESS_PATH "/usr/bin/less"
|
|||
-#define DEFAULT_MORE_PATH "/usr/bin/more"
|
|||
-#define DEFAULT_MAILCAP_PATH "~/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap:/usr/share/mailcap:/usr/share/misc/mailcap"
|
|||
-#define DEFAULT_MIMETYPES_PATH "~/.mime.types:/etc/mime.types:/usr/etc/mime.types:/usr/local/etc/mime.types:/usr/share/mime.types:/usr/share/misc/mime.types"
|
|||
+#define DEFAULT_PAGER_PATH "/data/data/com.termux/files/usr/bin/pager"
|
|||
+#define DEFAULT_LESS_PATH "/data/data/com.termux/files/usr/bin/less"
|
|||
+#define DEFAULT_MORE_PATH "/data/data/com.termux/files/usr/bin/more"
|
|||
+#define DEFAULT_MAILCAP_PATH "~/.mailcap:/data/data/com.termux/files/usr/etc/mailcap:/data/data/com.termux/files/usr/share/mailcap"
|
|||
+#define DEFAULT_MIMETYPES_PATH "~/.mime.types:/data/data/com.termux/files/usr/etc/mime.types:/data/data/com.termux/files/usr/share/mime.types"
|
|||
|
|||
/* Default external commands (see osdep/newwin.c and/or system-specific osdep/ |
|||
* files) */ |
|||
diff --git a/src/util/file.c b/src/util/file.c
|
|||
index 90882eed..cae9052e 100644
|
|||
--- a/src/util/file.c
|
|||
+++ b/src/util/file.c
|
|||
@@ -186,7 +186,7 @@ get_tempdir_filename(unsigned char *name)
|
|||
if (!tmpdir || !*tmpdir) tmpdir = getenv("TMP"); |
|||
if (!tmpdir || !*tmpdir) tmpdir = getenv("TEMPDIR"); |
|||
if (!tmpdir || !*tmpdir) tmpdir = getenv("TEMP"); |
|||
- if (!tmpdir || !*tmpdir) tmpdir = "/tmp";
|
|||
+ if (!tmpdir || !*tmpdir) tmpdir = "/data/data/com.termux/files/usr/tmp";
|
|||
|
|||
return straconcat(tmpdir, "/", name, (unsigned char *) NULL); |
|||
} |
Loading…
Reference in new issue