From b07363339554d68229c21404464b18413c3bd9e8 Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Sun, 26 Dec 2021 00:07:38 +0100 Subject: [PATCH] mc: update to 4.8.27. --- srcpkgs/mc/patches/mc-mksh-subshell-v2.patch | 64 +++++++++----------- srcpkgs/mc/template | 4 +- 2 files changed, 31 insertions(+), 37 deletions(-) diff --git a/srcpkgs/mc/patches/mc-mksh-subshell-v2.patch b/srcpkgs/mc/patches/mc-mksh-subshell-v2.patch index 76c8470804aa07..183542dcd7eb2b 100644 --- a/srcpkgs/mc/patches/mc-mksh-subshell-v2.patch +++ b/srcpkgs/mc/patches/mc-mksh-subshell-v2.patch @@ -1,17 +1,15 @@ ---- a/lib/shell.c 2016-09-22 18:24:12.000000000 +0000 -+++ b/lib/shell.c 2017-02-16 13:47:34.933939000 +0000 -@@ -66,6 +66,10 @@ - /* 3rd choice: look for existing shells supported as MC subshells. */ - if (access ("/bin/bash", X_OK) == 0) +--- a/lib/shell.c ++++ b/lib/shell.c +@@ -68,6 +68,8 @@ mc_shell_get_installed_in_system (void) mc_shell->path = g_strdup ("/bin/bash"); -+ else if (access ("/usr/local/bin/mksh", X_OK) == 0) -+ mc_shell->path = g_strdup ("/usr/local/bin/mksh"); -+ else if (access ("/bin/mksh", X_OK) == 0) -+ mc_shell->path = g_strdup ("/bin/mksh"); else if (access ("/bin/ash", X_OK) == 0) mc_shell->path = g_strdup ("/bin/ash"); ++ else if (access ("/bin/mksh", X_OK) == 0) ++ mc_shell->path = g_strdup ("/bin/mksh"); else if (access ("/bin/dash", X_OK) == 0) -@@ -149,6 +153,12 @@ + mc_shell->path = g_strdup ("/bin/dash"); + else if (access ("/bin/busybox", X_OK) == 0) +@@ -149,6 +151,12 @@ mc_shell_recognize_real_path (mc_shell_t * mc_shell) mc_shell->type = SHELL_ZSH; mc_shell->name = "zsh"; } @@ -24,34 +22,31 @@ else if (strstr (mc_shell->path, "/tcsh") != NULL || strstr (mc_shell->real_path, "/tcsh") != NULL) { -diff -Naur mc-4.8.18.orig/lib/shell.h mc-4.8.18/lib/shell.h ---- a/lib/shell.h 2016-03-12 15:45:47.000000000 +0000 -+++ b/lib/shell.h 2017-02-15 21:57:39.000000000 +0000 -@@ -12,6 +12,7 @@ - typedef enum - { - SHELL_NONE, -+ SHELL_MKSH, - SHELL_SH, +--- a/lib/shell.h ++++ b/lib/shell.h +@@ -16,6 +16,7 @@ typedef enum SHELL_BASH, SHELL_ASH_BUSYBOX, /* BusyBox default shell (ash) */ -diff -Naur mc-4.8.18.orig/src/subshell/common.c mc-4.8.18/src/subshell/common.c ---- a/src/subshell/common.c 2016-09-22 18:24:12.000000000 +0000 -+++ b/src/subshell/common.c 2017-02-20 18:48:22.681514000 +0000 -@@ -320,6 +320,12 @@ - + SHELL_DASH, /* Debian variant of ash */ ++ SHELL_MKSH, + SHELL_TCSH, + SHELL_ZSH, + SHELL_FISH +--- a/src/subshell/common.c ++++ b/src/subshell/common.c +@@ -378,6 +378,11 @@ init_subshell_child (const char *pty_name) + } break; + case SHELL_MKSH: + init_file = g_strdup (".shrc"); -+ putenv_str = g_strconcat ("ENV=", init_file, (char *) NULL); -+ putenv (putenv_str); ++ g_setenv ("ENV", init_file, TRUE); + break; + - /* TODO: Find a way to pass initfile to TCSH, ZSH and FISH */ + /* TODO: Find a way to pass initfile to TCSH and FISH */ case SHELL_TCSH: - case SHELL_ZSH: -@@ -367,6 +373,7 @@ + case SHELL_FISH: +@@ -427,6 +432,7 @@ init_subshell_child (const char *pty_name) case SHELL_ASH_BUSYBOX: case SHELL_DASH: @@ -59,15 +54,14 @@ diff -Naur mc-4.8.18.orig/src/subshell/common.c mc-4.8.18/src/subshell/common.c case SHELL_TCSH: case SHELL_FISH: execl (mc_global.shell->path, mc_global.shell->path, (char *) NULL); -@@ -801,6 +808,11 @@ - "PS1='\\u@\\h:\\w\\$ '\n", subshell_pipe[WRITE]); +@@ -1091,6 +1097,10 @@ init_subshell_precmd (char *precmd, size_t buff_size) + "PS1='\\u@\\h:\\w\\$ '\n", command_buffer_pipe[WRITE], + command_buffer_pipe[WRITE], subshell_pipe[WRITE]); break; - + case SHELL_MKSH: + g_snprintf (precmd, buff_size, -+ "PS1='$(pwd>&%d; kill -STOP $$)'\"$((( USER_ID )) && print '$ ' || print '# ')\"\n", subshell_pipe[WRITE]); ++ "PS1='$(pwd>&%d; kill -STOP $$)'\"$((( USER_ID )) && print '$ ' || print '# ')\"\n", subshell_pipe[WRITE]); + break; -+ + case SHELL_ASH_BUSYBOX: /* BusyBox ash needs a somewhat complicated precmd emulation via PS1, and it is vital - * that BB be built with active CONFIG_ASH_EXPAND_PRMT, but this is the default anyway. diff --git a/srcpkgs/mc/template b/srcpkgs/mc/template index ebf5141eb48209..5360fd9e89ec4d 100644 --- a/srcpkgs/mc/template +++ b/srcpkgs/mc/template @@ -1,6 +1,6 @@ # Template file for 'mc' pkgname=mc -version=4.8.26 +version=4.8.27 revision=1 build_style=gnu-configure configure_args="--with-screen=slang --without-x" @@ -12,7 +12,7 @@ license="GPL-3.0-or-later" homepage="https://midnight-commander.org/" distfiles="https://www.midnight-commander.org/downloads/mc-${version}.tar.xz" #distfiles="http://fossies.org/linux/misc/mc-${version}.tar.gz" -checksum=c6deadc50595f2d9a22dc6c299a9f28b393e358346ebf6ca444a8469dc166c27 +checksum=31be59225ffa9920816e9a8b3be0ab225a16d19e4faf46890f25bdffa02a4ff4 python_version=2 conf_files="