Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1577027
 поиск   регистрация   авторизация 
 
Группа :: Эмуляторы
Пакет: dosemu

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: dosemu-1.2.2-alt-locale2.patch


diff -ruN dosemu-1.2.2.orig/dist/dosemu dosemu-1.2.2/dist/dosemu
--- dosemu-1.2.2.orig/dist/dosemu	2004-01-17 00:48:20 +0300
+++ dosemu-1.2.2/dist/dosemu	2005-03-01 13:56:01 +0300
@@ -233,6 +233,31 @@
     else
       install_from_template
     fi
+
+    external=
+    internal=
+    LAYOUT=`echo $LANG | sed -e 's#.*\.\(.*\)#\1#' | tr '[:upper:]' '[:lower:]'`
+    case $LAYOUT in
+        koi8-r | koi8-u | koi8-ru | cp1251 | cp1125 | cp866)
+		external=$LAYOUT ;;
+    esac
+    case `echo $LANG | sed -e 's#.*_\(.*\)\..*#\1#' | tr '[:upper:]' '[:lower:]'` in
+        ru)  internal='cp866'; xfont='vgacyr'; layout='ru' ;;
+        ua)  internal='cp1125'; xfont='vga-ua'; layout='ru' ;;
+    esac
+
+    if [ ! -x $HOME/.dosemurc ]; then
+       cp $SYSTEM_CONF_PATH/dosemu.conf $HOME/.dosemurc
+       if [ ! -z $external ]; then
+          subst "s#\#*[[:space:]]*\(\$_external_char_set[[:space:]]*=[[:space:]]*\"\)[[:alnum:]]*\"#\1$external\"#g" $HOME/.dosemurc
+       fi
+       if [ ! -z $internal ]; then
+          subst "s#\#*[[:space:]]*\(\$_internal_char_set[[:space:]]*=[[:space:]]*\"\)[[:alnum:]]*\"#\1$internal\"#g" $HOME/.dosemurc
+          subst "s#\#*[[:space:]]*\(\$_X_font[[:space:]]*=[[:space:]]*\"\)[[:alnum:]]*\"#\1$xfont\"#g" $HOME/.dosemurc
+          subst "s#\#*[[:space:]]*\(\$_layout[[:space:]]*=[[:space:]]*\"\)[[:alnum:]]*\"#\1$layout\"#g" $HOME/.dosemurc
+       fi
+    fi
+
   fi
 fi
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005