[arch-commits] Commit in hunspell-el/trunk (PKGBUILD)

Andreas Radke andyrtr at archlinux.org
Mon Nov 16 10:39:19 UTC 2020


    Date: Monday, November 16, 2020 @ 10:39:19
  Author: andyrtr
Revision: 755193

upgpkg: hunspell-el 0.9-5: fix file encoding - FS#68481

Modified:
  hunspell-el/trunk/PKGBUILD

----------+
 PKGBUILD |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-16 10:16:58 UTC (rev 755192)
+++ PKGBUILD	2020-11-16 10:39:19 UTC (rev 755193)
@@ -3,7 +3,7 @@
 
 pkgname=hunspell-el
 pkgver=0.9
-pkgrel=4
+pkgrel=5
 
 pkgdesc="Greek hunspell dictionary"
 url="http://elspell.math.upatras.gr"
@@ -37,8 +37,18 @@
 
         # Install webengine dictionaries
         install -d "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
-        for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
-        _filename=$(basename $_file)
-        qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
-       done
+	qwebengine_convert_dict "$pkgdir"/usr/share/hunspell/el_GR.dic \
+	  "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/el_GR.bdic
+
+	# fix file encoding - FS#68481
+  	# check for broken files using
+  	# file -i  $(pacman -Ql hunspell-el | sed "s/hunspell-el//") | grep iso
+        # this can't be done earlier in build or would lead to an error:
+        # ERROR: Cannot encode command 'TRY ÜüßúÀÝÞýûàþéçõùïåáôíñóêìðëòãäèöâæîø÷' to utf8.
+	cd "$pkgdir"/usr/share/hunspell
+  	for file in el_GR.aff el_GR.dic; do
+          mv $file $file.ISO-8859
+          iconv -f iso-8859-1 -t utf-8 $file.ISO-8859 -o $file
+          rm $file.ISO-8859
+        done
 }



More information about the arch-commits mailing list