mc: Update from 4.8.15 to 4.8.16
authorFredrik Fornwall <fredrik@fornwall.net>
Tue, 15 Mar 2016 01:06:35 +0000 (21:06 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 15 Mar 2016 01:06:35 +0000 (21:06 -0400)
packages/mc/build.sh
packages/mc/filemanager_usermenu.c.patch
packages/mc/lib-shell.c.patch [new file with mode: 0644]
packages/mc/main.c.patch [deleted file]
packages/mc/src-vfs-sfs-sfs.c.patch [new file with mode: 0644]

index 04ccc8f..06322f5 100755 (executable)
@@ -1,5 +1,4 @@
-TERMUX_PKG_VERSION=4.8.15
-TERMUX_PKG_BUILD_REVISION=1
+TERMUX_PKG_VERSION=4.8.16
 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"
index 41194d3..c7705af 100644 (file)
@@ -1,7 +1,7 @@
-diff -u -r ../mc-4.8.12/src/filemanager/usermenu.c ./src/filemanager/usermenu.c
---- ../mc-4.8.12/src/filemanager/usermenu.c    2014-04-01 12:54:01.000000000 +0200
-+++ ./src/filemanager/usermenu.c       2014-06-05 16:27:09.221997381 +0200
-@@ -453,7 +453,7 @@
+diff -u -r ../mc-4.8.16/src/filemanager/usermenu.c ./src/filemanager/usermenu.c
+--- ../mc-4.8.16/src/filemanager/usermenu.c    2016-03-12 10:45:48.000000000 -0500
++++ ./src/filemanager/usermenu.c       2016-03-14 20:34:12.523712672 -0400
+@@ -448,7 +448,7 @@
          return;
      }
      cmd_file = fdopen (cmd_file_fd, "w");
@@ -9,4 +9,13 @@ diff -u -r ../mc-4.8.12/src/filemanager/usermenu.c ./src/filemanager/usermenu.c
 +    fputs ("#! @TERMUX_PREFIX@/bin/sh\n", cmd_file);
      commands++;
  
-     for (col = 0; *commands; commands++)
+     for (col = 0; *commands != '\0'; commands++)
+@@ -554,7 +554,7 @@
+          * on no-exec filesystems. */
+         char *cmd;
+-        cmd = g_strconcat ("/bin/sh ", vfs_path_as_str (file_name_vpath), (char *) NULL);
++        cmd = g_strconcat ("@TERMUX_PREFIX@/bin/sh ", vfs_path_as_str (file_name_vpath), (char *) NULL);
+         if (!show_prompt)
+         {
+             if (system (cmd) == -1)
diff --git a/packages/mc/lib-shell.c.patch b/packages/mc/lib-shell.c.patch
new file mode 100644 (file)
index 0000000..4fa2a4d
--- /dev/null
@@ -0,0 +1,35 @@
+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 @@
+     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");
+-    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");
+-    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");
+-    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");
+-    else if (access ("/bin/tcsh", X_OK) == 0)
+-        mc_shell->path = g_strdup ("/bin/tcsh");
+     /* 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 @@
+      */
+     else
+         /* Fallback and last resort: system default shell */
+-        mc_shell->path = g_strdup ("/bin/sh");
++        mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/sh");
+     return mc_shell;
+ }
diff --git a/packages/mc/main.c.patch b/packages/mc/main.c.patch
deleted file mode 100644 (file)
index 1451f7d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -u -r ../mc-4.8.12/src/main.c ./src/main.c
---- ../mc-4.8.12/src/main.c    2014-04-01 12:54:01.000000000 +0200
-+++ ./src/main.c       2014-06-05 16:29:02.609994281 +0200
-@@ -140,7 +140,7 @@
-     if ((mc_global.tty.shell == NULL) || (mc_global.tty.shell[0] == '\0'))
-     {
-         g_free (mc_global.tty.shell);
--        mc_global.tty.shell = g_strdup ("/bin/sh");
-+        mc_global.tty.shell = g_strdup ("@TERMUX_PREFIX@/bin/sh");
-     }
-     /* This is the directory, where MC was installed, on Unix this is DATADIR */
diff --git a/packages/mc/src-vfs-sfs-sfs.c.patch b/packages/mc/src-vfs-sfs-sfs.c.patch
new file mode 100644 (file)
index 0000000..0121b6a
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../mc-4.8.16/src/vfs/sfs/sfs.c ./src/vfs/sfs/sfs.c
+--- ../mc-4.8.16/src/vfs/sfs/sfs.c     2016-03-12 10:45:48.000000000 -0500
++++ ./src/vfs/sfs/sfs.c        2016-03-14 20:36:48.293235351 -0400
+@@ -206,7 +206,7 @@
+     g_free (pqname);
+     open_error_pipe ();
+-    if (my_system (EXECUTE_AS_SHELL, "/bin/sh", pad))
++    if (my_system (EXECUTE_AS_SHELL, "@TERMUX_PREFIX@/bin/sh", pad))
+     {
+         close_error_pipe (D_ERROR, NULL);
+         return -1;