Browse Source

radare2: fix path to /bin/sh and /usr/bin/diff

android-5
Leonid Plyushch 6 years ago
parent
commit
a6f0348bf4
  1. 1
      packages/radare2/build.sh
  2. 12
      packages/radare2/libr-util-diff.c.patch
  3. 12
      packages/radare2/libr-util-sandbox.c.patch

1
packages/radare2/build.sh

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://rada.re
TERMUX_PKG_DESCRIPTION="Advanced Hexadecimal Editor"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=3.3.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=3c092bdf8676d7d49537926258c50557bca98d7d669babfed6113ff82c403bcb
TERMUX_PKG_SRCURL=https://github.com/radare/radare2/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_DEPENDS="libuv"

12
packages/radare2/libr-util-diff.c.patch

@ -0,0 +1,12 @@
diff -uNr radare2-3.2.1/libr/util/diff.c radare2-3.2.1.mod/libr/util/diff.c
--- radare2-3.2.1/libr/util/diff.c 2019-01-08 18:14:43.000000000 +0200
+++ radare2-3.2.1.mod/libr/util/diff.c 2019-03-02 03:17:18.566391827 +0200
@@ -145,7 +145,7 @@
char* err = NULL;
char* out = NULL;
int out_len;
- (void)r_sys_cmd_str_full ("/usr/bin/diff -u .a .b", NULL, &out, &out_len, &err);
+ (void)r_sys_cmd_str_full ("@TERMUX_PREFIX@/bin/diff -u .a .b", NULL, &out, &out_len, &err);
r_file_rm (".a");
r_file_rm (".b");
free (err);

12
packages/radare2/libr-util-sandbox.c.patch

@ -0,0 +1,12 @@
diff -uNr radare2-3.2.1/libr/util/sandbox.c radare2-3.2.1.mod/libr/util/sandbox.c
--- radare2-3.2.1/libr/util/sandbox.c 2019-01-08 18:14:43.000000000 +0200
+++ radare2-3.2.1.mod/libr/util/sandbox.c 2019-03-02 02:42:52.796061199 +0200
@@ -154,7 +154,7 @@
return system (x);
#endif
}
- return execl ("/bin/sh", "sh", "-c", x, (const char*)NULL);
+ return execl ("@TERMUX_PREFIX@/bin/sh", "sh", "-c", x, (const char*)NULL);
#else
#include <spawn.h>
if (n && !strchr (x, '|')) {
Loading…
Cancel
Save