Bug#513735: patch

2009-02-02 Thread Fedor P. Goncharov
Actually, this patch will not really fix anything, because the
ru_RU.KOI8-R locale needs to have been previously generated and
installed on the system, for this to work. Otherwise, declaring LANG
and LC_ALL (with or without the export statement) will always fall
back to the C locale that is the default on Debian's archive buildd
network.
Seems Alexander was right, C locale will be work too.
diff -Naur rus-ispell-0.99g5/debian/rules rus-ispell-0.99g5-fix/debian/rules
--- rus-ispell-0.99g5/debian/rules	2009-02-02 05:13:55.0 +0600
+++ rus-ispell-0.99g5-fix/debian/rules	2009-02-02 05:16:20.0 +0600
@@ -13,10 +13,15 @@
 LANG_COUNTRY=ru_RU
 DICT_LANG=ru
 
+#need for grep, sortkoi8 and tr to work with dictionary encoding in koi8-r!!!
+LANG=C
+LC_ALL=C
+
 build-arch:
+	# Generate additional dictionary with IO letters replaced by IE
+	grep -h '[£³]' $(DICTIONARIES) | tr '£³' 'Åå'  io2ie_dictionary.koi
 	# Generate ispell dictionary
-	grep -h '[£³]' $(DICTIONARIES) | tr '\243\263' '\305\345'  yo_subst.koi
-	cat $(DICTIONARIES) yo_subst.koi |./sortkoi8 | uniq  $(ILANGUAGE).dict
+	cat $(DICTIONARIES) io2ie_dictionary.koi | ./sortkoi8 | uniq  $(ILANGUAGE).dict
 	sed -e s/^\#[ye]//;s/^\#koi/wordchars/ $(ILANGUAGE).aff.koi  $(ILANGUAGE).aff
 	buildhash $(ILANGUAGE).dict $(ILANGUAGE).aff $(ILANGUAGE).hash
 	# Generate myspell dictionary
@@ -36,7 +41,7 @@
 
 clean::
 	# Clean ispell files.
-	rm -f *.cnt *.hash *.stat yo_subst.koi
+	rm -f *.cnt *.hash *.stat io2ie_dictionary.koi
 	# Also delete aff and dict, since we build them here.
 	rm -f $(ILANGUAGE).aff $(ILANGUAGE).dict
 	# Clean myspell files.


Bug#513735: patch

2009-02-01 Thread Fedor P. Goncharov
Actually, this patch will not really fix anything, because the
ru_RU.KOI8-R locale needs to have been previously generated and
installed on the system, for this to work. Otherwise, declaring LANG
and LC_ALL (with or without the export statement) will always fall
back to the C locale that is the default on Debian's archive buildd
network.
Seems Alexander was right, C locale will be work too.

diff -Naur rus-ispell-0.99g5/debian/rules rus-ispell-0.99g5-fix/debian/rules
--- rus-ispell-0.99g5/debian/rules	2009-02-02 05:13:55.0 +0600
+++ rus-ispell-0.99g5-fix/debian/rules	2009-02-02 05:16:20.0 +0600
@@ -13,10 +13,15 @@
 LANG_COUNTRY=ru_RU
 DICT_LANG=ru
 
+#need for grep, sortkoi8 and tr to work with dictionary encoding in koi8-r!!!
+LANG=C
+LC_ALL=C
+
 build-arch:
+	# Generate additional dictionary with IO letters replaced by IE
+	grep -h '[£³]' $(DICTIONARIES) | tr '£³' 'Åå'  io2ie_dictionary.koi
 	# Generate ispell dictionary
-	grep -h '[£³]' $(DICTIONARIES) | tr '\243\263' '\305\345'  yo_subst.koi
-	cat $(DICTIONARIES) yo_subst.koi |./sortkoi8 | uniq  $(ILANGUAGE).dict
+	cat $(DICTIONARIES) io2ie_dictionary.koi | ./sortkoi8 | uniq  $(ILANGUAGE).dict
 	sed -e s/^\#[ye]//;s/^\#koi/wordchars/ $(ILANGUAGE).aff.koi  $(ILANGUAGE).aff
 	buildhash $(ILANGUAGE).dict $(ILANGUAGE).aff $(ILANGUAGE).hash
 	# Generate myspell dictionary
@@ -36,7 +41,7 @@
 
 clean::
 	# Clean ispell files.
-	rm -f *.cnt *.hash *.stat yo_subst.koi
+	rm -f *.cnt *.hash *.stat io2ie_dictionary.koi
 	# Also delete aff and dict, since we build them here.
 	rm -f $(ILANGUAGE).aff $(ILANGUAGE).dict
 	# Clean myspell files.


Bug#513735: [PATCH] patch from bug #511290 broke dictionary building on non koi8r computers

2009-01-31 Thread Fedor P. Goncharov
Package: aspell-ru
Version: 0.99g5-6
Severity: critical

First:
patch from bug #511290 do nothing instead sorting the content and filtering 
it. But if uniq work in utf-8 environment with KOI8R dictionary, it just  
omit most of lines as repeating. You can verify my words if compare dictionary 
in repository before and after patch ( 1,8M   vs 74K for 
/usr/share/myspell/dicts/ru_RU.dic).

Second:
BUG #511290 already fixed in this string:
grep -h '[��]' $(DICTIONARIES) | tr '\243\263' '\305\345'  yo_subst.koi

  

   yo==IO==ё
but broken because grep and tr don't know what they work with koi8r codepage 
and because somebody mistaken

Third:
Товарисч Александр вы либо немножко глупый, либо афигенный 'ч'удак, в первом 
случае я вообще не понимаю как у вас оказался данный патч, но понимаю почему 
вы до сих пор не перешли на утф, во втором вы наверно догадались что я о вас 
думаю.


Bug#513735: patch

2009-01-31 Thread Fedor P. Goncharov

--- rules.fake	2009-01-31 22:27:21.0 +0600
+++ rules	2009-01-31 22:49:22.0 +0600
@@ -13,10 +13,14 @@
 LANG_COUNTRY=ru_RU
 DICT_LANG=ru
 
+#need for grep and tr to worck with dictionary encoding in koi8-r!!!
+LANG=ru_RU.KOI8R
+LC_ALL=ru_RU.KOI8R
+
 build-arch:
 	# Generate ispell dictionary
-	grep -h '[£³]' $(DICTIONARIES) | tr '\243\263' '\305\345'  yo_subst.koi
-	cat $(DICTIONARIES) yo_subst.koi |./sortkoi8 | uniq  $(ILANGUAGE).dict
+	grep -h '[£³]' $(DICTIONARIES) | tr '£³' 'Åå'  io2ie_dictionary.koi
+	cat $(DICTIONARIES) io2ie_dictionary.koi | ./sortkoi8 | uniq  $(ILANGUAGE).dict
 	sed -e s/^\#[ye]//;s/^\#koi/wordchars/ $(ILANGUAGE).aff.koi  $(ILANGUAGE).aff
 	buildhash $(ILANGUAGE).dict $(ILANGUAGE).aff $(ILANGUAGE).hash
 	# Generate myspell dictionary
@@ -36,7 +40,7 @@
 
 clean::
 	# Clean ispell files.
-	rm -f *.cnt *.hash *.stat yo_subst.koi
+	rm -f *.cnt *.hash *.stat io2ie_dictionary.koi
 	# Also delete aff and dict, since we build them here.
 	rm -f $(ILANGUAGE).aff $(ILANGUAGE).dict
 	# Clean myspell files.


Bug#513735: [PATCH] patch from bug #511290 broke dictionary building on non koi8r computers

2009-01-31 Thread Fedor P. Goncharov
utf patch it seems work too.
--- rules.fake	2009-01-31 22:27:21.0 +0600
+++ rules	2009-02-01 07:17:11.0 +0600
@@ -1,5 +1,4 @@
 #!/usr/bin/make -f
-# coding: koi8-r
 #
 # CDBS debian/rules for rus-ispell
 # Martin-Eric Racine q-f...@iki.fi
@@ -13,18 +12,25 @@
 LANG_COUNTRY=ru_RU
 DICT_LANG=ru
 
+
 build-arch:
-	# Generate ispell dictionary
-	grep -h '[£³]' $(DICTIONARIES) | tr '\243\263' '\305\345'  yo_subst.koi
-	cat $(DICTIONARIES) yo_subst.koi |./sortkoi8 | uniq  $(ILANGUAGE).dict
-	sed -e s/^\#[ye]//;s/^\#koi/wordchars/ $(ILANGUAGE).aff.koi  $(ILANGUAGE).aff
+	# Generate dictionary (UTF8)
+	cat $(DICTIONARIES)|iconv -f KOI8R -t UTF8  $(ILANGUAGE).dict.utf8
+	cat $(ILANGUAGE).aff.koi|iconv -f KOI8R -t UTF8  $(ILANGUAGE).aff.utf8 
+	# Generate IO - IE dictionary (UTF8)
+	grep -h '[ёЁ]'  $(ILANGUAGE).dict.utf8 | sed y/ё/е/; y/Ё/Е/  io2ie_dictionary.dict.utf8
+	# Generate general .dict file (KOI8R)
+	cat *.dict.utf8 | iconv -f UTF8 -t KOI8R  $(ILANGUAGE).dict
+	# Generate ispell dictionary (KOI8R)
+	cat $(ILANGUAGE).aff.utf8 | sed -e s/^\#[ye]//;s/^\#koi/wordchars/ \
+| iconv -f UTF8 -t KOI8R  $(ILANGUAGE).aff
 	buildhash $(ILANGUAGE).dict $(ILANGUAGE).aff $(ILANGUAGE).hash
-	# Generate myspell dictionary
+	# Generate myspell dictionary (KOI8R)
 	i2myspell -d ./$(ILANGUAGE).dict  $(LANG_COUNTRY).dic
-	i2myspell ./$(ILANGUAGE) KOI8-R áâ÷çäå³öúéêëìíîïðòóôõæèãþûýÿùøüàñ \
-	ÁÂ×ÇÄÅ£ÖÚÉÊËÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀÑ | \
+	i2myspell ./$(ILANGUAGE) KOI8-R АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ \
+	абвгдеёжзийклмнопрстуфхцчшщъыьэюя | \
 	sed 's/ - / 0 /'  $(LANG_COUNTRY).aff
-	## Generate aspell dictionary.
+	# Generate aspell dictionary.
 	# build-depends on aspell because of prezip.
 	cp $(LANG_COUNTRY).aff $(DICT_LANG)_affix.dat
 	cat $(LANG_COUNTRY).dic | sed 1d | LC_COLLATE=C sort -u | prezip  $(DICT_LANG).cwl
@@ -36,9 +42,9 @@
 
 clean::
 	# Clean ispell files.
-	rm -f *.cnt *.hash *.stat yo_subst.koi
+	rm -f *.cnt *.hash *.stat io2ie_dictionary.dict.utf8
 	# Also delete aff and dict, since we build them here.
-	rm -f $(ILANGUAGE).aff $(ILANGUAGE).dict
+	rm -f $(ILANGUAGE).aff $(ILANGUAGE).dict $(ILANGUAGE).dict.utf8 $(ILANGUAGE).aff.utf8
 	# Clean myspell files.
 	rm -f $(LANG_COUNTRY).aff $(LANG_COUNTRY).dic x
 	# Clean aspell files.