Browse Source

mc: Update from 4.8.14 to 4.8.15

android-5
Fredrik Fornwall 9 years ago
parent
commit
be47d1afce
  1. 2
      packages/mc/build.sh
  2. 19
      packages/mc/lib-widget-input_complete.c.patch
  3. 80
      packages/mc/no_pwent_or_grent.patch
  4. 29
      packages/mc/src-filemanager-achown.c.patch
  5. 29
      packages/mc/src-filemanager-chown.c.patch

2
packages/mc/build.sh

@ -1,4 +1,4 @@
TERMUX_PKG_VERSION=4.8.14
TERMUX_PKG_VERSION=4.8.15
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"

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

@ -0,0 +1,19 @@
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 @@
static char *
username_completion_function (const char *text, int state, input_complete_t flags)
{
+#ifndef __ANDROID__
static struct passwd *entry;
static size_t userlen;
@@ -332,6 +333,7 @@
return g_strconcat ("~", entry->pw_name, PATH_SEP_STR, (char *) NULL);
endpwent ();
+#endif
return NULL;
}

80
packages/mc/no_pwent_or_grent.patch

@ -1,80 +0,0 @@
diff -u -r ../mc-4.8.11/lib/widget/input_complete.c ./lib/widget/input_complete.c
--- ../mc-4.8.11/lib/widget/input_complete.c 2013-11-29 19:27:07.000000000 +0100
+++ ./lib/widget/input_complete.c 2014-02-07 02:18:17.000000000 +0100
@@ -320,9 +320,12 @@
text++;
if (state == 0)
{ /* Initialization stuff */
+#ifndef __ANDROID__
setpwent ();
+#endif
userlen = strlen (text + 1);
}
+#ifndef __ANDROID__
while ((entry = getpwent ()) != NULL)
{
/* Null usernames should result in all users as possible completions. */
@@ -331,6 +334,7 @@
if (text[1] == entry->pw_name[0] && !strncmp (text + 1, entry->pw_name, userlen))
break;
}
+#endif
if (entry != NULL)
return g_strconcat ("~", entry->pw_name, PATH_SEP_STR, (char *) NULL);
diff -u -r ../mc-4.8.11/src/filemanager/achown.c ./src/filemanager/achown.c
--- ../mc-4.8.11/src/filemanager/achown.c 2013-11-29 19:27:07.000000000 +0100
+++ ./src/filemanager/achown.c 2014-02-07 02:17:29.000000000 +0100
@@ -346,19 +346,23 @@
if (is_owner)
{
/* get and put user names in the listbox */
+#ifndef __ANDROID__
setpwent ();
while ((chl_pass = getpwent ()) != NULL)
listbox_add_item (chl_list, LISTBOX_APPEND_SORTED, 0, chl_pass->pw_name, NULL);
endpwent ();
+#endif
fe = listbox_search_text (chl_list, get_owner (sf_stat->st_uid));
}
else
{
/* get and put group names in the listbox */
+#ifndef __ANDROID__
setgrent ();
while ((chl_grp = getgrent ()) != NULL)
listbox_add_item (chl_list, LISTBOX_APPEND_SORTED, 0, chl_grp->gr_name, NULL);
endgrent ();
+#endif
fe = listbox_search_text (chl_list, get_group (sf_stat->st_gid));
}
diff -u -r ../mc-4.8.11/src/filemanager/chown.c ./src/filemanager/chown.c
--- ../mc-4.8.11/src/filemanager/chown.c 2013-11-29 19:27:07.000000000 +0100
+++ ./src/filemanager/chown.c 2014-02-07 02:17:11.000000000 +0100
@@ -221,10 +221,12 @@
/* add field for unknown names (numbers) */
listbox_add_item (l_user, LISTBOX_APPEND_AT_END, 0, _("<Unknown user>"), NULL);
/* get and put user names in the listbox */
+#ifndef __ANDROID__
setpwent ();
while ((l_pass = getpwent ()) != NULL)
listbox_add_item (l_user, LISTBOX_APPEND_SORTED, 0, l_pass->pw_name, NULL);
endpwent ();
+#endif
add_widget (ch_dlg, groupbox_new (2, 4 + GW, GH, GW, _("Group name")));
l_group = listbox_new (3, 5 + GW, GH - 2, GW - 2, FALSE, NULL);
@@ -232,10 +234,12 @@
/* add field for unknown names (numbers) */
listbox_add_item (l_group, LISTBOX_APPEND_AT_END, 0, _("<Unknown group>"), NULL);
/* get and put group names in the listbox */
+#ifndef __ANDROID__
setgrent ();
while ((l_grp = getgrent ()) != NULL)
listbox_add_item (l_group, LISTBOX_APPEND_SORTED, 0, l_grp->gr_name, NULL);
endgrent ();
+#endif
add_widget (ch_dlg, groupbox_new (2, 5 + GW * 2, GH, GW, _("File")));
/* add widgets for the file information */

29
packages/mc/src-filemanager-achown.c.patch

@ -0,0 +1,29 @@
diff -u -r ../mc-4.8.15/src/filemanager/achown.c ./src/filemanager/achown.c
--- ../mc-4.8.15/src/filemanager/achown.c 2015-11-06 04:11:09.000000000 -0500
+++ ./src/filemanager/achown.c 2015-11-20 18:00:58.613280615 -0500
@@ -347,21 +347,25 @@
if (is_owner)
{
/* get and put user names in the listbox */
+#ifndef __ANDROID__
setpwent ();
while ((chl_pass = getpwent ()) != NULL)
listbox_add_item (chl_list, LISTBOX_APPEND_SORTED, 0, chl_pass->pw_name, NULL,
FALSE);
+#endif
endpwent ();
fe = listbox_search_text (chl_list, get_owner (sf_stat->st_uid));
}
else
{
/* get and put group names in the listbox */
+#ifndef __ANDROID__
setgrent ();
while ((chl_grp = getgrent ()) != NULL)
listbox_add_item (chl_list, LISTBOX_APPEND_SORTED, 0, chl_grp->gr_name, NULL,
FALSE);
endgrent ();
+#endif
fe = listbox_search_text (chl_list, get_group (sf_stat->st_gid));
}

29
packages/mc/src-filemanager-chown.c.patch

@ -0,0 +1,29 @@
diff -u -r ../mc-4.8.15/src/filemanager/chown.c ./src/filemanager/chown.c
--- ../mc-4.8.15/src/filemanager/chown.c 2015-11-06 04:11:09.000000000 -0500
+++ ./src/filemanager/chown.c 2015-11-20 18:01:45.372666628 -0500
@@ -220,10 +220,12 @@
/* add field for unknown names (numbers) */
listbox_add_item (l_user, LISTBOX_APPEND_AT_END, 0, _("<Unknown user>"), NULL, FALSE);
/* get and put user names in the listbox */
+#ifndef __ANDROID__
setpwent ();
while ((l_pass = getpwent ()) != NULL)
listbox_add_item (l_user, LISTBOX_APPEND_SORTED, 0, l_pass->pw_name, NULL, FALSE);
endpwent ();
+#endif
add_widget (ch_dlg, groupbox_new (2, 4 + GW, GH, GW, _("Group name")));
l_group = listbox_new (3, 5 + GW, GH - 2, GW - 2, FALSE, NULL);
@@ -231,10 +233,12 @@
/* add field for unknown names (numbers) */
listbox_add_item (l_group, LISTBOX_APPEND_AT_END, 0, _("<Unknown group>"), NULL, FALSE);
/* get and put group names in the listbox */
+#ifndef __ANDROID__
setgrent ();
while ((l_grp = getgrent ()) != NULL)
listbox_add_item (l_group, LISTBOX_APPEND_SORTED, 0, l_grp->gr_name, NULL, FALSE);
endgrent ();
+#endif
add_widget (ch_dlg, groupbox_new (2, 5 + GW * 2, GH, GW, _("File")));
/* add widgets for the file information */
Loading…
Cancel
Save