file: fix hardcoded paths
This commit is contained in:
parent
9cc7576485
commit
ab6af9ba21
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://darwinsys.com/file/
|
||||
TERMUX_PKG_DESCRIPTION="Command-line tool that tells you in words what kind of data a file contains"
|
||||
TERMUX_PKG_LICENSE="BSD 2-Clause"
|
||||
TERMUX_PKG_VERSION=5.36
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=fb608290c0fd2405a8f63e5717abf6d03e22e183fb21884413d1edd918184379
|
||||
TERMUX_PKG_SRCURL=ftp://ftp.astron.com/pub/file/file-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_mmap_fixed_mapped=yes"
|
||||
|
24
packages/file/fix-paths.patch
Normal file
24
packages/file/fix-paths.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -uNr file-5.35/src/compress.c file-5.35.mod/src/compress.c
|
||||
--- file-5.35/src/compress.c 2018-10-15 19:29:16.000000000 +0300
|
||||
+++ file-5.35.mod/src/compress.c 2019-03-02 01:49:14.754069208 +0200
|
||||
@@ -410,7 +410,7 @@
|
||||
ssize_t r;
|
||||
int tfd;
|
||||
|
||||
- (void)strlcpy(buf, "/tmp/file.XXXXXX", sizeof buf);
|
||||
+ (void)strlcpy(buf, "@TERMUX_PREFIX@/tmp/file.XXXXXX", sizeof buf);
|
||||
#ifndef HAVE_MKSTEMP
|
||||
{
|
||||
char *ptr = mktemp(buf);
|
||||
diff -uNr file-5.35/src/file.h file-5.35.mod/src/file.h
|
||||
--- file-5.35/src/file.h 2018-10-15 19:29:16.000000000 +0300
|
||||
+++ file-5.35.mod/src/file.h 2019-03-02 01:49:41.984157713 +0200
|
||||
@@ -79,7 +79,7 @@
|
||||
#define ENABLE_CONDITIONALS
|
||||
|
||||
#ifndef MAGIC
|
||||
-#define MAGIC "/etc/magic"
|
||||
+#define MAGIC "@TERMUX_PREFIX@/etc/magic"
|
||||
#endif
|
||||
|
||||
#if defined(__EMX__) || defined (WIN32)
|
Loading…
Reference in New Issue
Block a user