[arch-commits] Commit in hunspell/trunk (PKGBUILD hunspell-phone.patch)

andyrtr at archlinux.org andyrtr at archlinux.org
Sat Jan 22 15:58:53 EST 2011


    Date: Saturday, January 22, 2011 @ 15:58:53
  Author: andyrtr
Revision: 107254

upgpkg: hunspell 1.2.14-2
add a patch from upstream tracker to solve FS#22541 + FS#22463

Added:
  hunspell/trunk/hunspell-phone.patch
Modified:
  hunspell/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   11 ++++++++---
 hunspell-phone.patch |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-01-22 20:53:51 UTC (rev 107253)
+++ PKGBUILD	2011-01-22 20:58:53 UTC (rev 107254)
@@ -4,7 +4,7 @@
 
 pkgname=hunspell
 pkgver=1.2.14
-pkgrel=1
+pkgrel=2
 pkgdesc="Spell checker and morphological analyzer library and program"
 arch=('i686' 'x86_64')
 url="http://hunspell.sourceforge.net/"
@@ -12,11 +12,16 @@
 depends=('gcc-libs' 'readline')
 optdepends=('perl: for ispellaff2myspell')
 options=('!libtool')
-source=(http://downloads.sourceforge.net/hunspell/hunspell-$pkgver.tar.gz)
-md5sums=('c2f289af57a677e6b258f2d18ecb178e')
+source=(http://downloads.sourceforge.net/hunspell/hunspell-$pkgver.tar.gz
+	hunspell-phone.patch)
+md5sums=('c2f289af57a677e6b258f2d18ecb178e'
+         '8be4d84cc361a5deb0c1660a92991854')
 
 build() {
   cd "$srcdir/hunspell-$pkgver"
+  # http://sourceforge.net/tracker/?func=detail&aid=3158994&group_id=143754&atid=756395
+  patch -Np0 -i ${srcdir}/hunspell-phone.patch
+  
   ./configure --prefix=/usr --disable-static \
 	--with-ui --with-readline --with-experimental
   make

Added: hunspell-phone.patch
===================================================================
--- hunspell-phone.patch	                        (rev 0)
+++ hunspell-phone.patch	2011-01-22 20:58:53 UTC (rev 107254)
@@ -0,0 +1,47 @@
+Index: src/hunspell/suggestmgr.cxx
+===================================================================
+RCS file: /cvsroot/hunspell/hunspell/src/hunspell/suggestmgr.cxx,v
+retrieving revision 1.16
+diff -u -r1.16 suggestmgr.cxx
+--- src/hunspell/suggestmgr.cxx	4 Jan 2011 11:38:29 -0000	1.16
++++ src/hunspell/suggestmgr.cxx	17 Jan 2011 15:17:30 -0000
+@@ -1043,8 +1043,15 @@
+   char target[MAXSWUTF8L];
+   char candidate[MAXSWUTF8L];
+   if (ph) {
+-    strcpy(candidate, word);
+-    mkallcap(candidate, csconv);
++    if (utf8) {
++      w_char _w[MAXSWL];
++      int _wl = u8_u16(_w, MAXSWL, word);
++      mkallcap_utf(_w, _wl, langnum);
++      u16_u8(candidate, MAXSWUTF8L, _w, _wl);
++    } else {
++      strcpy(candidate, word);
++      mkallcap(candidate, csconv);
++    }
+     phonet(candidate, target, n, *ph);
+   }
+ 
+@@ -1067,11 +1074,18 @@
+     }
+     
+     if (ph && (sc > 2) && (abs(n - (int) hp->clen) <= 3)) {
+-	char target2[MAXSWUTF8L];
++      char target2[MAXSWUTF8L];
++      if (utf8) {
++        w_char _w[MAXSWL];
++        int _wl = u8_u16(_w, MAXSWL, HENTRY_WORD(hp));
++        mkallcap_utf(_w, _wl, langnum);
++        u16_u8(candidate, MAXSWUTF8L, _w, _wl);
++      } else {
+         strcpy(candidate, HENTRY_WORD(hp));
+         mkallcap(candidate, csconv);
+-        phonet(candidate, target2, -1, *ph);
+-        scphon = 2 * ngram(3, target, target2, NGRAM_LONGER_WORSE);
++      }
++      phonet(candidate, target2, -1, *ph);
++      scphon = 2 * ngram(3, target, target2, NGRAM_LONGER_WORSE);
+     }
+ 
+     if (sc > scores[lp]) {



More information about the arch-commits mailing list