Applied some fixes to midnight commander so that it no longer displays weird characters

svn path=/nixpkgs/trunk/; revision=17207
This commit is contained in:
Sander van der Burg 2009-09-16 17:08:33 +00:00
parent f03f8d0952
commit 3e69dab469
5 changed files with 12766 additions and 11 deletions

View File

@ -1,10 +1,15 @@
{stdenv, fetchurl, pcre, libpng}: {stdenv, fetchurl, ncurses, pcre, libpng, zlib, readline}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "slang-2.0.5"; name = "slang-2.2.1";
src = fetchurl { src = fetchurl {
url = ftp://space.mit.edu/pub/davis/slang/v2.0/slang-2.0.5.tar.bz2; url = ftp://ftp.fu-berlin.de/pub/unix/misc/slang/v2.2/slang-2.2.1.tar.bz2;
md5 = "8b6afa085f76b1be29825f0c470b6cad"; sha256 = "1qgfg6i5lzmw8j9aqd8pgz3vnhn80giij9bpgm5r3gmna2h0rzfj";
}; };
buildInputs = [pcre libpng]; preConfigure = ''
sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" configure
sed -i -e "s|/bin/ln|ln|" src/Makefile.in
'';
configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}";
buildInputs = [ncurses pcre libpng zlib readline];
} }

View File

@ -1,4 +1,4 @@
args: with args; {stdenv, fetchurl, lib, pkgconfig, glib, ncurses, libX11, shebangfix, perl, zip, unzip, gettext, slang}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mc-4.6.1"; name = "mc-4.6.1";
@ -6,8 +6,46 @@ stdenv.mkDerivation rec {
url = "http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/${name}.tar.gz"; url = "http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/${name}.tar.gz";
sha256 = "0zly25mwdn84s0wqx9mzyqi177mm828716nv1n6a4a5cm8yv0sh8"; sha256 = "0zly25mwdn84s0wqx9mzyqi177mm828716nv1n6a4a5cm8yv0sh8";
}; };
buildInputs = [pkgconfig glib ncurses libX11 shebangfix perl zip]; buildInputs = [pkgconfig glib ncurses libX11 shebangfix perl zip unzip slang gettext];
configureFlags = "--with-screen=ncurses"; configureFlags = "--enable-charset";
# Stole some patches from LFS which fix some nasty bugs
patches = [ ./mc-4.6.1-bash32-1.patch ./mc-4.6.1-debian_fixes-1.patch ];
# Required to enable the Debian UTF8 fixes
CPPFLAGS = "-DUTF8";
# The Debian UTF8 patch expects that the documentation is in UTF8 format,
# therefore we have to convert them (I stole this also from LFS)
postBuildPhase = ''
for file in lib/mc.hint{,.es,.it,.nl} doc/{es,it}/mc.hlp.*
do
iconv -f ISO-8859-1 -t UTF-8 $file > $file.utf8 &&
mv $file.utf8 $file
done &&
for file in lib/mc.hint{.cs,.hu,.pl} doc/{hu,pl}/mc.hlp.*
do
iconv -f ISO-8859-2 -t UTF-8 $file > $file.utf8 &&
mv $file.utf8 $file
done &&
for file in lib/mc.hint.sr doc/sr/mc.hlp.sr
do
iconv -f ISO-8859-5 -t UTF-8 $file > $file.utf8 &&
mv $file.utf8 $file
done &&
for file in doc/ru/mc.hlp.ru lib/mc.hint.ru
do
iconv -f KOI8-R -t UTF-8 $file > $file.utf8 &&
mv $file.utf8 $file
done &&
iconv -f KOI8-U -t UTF-8 lib/mc.hint.uk > lib/mc.hint.uk.utf8 &&
mv lib/mc.hint.uk.utf8 lib/mc.hint.uk &&
iconv -f BIG5 -t UTF-8 lib/mc.hint.zh > lib/mc.hint.zh.utf8 &&
mv lib/mc.hint.zh.utf8 lib/mc.hint.zh
'';
makeFlags = "UNZIP=unzip"; makeFlags = "UNZIP=unzip";
postInstall = '' postInstall = ''
find $out -iname "*.pl" | xargs shebangfix; find $out -iname "*.pl" | xargs shebangfix;
@ -15,6 +53,6 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "File Manager and User Shell for the GNU Project"; description = "File Manager and User Shell for the GNU Project";
homepage = http://www.ibiblio.org/mc; homepage = http://www.ibiblio.org/mc;
maintainers = [ lib.maintainers.sander ];
}; };
} }

View File

@ -0,0 +1,41 @@
Submitted By: Alexander E. Patrakov
Date: 2007-01-19
Initial Package Version: 4.6.1
Origin: http://bugs.gentoo.org/show_bug.cgi?id=153925
Upstream Status: aware of the problem
Description: with bash-3.2, unpatched mc-4.6.1 refuses to go into directories
containing underscores or other strange characters.
--- mc-4.6.1/src/subshell.c.000 2006-05-08 23:11:48.000000000 +0200
+++ mc-4.6.1/src/subshell.c 2006-10-28 15:40:46.000000000 +0200
@@ -745,29 +745,13 @@ subshell_name_quote (const char *s)
memcpy (d, cmd_start, len);
d += len;
- /*
- * Print every character in octal format with the leading backslash.
- * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them.
- */
- if (subshell_type == BASH) {
for (; *s; s++) {
- /* Must quote numbers, so that they are not glued to octals */
if (isalpha ((unsigned char) *s)) {
*d++ = (unsigned char) *s;
} else {
- sprintf (d, "\\%03o", (unsigned char) *s);
- d += 4;
- }
- }
- } else {
- for (; *s; s++) {
- if (isalnum ((unsigned char) *s)) {
- *d++ = (unsigned char) *s;
- } else {
sprintf (d, "\\0%03o", (unsigned char) *s);
d += 5;
}
- }
}
memcpy (d, common_end, sizeof (common_end));

File diff suppressed because it is too large Load Diff

View File

@ -1012,7 +1012,7 @@ let
}; };
mc = import ../tools/misc/mc { mc = import ../tools/misc/mc {
inherit fetchurl stdenv pkgconfig ncurses shebangfix perl zip; inherit fetchurl stdenv lib pkgconfig ncurses shebangfix perl zip unzip slang gettext;
inherit (gtkLibs) glib; inherit (gtkLibs) glib;
inherit (xlibs) libX11; inherit (xlibs) libX11;
}; };
@ -4143,7 +4143,7 @@ let
}; };
slang = import ../development/libraries/slang { slang = import ../development/libraries/slang {
inherit fetchurl stdenv pcre libpng; inherit fetchurl stdenv ncurses pcre libpng zlib readline;
}; };
snack = import ../development/libraries/snack { snack = import ../development/libraries/snack {