[arch-commits] Commit in mc/repos/community-x86_64 (3 files)
Alad Wenter
alad at archlinux.org
Sat Mar 2 16:37:05 UTC 2019
Date: Saturday, March 2, 2019 @ 16:37:05
Author: alad
Revision: 437400
archrelease: copy trunk to community-x86_64
Added:
mc/repos/community-x86_64/PKGBUILD
(from rev 437399, mc/trunk/PKGBUILD)
mc/repos/community-x86_64/mc-mksh-subshell-v2.patch
(from rev 437399, mc/trunk/mc-mksh-subshell-v2.patch)
Deleted:
mc/repos/community-x86_64/PKGBUILD
---------------------------+
PKGBUILD | 128 +++++++++++++++++++++++---------------------
mc-mksh-subshell-v2.patch | 74 +++++++++++++++++++++++++
2 files changed, 142 insertions(+), 60 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-03-02 16:36:45 UTC (rev 437399)
+++ PKGBUILD 2019-03-02 16:37:05 UTC (rev 437400)
@@ -1,60 +0,0 @@
-# Maintainer: schuay <jakob.gruber at gmail.com>
-# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
-
-pkgname=mc
-pkgver=4.8.22
-pkgrel=1
-pkgdesc="Midnight Commander is a text based filemanager/shell that emulates Norton Commander"
-arch=('x86_64')
-url="http://www.ibiblio.org/mc/"
-license=('GPL')
-depends=('e2fsprogs' 'glib2' 'gpm' 'libssh2' 'slang')
-makedepends=('libxt' 'libx11' 'unzip')
-optdepends=('aspell: spelling corrections'
- 'cabextract: ucab extfs'
- 'cdparanoia: audio extfs'
- 'cdrkit: iso9660 extfs'
- 'cvs: CVS support'
- 'gawk: hp48+ extfs'
- 'mtools: a+ extfs'
- 'p7zip: support for 7zip archives'
- 'perl: needed by several extfs scripts'
- 'python2-boto: s3+ extfs'
- 'python2-pytz: s3+ extfs'
- 'samba: VFS support'
- 'unace: uace extfs'
- 'unarj: uarj extfs'
- 'unrar: urar extfs'
- 'zip: uzip extfs')
-backup=('etc/mc/edit.indent.rc'
- 'etc/mc/filehighlight.ini'
- 'etc/mc/mc.ext'
- 'etc/mc/mc.keymap'
- 'etc/mc/mc.menu'
- 'etc/mc/mcedit.menu'
- 'etc/mc/sfs.ini')
-options=('!emptydirs')
-source=("http://ftp.midnight-commander.org/${pkgname}-${pkgver}.tar.xz")
-sha256sums=('ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318')
-
-build() {
- export PYTHON=/usr/bin/python2
-
- cd ${pkgname}-${pkgver}
- ./configure \
- --prefix=/usr \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --enable-vfs-smb \
- --with-screen=slang \
- --with-x
- make
-}
-
-package() {
- cd ${pkgname}-${pkgver}
- make DESTDIR="${pkgdir}" install
-
- # Replace mc.keymap symlink with target file to fix backup mechanism (FS#50889).
- rm "${pkgdir}"/etc/mc/mc.keymap && cp "${pkgdir}"/etc/mc/mc{.default,}.keymap
-}
Copied: mc/repos/community-x86_64/PKGBUILD (from rev 437399, mc/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-03-02 16:37:05 UTC (rev 437400)
@@ -0,0 +1,68 @@
+# Maintainer: Alad Wenter <alad at archlinux.org>
+# Maintainer: schuay <jakob.gruber at gmail.com>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=mc
+pkgver=4.8.22
+pkgrel=2
+pkgdesc="A file manager that emulates Norton Commander"
+arch=('x86_64')
+url="https://midnight-commander.org/"
+license=('GPL')
+depends=('e2fsprogs' 'glib2' 'gpm' 'libssh2' 'slang')
+makedepends=('libxt' 'libx11' 'unzip')
+optdepends=('aspell: spelling corrections'
+ 'cabextract: ucab extfs'
+ 'cdparanoia: audio extfs'
+ 'cdrkit: iso9660 extfs'
+ 'cvs: CVS support'
+ 'gawk: hp48+ extfs'
+ 'mtools: a+ extfs'
+ 'p7zip: support for 7zip archives'
+ 'perl: needed by several extfs scripts'
+ 'python2-boto: s3+ extfs'
+ 'python2-pytz: s3+ extfs'
+ 'samba: VFS support'
+ 'unace: uace extfs'
+ 'unarj: uarj extfs'
+ 'unrar: urar extfs'
+ 'zip: uzip extfs')
+backup=('etc/mc/edit.indent.rc'
+ 'etc/mc/filehighlight.ini'
+ 'etc/mc/mc.ext'
+ 'etc/mc/mc.keymap'
+ 'etc/mc/mc.menu'
+ 'etc/mc/mcedit.menu'
+ 'etc/mc/sfs.ini')
+options=('!emptydirs')
+source=("http://ftp.midnight-commander.org/${pkgname}-${pkgver}.tar.xz"
+ "mc-mksh-subshell-v2.patch")
+sha256sums=('ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318'
+ '5147afa3f9dfc00d8b7b36bbb144bcdb78d86301a0f8196686262a9eee41fb96')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -p1 < "$srcdir"/mc-mksh-subshell-v2.patch
+}
+
+build() {
+ export PYTHON=/usr/bin/python2
+
+ cd ${pkgname}-${pkgver}
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --enable-vfs-smb \
+ --with-screen=slang \
+ --with-x
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+
+ # Replace mc.keymap symlink with target file to fix backup mechanism (FS#50889).
+ rm "${pkgdir}"/etc/mc/mc.keymap && cp "${pkgdir}"/etc/mc/mc{.default,}.keymap
+}
Copied: mc/repos/community-x86_64/mc-mksh-subshell-v2.patch (from rev 437399, mc/trunk/mc-mksh-subshell-v2.patch)
===================================================================
--- mc-mksh-subshell-v2.patch (rev 0)
+++ mc-mksh-subshell-v2.patch 2019-03-02 16:37:05 UTC (rev 437400)
@@ -0,0 +1,74 @@
+# Support mksh for mc subshell
+# https://midnight-commander.org/ticket/3748
+diff -Naur mc-4.8.18.orig/lib/shell.c mc-4.8.18/lib/shell.c
+--- mc-4.8.18.orig/lib/shell.c 2016-09-22 18:24:12.000000000 +0000
++++ mc-4.8.18/lib/shell.c 2017-02-16 13:47:34.933939000 +0000
+@@ -66,6 +66,8 @@
+ /* 3rd choice: look for existing shells supported as MC subshells. */
+ if (access ("/bin/bash", X_OK) == 0)
+ mc_shell->path = g_strdup ("/bin/bash");
++ 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/dash", X_OK) == 0)
+@@ -149,6 +153,12 @@
+ mc_shell->type = SHELL_ZSH;
+ mc_shell->name = "zsh";
+ }
++ else if (strstr (mc_shell->path, "/mksh") != NULL
++ || strstr (mc_shell->real_path, "/mksh") != NULL)
++ {
++ mc_shell->type = SHELL_MKSH;
++ mc_shell->name = "mksh";
++ }
+ 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
+--- mc-4.8.18.orig/lib/shell.h 2016-03-12 15:45:47.000000000 +0000
++++ mc-4.8.18/lib/shell.h 2017-02-15 21:57:39.000000000 +0000
+@@ -12,6 +12,7 @@
+ typedef enum
+ {
+ SHELL_NONE,
++ SHELL_MKSH,
+ SHELL_SH,
+ 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
+--- mc-4.8.18.orig/src/subshell/common.c 2016-09-22 18:24:12.000000000 +0000
++++ mc-4.8.18/src/subshell/common.c 2017-02-20 18:48:22.681514000 +0000
+@@ -320,6 +320,12 @@
+
+ break;
+
++ case SHELL_MKSH:
++ init_file = g_strdup (".shrc");
++ putenv_str = g_strconcat ("ENV=", init_file, (char *) NULL);
++ putenv (putenv_str);
++ break;
++
+ /* TODO: Find a way to pass initfile to TCSH, ZSH and FISH */
+ case SHELL_TCSH:
+ case SHELL_ZSH:
+@@ -367,6 +373,7 @@
+
+ case SHELL_ASH_BUSYBOX:
+ case SHELL_DASH:
++ case SHELL_MKSH:
+ 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]);
+ break;
+
++ case SHELL_MKSH:
++ g_snprintf (precmd, buff_size,
++ "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.
More information about the arch-commits
mailing list