ncurses: fix hardcoded paths
This commit is contained in:
parent
4f66b934e9
commit
3085cc5f48
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Library for text-based user interfaces in a terminal-ind
|
|||||||
TERMUX_PKG_LICENSE="MIT"
|
TERMUX_PKG_LICENSE="MIT"
|
||||||
TERMUX_PKG_VERSION=(6.1.20181117
|
TERMUX_PKG_VERSION=(6.1.20181117
|
||||||
9.22)
|
9.22)
|
||||||
|
TERMUX_PKG_REVISION=1
|
||||||
TERMUX_PKG_SHA256=(b5568d53d31787cda727f949b68bcb60c667dba5deff72bd7ade40dbe45e4b16
|
TERMUX_PKG_SHA256=(b5568d53d31787cda727f949b68bcb60c667dba5deff72bd7ade40dbe45e4b16
|
||||||
e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd)
|
e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd)
|
||||||
TERMUX_PKG_SRCURL=(https://dl.bintray.com/termux/upstream/ncurses-${TERMUX_PKG_VERSION:0:3}-${TERMUX_PKG_VERSION:4}.tgz
|
TERMUX_PKG_SRCURL=(https://dl.bintray.com/termux/upstream/ncurses-${TERMUX_PKG_VERSION:0:3}-${TERMUX_PKG_VERSION:4}.tgz
|
||||||
|
35
packages/ncurses/fix-paths.patch
Normal file
35
packages/ncurses/fix-paths.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
diff -uNr ncurses-6.1-20181117/progs/tic.c ncurses-6.1-20181117.mod/progs/tic.c
|
||||||
|
--- ncurses-6.1-20181117/progs/tic.c 2018-03-18 02:05:10.000000000 +0200
|
||||||
|
+++ ncurses-6.1-20181117.mod/progs/tic.c 2019-03-01 20:40:56.193173489 +0200
|
||||||
|
@@ -386,7 +386,7 @@
|
||||||
|
{
|
||||||
|
FILE *result = 0;
|
||||||
|
|
||||||
|
- _nc_STRCPY(filename, "/tmp/XXXXXX", PATH_MAX);
|
||||||
|
+ _nc_STRCPY(filename, "@TERMUX_PREFIX@/tmp/XXXXXX", PATH_MAX);
|
||||||
|
#if HAVE_MKSTEMP
|
||||||
|
{
|
||||||
|
int oldmask = (int) umask(077);
|
||||||
|
@@ -900,7 +900,7 @@
|
||||||
|
} else {
|
||||||
|
if (infodump == TRUE) {
|
||||||
|
/* captoinfo's no-argument case */
|
||||||
|
- source_file = "/etc/termcap";
|
||||||
|
+ source_file = "@TERMUX_PREFIX@/etc/termcap";
|
||||||
|
if ((termcap = getenv("TERMCAP")) != 0
|
||||||
|
&& (namelst = make_namelist(getenv("TERM"))) != 0) {
|
||||||
|
if (access(termcap, F_OK) == 0) {
|
||||||
|
diff -uNr ncurses-6.1-20181117/progs/tset.c ncurses-6.1-20181117.mod/progs/tset.c
|
||||||
|
--- ncurses-6.1-20181117/progs/tset.c 2017-10-08 03:01:29.000000000 +0300
|
||||||
|
+++ ncurses-6.1-20181117.mod/progs/tset.c 2019-03-01 20:40:15.049476720 +0200
|
||||||
|
@@ -566,8 +566,8 @@
|
||||||
|
goto map;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
- if ((fp = fopen("/etc/ttytype", "r")) != 0
|
||||||
|
- || (fp = fopen("/etc/ttys", "r")) != 0) {
|
||||||
|
+ if ((fp = fopen("@TERMUX_PREFIX@/etc/ttytype", "r")) != 0
|
||||||
|
+ || (fp = fopen("@TERMUX_PREFIX@/etc/ttys", "r")) != 0) {
|
||||||
|
char buffer[BUFSIZ];
|
||||||
|
char *s, *t, *d;
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -uNr ncurses-6.0-20170909/progs/tic.c ncurses-6.0-20170909.mod/progs/tic.c
|
|
||||||
--- ncurses-6.0-20170909/progs/tic.c 2017-08-26 23:56:55.000000000 +0300
|
|
||||||
+++ ncurses-6.0-20170909.mod/progs/tic.c 2017-09-14 15:45:21.992857305 +0300
|
|
||||||
@@ -386,7 +386,7 @@
|
|
||||||
{
|
|
||||||
FILE *result = 0;
|
|
||||||
|
|
||||||
- _nc_STRCPY(filename, "/tmp/XXXXXX", PATH_MAX);
|
|
||||||
+ _nc_STRCPY(filename, "@TERMUX_PREFIX@/tmp/XXXXXX", PATH_MAX);
|
|
||||||
#if HAVE_MKSTEMP
|
|
||||||
{
|
|
||||||
int oldmask = (int) umask(077);
|
|
Loading…
Reference in New Issue
Block a user