- Fix build with iconv support turned off [1]

- Fix pkg-plist when built without NLS support

Submitted by:	Dimitry Andric [1]
This commit is contained in:
Max Khon 2011-03-21 18:25:33 +00:00
parent 5ff25c0bf1
commit 0153ccc919
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=271412
3 changed files with 65 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= mc
PORTVERSION= 4.7.5
PORTREVISION= 1
CATEGORIES= misc shells
MASTER_SITES= http://www.midnight-commander.org/downloads/ \
${MASTER_SITE_SUNSITE}
@ -28,6 +29,7 @@ USE_PERL5= yes
USE_XZ= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= ZIP=${LOCALBASE}/bin/zip UNZIP=${LOCALBASE}/bin/unzip
USE_AUTOTOOLS= autoconf automake
OPTIONS= SLANG "Build with SLang library" on \
ICONV "Build with iconv recoding" on \

View File

@ -0,0 +1,38 @@
Index: src/editor/edit.c
===================================================================
--- src/editor/edit.c (revision bd3025e7a9ec490bc6adabc34cd0392e93ecd050)
+++ src/editor/edit.c (revision 4f4876abb4acb812747d1050c4b3be01da87780a)
@@ -2840,8 +2840,5 @@
{
int c, orig_c;
- int utf_ch = 0;
-#ifdef HAVE_CHARSET
- int cw = 1;
-#endif
+
if (cols != -10)
{
@@ -2851,8 +2848,13 @@
return p - 1;
}
+
orig_c = c = edit_get_byte (edit, p);
+
#ifdef HAVE_CHARSET
if (edit->utf8)
{
+ int utf_ch;
+ int cw = 1;
+
utf_ch = edit_get_utf (edit, p, &cw);
if (utf8_display)
@@ -2866,6 +2868,8 @@
col -= cw - 1;
}
+
+ c = convert_to_display_c (c);
#endif
- c = convert_to_display_c (c);
+
if (c == '\t')
col += TAB_SIZE - col % TAB_SIZE;

View File

@ -0,0 +1,25 @@
--- doc/hints/Makefile.am.orig 2011-03-22 00:02:49.000000000 +0600
+++ doc/hints/Makefile.am 2011-03-22 00:03:11.000000000 +0600
@@ -1,7 +1,11 @@
HINTFILES = \
- mc.hint mc.hint.cs mc.hint.es mc.hint.hu mc.hint.it \
+ mc.hint
+if USE_NLS
+HINTFILES += \
+ mc.hint.cs mc.hint.es mc.hint.hu mc.hint.it \
mc.hint.nl mc.hint.pl mc.hint.ru mc.hint.sr mc.hint.uk \
mc.hint.zh
+endif
hintdir = $(pkgdatadir)/hints
hint_DATA = $(HINTFILES)
--- configure.ac.orig 2011-03-21 23:58:52.000000000 +0600
+++ configure.ac 2011-03-22 00:01:04.000000000 +0600
@@ -504,6 +504,7 @@
AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang])
AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"])
AM_CONDITIONAL(USE_DIFF, [test -n "$use_diff"])
+AM_CONDITIONAL(USE_NLS, [test x"$USE_NLS" = xyes])
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])