Browse Source

mc: Update from 4.8.16 to 4.8.17

android-5
Fredrik Fornwall 9 years ago
parent
commit
f4147b42d9
  1. 3
      packages/mc/build.sh
  2. 35
      packages/mc/fix-small-mode-t.patch
  3. 32
      packages/mc/lib-shell.c.patch
  4. 14
      packages/mc/lib-widget-input_complete.c.patch
  5. 34
      packages/mc/mc-3611-fish-fix-perl-ls-helper.patch

3
packages/mc/build.sh

@ -1,5 +1,4 @@
TERMUX_PKG_VERSION=4.8.16
TERMUX_PKG_BUILD_REVISION=5
TERMUX_PKG_VERSION=4.8.17
TERMUX_PKG_HOMEPAGE=https://www.midnight-commander.org/
TERMUX_PKG_DESCRIPTION="Midnight Commander - a powerful file manager"
TERMUX_PKG_SRCURL="http://ftp.midnight-commander.org/mc-${TERMUX_PKG_VERSION}.tar.xz"

35
packages/mc/fix-small-mode-t.patch

@ -1,35 +0,0 @@
Following compiler warning:
/home/fornwall/termux/mc/src/lib/vfs/interface.c: In function 'mc_open':
/home/fornwall/termux/mc/src/lib/vfs/interface.c:203:28: warning: 'mode_t' is promoted to 'int' when passed through '...'
mode = va_arg (ap, mode_t);
^
/home/fornwall/termux/mc/src/lib/vfs/interface.c:203:28: note: (so you should pass 'int' not 'mode_t' to 'va_arg')
/home/fornwall/termux/mc/src/lib/vfs/interface.c:203:28: note: if this code is reached, the program will abort
which causes crash on arm devices due to mode_t being unsigned int.
diff -u -r ../mc-4.8.16/lib/vfs/interface.c ./lib/vfs/interface.c
--- ../mc-4.8.16/lib/vfs/interface.c 2016-03-12 10:45:47.000000000 -0500
+++ ./lib/vfs/interface.c 2016-03-14 22:03:41.417524612 -0400
@@ -200,7 +200,7 @@
{
va_list ap;
va_start (ap, flags);
- mode = va_arg (ap, mode_t);
+ mode = (mode_t) va_arg (ap, unsigned int);
va_end (ap);
}
diff -u -r ../mc-4.8.16/src/editor/editcmd.c ./src/editor/editcmd.c
--- ../mc-4.8.16/src/editor/editcmd.c 2016-03-12 10:45:47.000000000 -0500
+++ ./src/editor/editcmd.c 2016-03-14 22:03:02.094128021 -0400
@@ -301,7 +301,7 @@
(void) mc_chown (savename_vpath, edit->stat1.st_uid, edit->stat1.st_gid);
(void) mc_chmod (savename_vpath, edit->stat1.st_mode);
- fd = mc_open (savename_vpath, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, edit->stat1.st_mode);
+ fd = mc_open (savename_vpath, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, (unsigned int) edit->stat1.st_mode);
if (fd == -1)
goto error_save;

32
packages/mc/lib-shell.c.patch

@ -1,30 +1,36 @@
diff -u -r ../mc-4.8.16/lib/shell.c ./lib/shell.c
--- ../mc-4.8.16/lib/shell.c 2016-03-12 10:45:47.000000000 -0500
+++ ./lib/shell.c 2016-03-14 20:31:50.981985797 -0400
@@ -64,18 +64,14 @@
diff -u -r ../mc-4.8.17/lib/shell.c ./lib/shell.c
--- ../mc-4.8.17/lib/shell.c 2016-05-07 11:42:52.000000000 -0400
+++ ./lib/shell.c 2016-05-21 17:00:02.116441571 -0400
@@ -64,20 +64,14 @@
mc_shell = g_new0 (mc_shell_t, 1);
/* 3rd choice: look for existing shells supported as MC subshells. */
- if (access ("/bin/bash", X_OK) == 0)
+ if (access ("@TERMUX_PREFIX@/bin/bash", X_OK) == 0)
mc_shell->path = g_strdup ("/bin/bash");
- mc_shell->path = g_strdup ("/bin/bash");
- else if (access ("/bin/ash", X_OK) == 0)
+ else if (access ("@TERMUX_PREFIX@/bin/applets/ash", X_OK) == 0)
mc_shell->path = g_strdup ("/bin/ash");
- mc_shell->path = g_strdup ("/bin/ash");
- else if (access ("/bin/dash", X_OK) == 0)
+ else if (access ("@TERMUX_PREFIX@/bin/dash", X_OK) == 0)
mc_shell->path = g_strdup ("/bin/dash");
- mc_shell->path = g_strdup ("/bin/dash");
- else if (access ("/bin/busybox", X_OK) == 0)
- mc_shell->path = g_strdup ("/bin/busybox");
- else if (access ("/bin/zsh", X_OK) == 0)
+ else if (access ("@TERMUX_PREFIX/bin/zsh", X_OK) == 0)
mc_shell->path = g_strdup ("/bin/zsh");
- mc_shell->path = g_strdup ("/bin/zsh");
- else if (access ("/bin/tcsh", X_OK) == 0)
- mc_shell->path = g_strdup ("/bin/tcsh");
- else if (access ("/bin/csh", X_OK) == 0)
- mc_shell->path = g_strdup ("/bin/csh");
+ if (access ("@TERMUX_PREFIX@/bin/bash", X_OK) == 0)
+ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/bash");
+ else if (access ("@TERMUX_PREFIX@/bin/ash", X_OK) == 0)
+ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/ash");
+ else if (access ("@TERMUX_PREFIX@/bin/dash", X_OK) == 0)
+ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/dash");
+ else if (access ("@TERMUX_PREFIX@/bin/zsh", X_OK) == 0)
+ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/zsh");
/* No fish as fallback because it is so much different from other shells and
* in a way exotic (even though user-friendly by name) that we should not
* present it as a subshell without the user's explicit intention. We rather
@@ -85,7 +81,7 @@
@@ -87,7 +81,7 @@
*/
else
/* Fallback and last resort: system default shell */

14
packages/mc/lib-widget-input_complete.c.patch

@ -1,15 +1,15 @@
diff -u -r ../mc-4.8.15/lib/widget/input_complete.c ./lib/widget/input_complete.c
--- ../mc-4.8.15/lib/widget/input_complete.c 2015-11-06 04:11:08.000000000 -0500
+++ ./lib/widget/input_complete.c 2015-11-20 17:59:04.834778588 -0500
@@ -306,6 +306,7 @@
diff -u -r ../mc-4.8.17/lib/widget/input_complete.c ./lib/widget/input_complete.c
--- ../mc-4.8.17/lib/widget/input_complete.c 2016-05-07 11:42:52.000000000 -0400
+++ ./lib/widget/input_complete.c 2016-05-21 17:03:05.409602557 -0400
@@ -313,6 +313,7 @@
static char *
username_completion_function (const char *text, int state, input_complete_t flags)
{
+#ifndef __ANDROID__
static struct passwd *entry;
static size_t userlen;
static struct passwd *entry = NULL;
static size_t userlen = 0;
@@ -332,6 +333,7 @@
@@ -340,6 +341,7 @@
return g_strconcat ("~", entry->pw_name, PATH_SEP_STR, (char *) NULL);
endpwent ();

34
packages/mc/mc-3611-fish-fix-perl-ls-helper.patch

@ -1,34 +0,0 @@
From e274e58cb7dff1683480f5538fd1bfa41a85c0c7 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sun, 13 Mar 2016 20:59:47 +0000
Subject: [PATCH] Fish: fix perl ls helper
With #3599 I introduce a perl warning in fish_list_perl()
so fish_list_perl() was skipped (return code 255) and fallback ls
function was used instead.
Plus all % chars must quoted because of g_strconcat() after reading
script file into string.
Fix it!
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/vfs/fish/helpers/ls | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vfs/fish/helpers/ls b/src/vfs/fish/helpers/ls
index 1284e17..909a77d 100755
--- a/src/vfs/fish/helpers/ls
+++ b/src/vfs/fish/helpers/ls
@@ -138,8 +138,8 @@ while((my $filename = readdir (DIR))){
my $linkname = readlink ("$dirname/$filename");
$linkname =~ $strutils_shell_escape_regex;
printf("R%%o %%o $uid.$gid\nS$size\nd$mloctime\n:\"%%s\" -> \"%%s\"\n\n", S_IMODE($mode), S_IFMT($mode), $e_filename, $linkname);
- } elseif (S_ISCHR ($mode) || S_ISBLK ($mode)) {
- my $minor = $rdev % 256;
+ } elsif (S_ISCHR ($mode) || S_ISBLK ($mode)) {
+ my $minor = $rdev %% 256;
my $major = int( $rdev / 256 );
printf("R%%o %%o $uid.$gid\nE$major,$minor\nd$mloctime\n:\"%%s\"\n\n", S_IMODE($mode), S_IFMT($mode), $e_filename);
} else {
Loading…
Cancel
Save