new package: neomutt
Requested in https://github.com/termux/termux-packages/issues/6207.
This commit is contained in:
parent
a1bbdb4f9b
commit
763f9ebf7e
13
packages/neomutt/autosetup-config.guess.patch
Normal file
13
packages/neomutt/autosetup-config.guess.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/autosetup/autosetup-config.guess b/autosetup/autosetup-config.guess
|
||||
index 256083a70..946ee1ea2 100755
|
||||
--- a/autosetup/autosetup-config.guess
|
||||
+++ b/autosetup/autosetup-config.guess
|
||||
@@ -99,7 +99,7 @@ trap 'exit 1' 1 2 15
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
-: ${TMPDIR=/tmp} ;
|
||||
+: ${TMPDIR=@TERMUX_PREFIX@/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
16
packages/neomutt/build.sh
Normal file
16
packages/neomutt/build.sh
Normal file
@ -0,0 +1,16 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://neomutt.org/
|
||||
TERMUX_PKG_DESCRIPTION="A version of mutt with added features"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=20201127
|
||||
TERMUX_PKG_SRCURL=https://github.com/neomutt/neomutt/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=29ac51a5ac5b4524dfdbb5ac78b59a1cc28c1090c541fb3da7bc86f838ab64cd
|
||||
TERMUX_PKG_DEPENDS="gdbm, krb5, libiconv, libsasl, ncurses, openssl, zlib, zstd"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_CONFFILES="etc/neomuttrc"
|
||||
|
||||
termux_step_configure() {
|
||||
./configure --host=$TERMUX_HOST_PLATFORM \
|
||||
--prefix=$TERMUX_PREFIX --with-mailpath=$PREFIX/var/mail \
|
||||
--disable-gpgme --disable-idn --zstd --sasl --ssl --gdbm --gss
|
||||
}
|
21
packages/neomutt/config.c.patch
Normal file
21
packages/neomutt/config.c.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git a/docs/config.c b/docs/config.c
|
||||
index 3e6c680f2..595cc6ddc 100644
|
||||
--- a/docs/config.c
|
||||
+++ b/docs/config.c
|
||||
@@ -5091,14 +5091,14 @@
|
||||
** A value of zero or less will cause NeoMutt to never time out.
|
||||
*/
|
||||
|
||||
-{ "tmpdir", DT_PATH, "/tmp" },
|
||||
+{ "tmpdir", DT_PATH, "@TERMUX_PREFIX@/tmp" },
|
||||
/*
|
||||
** .pp
|
||||
** This variable allows you to specify where NeoMutt will place its
|
||||
** temporary files needed for displaying and composing messages.
|
||||
** .pp
|
||||
** If this variable is not set, the environment variable \fC$$$TMPDIR\fP is
|
||||
-** used. Failing that, then "\fC/tmp\fP" is used.
|
||||
+** used. Failing that, then "\fC@TERMUX_PREFIX@/tmp\fP" is used.
|
||||
*/
|
||||
|
||||
{ "to_chars", DT_MBTABLE, " +TCFLR" },
|
16
packages/neomutt/file.c.patch
Normal file
16
packages/neomutt/file.c.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/mutt/file.c b/mutt/file.c
|
||||
index 05a4918d6..bd8b14620 100644
|
||||
--- a/mutt/file.c
|
||||
+++ b/mutt/file.c
|
||||
@@ -353,6 +353,11 @@ int mutt_file_symlink(const char *oldpath, const char *newpath)
|
||||
*/
|
||||
int mutt_file_safe_rename(const char *src, const char *target)
|
||||
{
|
||||
+/* Android (since 6.0) does not support hardlinks. */
|
||||
+#ifdef __ANDROID__
|
||||
+ return rename(src, target);
|
||||
+#endif
|
||||
+
|
||||
struct stat ssb, tsb;
|
||||
int link_errno;
|
||||
|
13
packages/neomutt/jimsh0.c.patch
Normal file
13
packages/neomutt/jimsh0.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/autosetup/jimsh0.c b/autosetup/jimsh0.c
|
||||
index 63d459664..e7780ac7e 100644
|
||||
--- a/autosetup/jimsh0.c
|
||||
+++ b/autosetup/jimsh0.c
|
||||
@@ -21931,7 +21931,7 @@ int Jim_MakeTempFile(Jim_Interp *interp, const char *filename_template, int unli
|
||||
if (filename_template == NULL) {
|
||||
const char *tmpdir = getenv("TMPDIR");
|
||||
if (tmpdir == NULL || *tmpdir == '\0' || access(tmpdir, W_OK) != 0) {
|
||||
- tmpdir = "/tmp/";
|
||||
+ tmpdir = "@TERMUX_PREFIX@/tmp/";
|
||||
}
|
||||
filenameObj = Jim_NewStringObj(interp, tmpdir, -1);
|
||||
if (tmpdir[0] && tmpdir[strlen(tmpdir) - 1] != '/') {
|
13
packages/neomutt/mutt_config.c.patch
Normal file
13
packages/neomutt/mutt_config.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/mutt_config.c b/mutt_config.c
|
||||
index 2ae78194a..e41cd8787 100644
|
||||
--- a/mutt_config.c
|
||||
+++ b/mutt_config.c
|
||||
@@ -702,7 +702,7 @@ struct ConfigDef MainVars[] = {
|
||||
{ "timeout", DT_NUMBER|DT_NOT_NEGATIVE, &C_Timeout, 600, 0, NULL,
|
||||
"Time to wait for user input in menus"
|
||||
},
|
||||
- { "tmpdir", DT_PATH|DT_PATH_DIR|DT_NOT_EMPTY, &C_Tmpdir, IP "/tmp", 0, NULL,
|
||||
+ { "tmpdir", DT_PATH|DT_PATH_DIR|DT_NOT_EMPTY, &C_Tmpdir, IP "@TERMUX_PREFIX@/tmp", 0, NULL,
|
||||
"Directory for temporary files"
|
||||
},
|
||||
{ "toggle_quoted_show_levels", DT_NUMBER|DT_NOT_NEGATIVE, &C_ToggleQuotedShowLevels, 0, 0, NULL,
|
13
packages/neomutt/mutt_file_mkstemp_full.c.patch
Normal file
13
packages/neomutt/mutt_file_mkstemp_full.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/test/file/mutt_file_mkstemp_full.c b/test/file/mutt_file_mkstemp_full.c
|
||||
index 49d863d66..b87cf2037 100644
|
||||
--- a/test/file/mutt_file_mkstemp_full.c
|
||||
+++ b/test/file/mutt_file_mkstemp_full.c
|
||||
@@ -29,7 +29,7 @@ void test_mutt_file_mkstemp_full(void)
|
||||
{
|
||||
// FILE *mutt_file_mkstemp_full(const char *file, int line, const char *func);
|
||||
|
||||
- C_Tmpdir = "/tmp";
|
||||
+ C_Tmpdir = "@TERMUX_PREFIX@/tmp";
|
||||
|
||||
{
|
||||
FILE *fp = NULL;
|
15
packages/neomutt/muttlib.c.patch
Normal file
15
packages/neomutt/muttlib.c.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/muttlib.c b/muttlib.c
|
||||
index 69d71c4b1..d9d44205c 100644
|
||||
--- a/muttlib.c
|
||||
+++ b/muttlib.c
|
||||
@@ -361,6 +361,10 @@ char *mutt_expand_path_regex(char *buf, size_t buflen, bool regex)
|
||||
*/
|
||||
char *mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw)
|
||||
{
|
||||
+#ifdef __ANDROID__
|
||||
+ return NULL;
|
||||
+#endif
|
||||
+
|
||||
regmatch_t pat_match[1];
|
||||
size_t pwnl;
|
||||
char *p = NULL;
|
13
packages/neomutt/smime_keys.patch
Normal file
13
packages/neomutt/smime_keys.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/contrib/smime_keys b/contrib/smime_keys
|
||||
index 08e5cde71..f33066f70 100755
|
||||
--- a/contrib/smime_keys
|
||||
+++ b/contrib/smime_keys
|
||||
@@ -77,7 +77,7 @@ sub handle_add_root_cert ($);
|
||||
|
||||
|
||||
my $neomutt = $ENV{MUTT_CMDLINE} || 'neomutt';
|
||||
-my $opensslbin = "/usr/bin/openssl";
|
||||
+my $opensslbin = "@TERMUX_PREFIX@/bin/openssl";
|
||||
my $tmpdir;
|
||||
|
||||
# Get the directories neomutt uses for certificate/key storage.
|
Loading…
Reference in New Issue
Block a user