depend on external slang

This commit is contained in:
Jindrich Novy 2005-12-01 12:32:45 +00:00
parent a32ae47ba1
commit 59587e5c76
2 changed files with 31 additions and 21 deletions

View File

@ -1,5 +1,5 @@
--- mc-4.6.1a/src/main.c.laf 2005-11-13 17:08:54.000000000 +0100
+++ mc-4.6.1a/src/main.c 2005-11-14 15:08:43.000000000 +0100
--- mc-4.6.1a/src/main.c.laf 2005-11-24 16:55:06.000000000 +0100
+++ mc-4.6.1a/src/main.c 2005-11-24 16:56:27.000000000 +0100
@@ -270,6 +270,9 @@ int midnight_shutdown = 0;
/* The user's shell */
const char *shell = NULL;
@ -10,13 +10,16 @@
/* The xterm title */
char *xterm_title_str = NULL;
@@ -2167,6 +2170,13 @@ main (int argc, char *argv[])
@@ -2167,6 +2170,16 @@ main (int argc, char *argv[])
/* if on, it displays the information that files have been moved to ~/.mc */
int show_change_notice = 0;
+ /* Check whether we have UTF-8 locale */
+ char *lang = getenv("LANG");
+ size_t len = strlen(lang);
+ size_t len = 0;
+
+ if ( lang )
+ len = strlen(lang);
+
+ if ( len >= 5 && !strcasecmp(&lang[len-5],"UTF-8") )
+ is_utf8 = TRUE;
@ -24,8 +27,8 @@
/* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */
setlocale (LC_ALL, "");
bindtextdomain ("mc", LOCALEDIR);
--- mc-4.6.1a/src/main.h.laf 2005-11-13 17:08:54.000000000 +0100
+++ mc-4.6.1a/src/main.h 2005-11-14 15:18:21.000000000 +0100
--- mc-4.6.1a/src/main.h.laf 2005-11-24 16:55:06.000000000 +0100
+++ mc-4.6.1a/src/main.h 2005-11-24 16:55:06.000000000 +0100
@@ -67,6 +67,7 @@ extern int alternate_plus_minus;
extern int only_leading_plus_minus;
extern int output_starts_shell;
@ -34,8 +37,8 @@
extern char *xterm_title_str;
extern char cmd_buf [512];
extern const char *shell;
--- mc-4.6.1a/src/widget.c.laf 2005-11-13 17:08:54.000000000 +0100
+++ mc-4.6.1a/src/widget.c 2005-11-14 15:22:00.000000000 +0100
--- mc-4.6.1a/src/widget.c.laf 2005-11-24 16:55:06.000000000 +0100
+++ mc-4.6.1a/src/widget.c 2005-11-24 16:55:06.000000000 +0100
@@ -1948,52 +1948,86 @@ input_new (int y, int x, int color, int
return in;
}
@ -165,8 +168,8 @@
}
/* Returns the number of items between s and e,
--- mc-4.6.1a/src/screen.c.laf 2005-11-13 17:08:54.000000000 +0100
+++ mc-4.6.1a/src/screen.c 2005-11-13 17:08:54.000000000 +0100
--- mc-4.6.1a/src/screen.c.laf 2005-11-24 16:55:06.000000000 +0100
+++ mc-4.6.1a/src/screen.c 2005-11-24 16:55:06.000000000 +0100
@@ -888,6 +888,9 @@ show_dir (WPanel *panel)
}
#endif /* HAVE_SLANG */
@ -186,8 +189,8 @@
? 1
: (panel->split+1))) - (!isstatus && panel->split);
--- mc-4.6.1a/src/widget.h.laf 2005-11-13 17:08:54.000000000 +0100
+++ mc-4.6.1a/src/widget.h 2005-11-13 17:08:54.000000000 +0100
--- mc-4.6.1a/src/widget.h.laf 2005-11-24 16:55:06.000000000 +0100
+++ mc-4.6.1a/src/widget.h 2005-11-24 16:55:06.000000000 +0100
@@ -170,6 +170,10 @@ void button_set_text (WButton *b, const
/* Listbox manager */
WLEntry *listbox_get_data (WListbox *l, int pos);

25
mc.spec
View File

@ -1,14 +1,14 @@
Summary: User-friendly text console file manager and visual shell.
Name: mc
Version: 4.6.1a
Release: 0.23
Release: 4
Epoch: 1
License: GPL
Group: System Environment/Shells
Source0: http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-%{version}.tar.bz2
URL: http://www.ibiblio.org/mc/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: glib2-devel, e2fsprogs-devel
BuildRequires: glib2-devel e2fsprogs-devel slang-devel
Requires: dev >= 0:3.3-3
Patch0: mc-utf8.patch
@ -18,8 +18,8 @@ Patch3: mc-uglydir.patch
Patch4: mc-fish-upload.patch
Patch5: mc-userhost.patch
Patch6: mc-64bit.patch
Patch7: mc-specsyntax.patch
Patch8: mc-utf8-look-and-feel.patch
Patch7: mc-utf8-look-and-feel.patch
Patch8: mc-gpmfix.patch
%description
Midnight Commander is a visual shell much like a file manager, only
@ -38,8 +38,8 @@ specific files.
%patch4 -p1 -b .fish-upload
%patch5 -p1 -b .userhost
%patch6 -p1 -b .64bit
%patch7 -p1 -b .specsyntax
%patch8 -p1 -b .laf
%patch7 -p1 -b .laf
%patch8 -p1 -b .gpmfix
# convert files in /lib to UTF-8
pushd lib
@ -102,7 +102,7 @@ popd
%build
export CFLAGS="-DUTF8=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAGS"
%configure --with-screen=mcslang \
%configure --with-screen=slang \
--host=%{_host} --build=%{_build} \
--target=%{_target_platform} \
--program-prefix=%{?_program_prefix} \
@ -121,8 +121,7 @@ export CFLAGS="-DUTF8=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAG
--infodir=%{_infodir} \
--enable-charset \
--with-samba \
--without-x \
--without-gpm-mouse
--without-x
make %{?_smp_mflags}
%install
@ -177,6 +176,14 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/mc
%changelog
* Fri Dec 1 2005 Jindrich Novy <jnovy@redhat.com> 4.6.1a-4
- don't segfault when LANG is not set, thanks to Andy Shevchenko (#174070)
- drop specsyntax patch, applied upstream
- re-enable gpm support on compile time, but disable gpm in wrapper scripts
to allow users to run mc with gpm support without need to recompile mc (#163078)
- sync NVRE with Fedoras
- depend on external slang [now updated to 2.0.5] (#174662)
* Wed Nov 16 2005 Jindrich Novy <jnovy@redhat.com> 4.6.1a-0.23
- update from CVS to fix the usage of glibc private symbols
- don't try to display UTF8ized characters in hex viewing mode