Browse Source

Use @TERMUX_PREFIX@ in more patch files

android-5
Fredrik Fornwall 7 years ago
parent
commit
e0ab589ef9
  1. 6
      packages/alpine/configure.patch
  2. 2
      packages/ncmpcpp/config.patch
  3. 4
      packages/screen/screen.h.patch
  4. 8
      packages/tor/fix-hardcoded-paths.patch

6
packages/alpine/configure.patch

@ -6,11 +6,11 @@ diff -u -r ../alpine-2.21/configure ./configure
fi fi
;; ;;
+ *-*-*-android*) + *-*-*-android*)
+ alpine_SSLDIR="/data/data/com.termux/files/usr/etc/tls" + alpine_SSLDIR="@TERMUX_PREFIX@/etc/tls"
+ alpine_SSLCERTS="$alpine_SSLDIR/certs" + alpine_SSLCERTS="$alpine_SSLDIR/certs"
+ alpine_SSLKEYS="$alpine_SSLDIR/private" + alpine_SSLKEYS="$alpine_SSLDIR/private"
+ alpine_SSLINCLUDE="/data/data/com.termux/files/usr/include/openssl" + alpine_SSLINCLUDE="@TERMUX_PREFIX@/include/openssl"
+ alpine_SSLLIB="/data/data/com.termux/files/usr/lib" + alpine_SSLLIB="@TERMUX_PREFIX@/lib"
+ alpine_path_delim="/" + alpine_path_delim="/"
+ ;; + ;;
*-apple-darwin*) *-apple-darwin*)

2
packages/ncmpcpp/config.patch

@ -5,7 +5,7 @@
## ##
# #
-#visualizer_fifo_path = /tmp/mpd.fifo -#visualizer_fifo_path = /tmp/mpd.fifo
+visualizer_fifo_path = "/data/data/com.termux/files/usr/tmp/mpd.fifo" +visualizer_fifo_path = "@TERMUX_PREFIX@/tmp/mpd.fifo"
+visualizer_output_name = "my_fifo" +visualizer_output_name = "my_fifo"
+visualizer_sync_interval = "30" +visualizer_sync_interval = "30"
+visualizer_in_stereo = "yes" +visualizer_in_stereo = "yes"

4
packages/screen/screen.h.patch

@ -5,10 +5,10 @@
#define DEFAULTHISTHEIGHT 100 #define DEFAULTHISTHEIGHT 100
#if defined(NAME_MAX) && NAME_MAX < 16 #if defined(NAME_MAX) && NAME_MAX < 16
-# define DEFAULT_BUFFERFILE "/tmp/screen-xchg" -# define DEFAULT_BUFFERFILE "/tmp/screen-xchg"
+# define DEFAULT_BUFFERFILE "/data/data/com.termux/files/usr/tmp/screen-xchg" +# define DEFAULT_BUFFERFILE "@TERMUX_PREFIX@/tmp/screen-xchg"
#else #else
-# define DEFAULT_BUFFERFILE "/tmp/screen-exchange" -# define DEFAULT_BUFFERFILE "/tmp/screen-exchange"
+# define DEFAULT_BUFFERFILE "/data/data/com.termux/files/usr/tmp/screen-exchange" +# define DEFAULT_BUFFERFILE "@TERMUX_PREFIX@/tmp/screen-exchange"
#endif #endif

8
packages/tor/fix-hardcoded-paths.patch

@ -6,7 +6,7 @@ diff -uNr tor-0.3.1.8/src/or/dns.c tor-0.3.1.8.mod/src/or/dns.c
#ifndef _WIN32 #ifndef _WIN32
if (!conf_fname) if (!conf_fname)
- conf_fname = "/etc/resolv.conf"; - conf_fname = "/etc/resolv.conf";
+ conf_fname = "/data/data/com.termux/files/usr/etc/resolv.conf"; + conf_fname = "@TERMUX_PREFIX@/etc/resolv.conf";
#endif #endif
flags = DNS_OPTIONS_ALL; flags = DNS_OPTIONS_ALL;
@ -18,7 +18,7 @@ diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
OPEN("/dev/urandom"); OPEN("/dev/urandom");
OPEN("/dev/random"); OPEN("/dev/random");
- OPEN("/etc/hosts"); - OPEN("/etc/hosts");
+ OPEN("/data/data/com.termux/files/usr/etc/hosts"); + OPEN("@TERMUX_PREFIX@/etc/hosts");
OPEN("/proc/meminfo"); OPEN("/proc/meminfo");
if (options->BridgeAuthoritativeDir) if (options->BridgeAuthoritativeDir)
@ -27,7 +27,7 @@ diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
tor_strdup(options->ServerDNSResolvConfFile)); tor_strdup(options->ServerDNSResolvConfFile));
else else
- sandbox_cfg_allow_open_filename(&cfg, tor_strdup("/etc/resolv.conf")); - sandbox_cfg_allow_open_filename(&cfg, tor_strdup("/etc/resolv.conf"));
+ sandbox_cfg_allow_open_filename(&cfg, tor_strdup("/data/data/com.termux/files/usr/etc/resolv.conf")); + sandbox_cfg_allow_open_filename(&cfg, tor_strdup("@TERMUX_PREFIX@/etc/resolv.conf"));
for (i = 0; i < 2; ++i) { for (i = 0; i < 2; ++i) {
if (get_torrc_fname(i)) { if (get_torrc_fname(i)) {
@ -36,7 +36,7 @@ diff -uNr tor-0.3.1.8/src/or/main.c tor-0.3.1.8.mod/src/or/main.c
OPEN_DATADIR_SUFFIX("router-stability", ".tmp"); OPEN_DATADIR_SUFFIX("router-stability", ".tmp");
- OPEN("/etc/resolv.conf"); - OPEN("/etc/resolv.conf");
+ OPEN("/data/data/com.termux/files/usr/etc/resolv.conf"); + OPEN("@TERMUX_PREFIX@/etc/resolv.conf");
RENAME_SUFFIX("fingerprint", ".tmp"); RENAME_SUFFIX("fingerprint", ".tmp");
RENAME_SUFFIX2("keys", "secret_onion_key_ntor", ".tmp"); RENAME_SUFFIX2("keys", "secret_onion_key_ntor", ".tmp");

Loading…
Cancel
Save