mailutils: Fix hardcoded paths (#8121)
* mailutils: Fix hardcoded paths * mailutils: Bump revision
This commit is contained in:
parent
758ec3a929
commit
41e07e5b2f
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Mailutils is a swiss army knife of electronic mail handl
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@suhan-paradkar"
|
||||
TERMUX_PKG_VERSION=3.13
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/mailutils/mailutils-$TERMUX_PKG_VERSION.tar.xz
|
||||
TERMUX_PKG_SHA256=d920971dcb49878a009911774fd6404f13d27bd101e2d59b664a28659a4094c7
|
||||
TERMUX_PKG_BUILD_DEPENDS="libandroid-glob, libcrypt"
|
||||
|
27
packages/mailutils/lib-mailcap.c.patch
Normal file
27
packages/mailutils/lib-mailcap.c.patch
Normal file
@ -0,0 +1,27 @@
|
||||
--- a/lib/mailcap.c
|
||||
+++ b/lib/mailcap.c
|
||||
@@ -22,11 +22,10 @@
|
||||
|
||||
/* Default mailcap path, the $HOME/.mailcap: entry is prepended to it */
|
||||
#define DEFAULT_MAILCAP \
|
||||
- "/usr/local/etc/mailcap:"\
|
||||
- "/usr/etc/mailcap:"\
|
||||
- "/etc/mailcap:"\
|
||||
- "/etc/mail/mailcap:"\
|
||||
- "/usr/public/lib/mailcap"
|
||||
+ "@TERMUX_PREFIX@/local/etc/mailcap:"\
|
||||
+ "@TERMUX_PREFIX@/etc/mailcap:"\
|
||||
+ "@TERMUX_PREFIX@/etc/mail/mailcap:"\
|
||||
+ "@TERMUX_PREFIX@/public/lib/mailcap"
|
||||
|
||||
#define FLAGS_DRY_RUN 0x0001
|
||||
#define FLAGS_INTERACTIVE 0x0002
|
||||
@@ -426,7 +425,7 @@
|
||||
if (mu_mailcap_entry_sget_field (entry, MU_MAILCAP_TEST, &value) == 0)
|
||||
{
|
||||
char *str;
|
||||
- char *argv[] = { "/bin/sh", "-c", NULL, NULL };
|
||||
+ char *argv[] = { "@TERMUX_PREFIX@/bin/sh", "-c", NULL, NULL };
|
||||
expand_string (ctx, value, &str);
|
||||
argv[2] = str;
|
||||
if (mu_spawnvp (argv[0], argv, &status))
|
11
packages/mailutils/lib-manlock.c.patch
Normal file
11
packages/mailutils/lib-manlock.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/lib/manlock.c
|
||||
+++ b/lib/manlock.c
|
||||
@@ -52,7 +52,7 @@
|
||||
*/
|
||||
|
||||
int manlock_mandatory_locking;
|
||||
-char *manlock_lock_dir = "/var/lock/subsys/mail";
|
||||
+char *manlock_lock_dir = "@TERMUX_PREFIX@/var/lock/subsys/mail";
|
||||
|
||||
static char *
|
||||
make_locker_file_name (const char *urlstr)
|
20
packages/mailutils/libmailutils-diag-bt.c.patch
Normal file
20
packages/mailutils/libmailutils-diag-bt.c.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/libmailutils/diag/bt.c
|
||||
+++ b/libmailutils/diag/bt.c
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
if (!mu_program_name)
|
||||
abort ();
|
||||
- sprintf (fname, "/tmp/mailutils.%s.%lu",
|
||||
+ sprintf (fname, "@TERMUX_PREFIX@/tmp/mailutils.%s.%lu",
|
||||
mu_program_name, (unsigned long) master_pid);
|
||||
|
||||
pid = fork ();
|
||||
@@ -67,7 +67,7 @@
|
||||
dup2 (fd, 2);
|
||||
close (fd);
|
||||
|
||||
- argv[0] = "/usr/bin/gdb";
|
||||
+ argv[0] = "@TERMUX_PREFIX@/bin/gdb";
|
||||
argv[1] = (char*) mu_full_program_name;
|
||||
sprintf (buf, "%lu", (unsigned long) master_pid);
|
||||
argv[2] = buf;
|
11
packages/mailutils/mail-send.c.patch
Normal file
11
packages/mailutils/mail-send.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/mail/send.c
|
||||
+++ b/mail/send.c
|
||||
@@ -1518,7 +1518,7 @@
|
||||
|
||||
argv[0] = getenv ("SHELL");
|
||||
if (!argv[0])
|
||||
- argv[0] = "/bin/sh";
|
||||
+ argv[0] = "@TERMUX_PREFIX@/bin/sh";
|
||||
argv[1] = "-c";
|
||||
argv[2] = (char*) cmd;
|
||||
argv[3] = NULL;
|
11
packages/mailutils/mh-send.c.patch
Normal file
11
packages/mailutils/mh-send.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/mh/send.c
|
||||
+++ b/mh/send.c
|
||||
@@ -339,7 +339,7 @@
|
||||
{
|
||||
const char *url = mu_mhprop_get_value (mts_profile,
|
||||
"url",
|
||||
- "sendmail:/usr/sbin/sendmail");
|
||||
+ "sendmail:@TERMUX_PREFIX@/bin/sendmail");
|
||||
mu_mailer_t mailer;
|
||||
int status;
|
||||
|
20
packages/mailutils/mh-show.c.patch
Normal file
20
packages/mailutils/mh-show.c.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/mh/show.c
|
||||
+++ b/mh/show.c
|
||||
@@ -253,7 +253,7 @@
|
||||
*/
|
||||
|
||||
if (!use_showproc)
|
||||
- showproc = "/bin/cat";
|
||||
+ showproc = "@TERMUX_PREFIX@/bin/cat";
|
||||
else
|
||||
showproc = mh_global_profile_get ("showproc", NULL);
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
{
|
||||
showproc = getenv ("PAGER");
|
||||
if (!showproc)
|
||||
- showproc = "/usr/bin/more";
|
||||
+ showproc = "@TERMUX_PREFIX@/bin/more";
|
||||
}
|
||||
finisarg ();
|
||||
execvp (showproc, showargv);
|
21
packages/mailutils/paths.patch
Normal file
21
packages/mailutils/paths.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- a/paths
|
||||
+++ b/paths
|
||||
@@ -64,13 +64,13 @@
|
||||
# file <confpaths.h> (located in include/).
|
||||
#
|
||||
|
||||
-PATH_SENDMAIL search:sendmail:/usr/sbin:/usr/lib:/etc /usr/sbin/sendmail
|
||||
-PATH_MAILDIR d /var/mail /var/spool/mail
|
||||
+PATH_SENDMAIL search:sendmail:@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/lib:@TERMUX_PREFIX@/etc @TERMUX_PREFIX@/bin/sendmail
|
||||
+PATH_MAILDIR d @TERMUX_PREFIX@/var/mail @TERMUX_PREFIX@/var/spool/mail
|
||||
PATH_DEV d /dev/
|
||||
# PATH_TTY_PFX is a prefix that's removed to get a tty device's name
|
||||
PATH_TTY_PFX <paths.h>:_PATH_DEV d /dev/
|
||||
PATH_DEVNULL c /dev/null
|
||||
-PATH_UTMP <utmp.h> <utmp.h>:UTMP_FILE $(localstatedir)/run/utmp search:utmp:/var/run:/var/adm:/etc
|
||||
-PATH_UTMPX <utmpx.h> <utmpx.h>:UTMPX_FILE $(localstatedir)/run/utmpx search:utmpx:/var/run:/var/adm:/etc
|
||||
-PATH_WTMP <utmp.h> <utmp.h>:WTMP_FILE $(localstatedir)/log/wtmp search:wtmp:/var/log:/var/adm:/etc
|
||||
+PATH_UTMP <utmp.h> <utmp.h>:UTMP_FILE $(localstatedir)/run/utmp search:utmp:@TERMUX_PREFIX@/var/run:@TERMUX_PREFIX@/var/adm:@TERMUX_PREFIX@/etc
|
||||
+PATH_UTMPX <utmpx.h> <utmpx.h>:UTMPX_FILE $(localstatedir)/run/utmpx search:utmpx:@TERMUX_PREFIX@/var/run:@TERMUX_PREFIX@/var/adm:@TERMUX_PREFIX@/etc
|
||||
+PATH_WTMP <utmp.h> <utmp.h>:WTMP_FILE $(localstatedir)/log/wtmp search:wtmp:@TERMUX_PREFIX@/var/log:@TERMUX_PREFIX@/var/adm:@TERMUX_PREFIX@/etc
|
||||
PATH_TTY c /dev/tty
|
Loading…
Reference in New Issue
Block a user