From be47d1afce612a2fd828dc365c09e69d5b790d1a Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 20 Nov 2015 18:04:00 -0500 Subject: [PATCH] mc: Update from 4.8.14 to 4.8.15 --- packages/mc/build.sh | 2 +- packages/mc/lib-widget-input_complete.c.patch | 19 +++++ packages/mc/no_pwent_or_grent.patch | 80 ------------------- packages/mc/src-filemanager-achown.c.patch | 29 +++++++ packages/mc/src-filemanager-chown.c.patch | 29 +++++++ 5 files changed, 78 insertions(+), 81 deletions(-) create mode 100644 packages/mc/lib-widget-input_complete.c.patch delete mode 100644 packages/mc/no_pwent_or_grent.patch create mode 100644 packages/mc/src-filemanager-achown.c.patch create mode 100644 packages/mc/src-filemanager-chown.c.patch diff --git a/packages/mc/build.sh b/packages/mc/build.sh index 34e9b6475..5d1b72e96 100755 --- a/packages/mc/build.sh +++ b/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" diff --git a/packages/mc/lib-widget-input_complete.c.patch b/packages/mc/lib-widget-input_complete.c.patch new file mode 100644 index 000000000..15d2d81b4 --- /dev/null +++ b/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; + } + diff --git a/packages/mc/no_pwent_or_grent.patch b/packages/mc/no_pwent_or_grent.patch deleted file mode 100644 index bc3a54276..000000000 --- a/packages/mc/no_pwent_or_grent.patch +++ /dev/null @@ -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, _(""), 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, _(""), 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 */ diff --git a/packages/mc/src-filemanager-achown.c.patch b/packages/mc/src-filemanager-achown.c.patch new file mode 100644 index 000000000..7ea1b9248 --- /dev/null +++ b/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)); + } + diff --git a/packages/mc/src-filemanager-chown.c.patch b/packages/mc/src-filemanager-chown.c.patch new file mode 100644 index 000000000..7eadc0cab --- /dev/null +++ b/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, _(""), 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, _(""), 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 */