[arch-commits] CVS update of extra/office/hunspell (3 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Tue May 29 19:19:45 UTC 2007


    Date: Tuesday, May 29, 2007 @ 15:19:45
  Author: andyrtr
    Path: /home/cvs-extra/extra/office/hunspell

   Added: hunspell-1.1.5-badheader.patch (1.1)
          hunspell-1.1.5-missingheaders.patch (1.1)
Modified: PKGBUILD (1.3 -> 1.4)

fixed detection for OOo and broken headers with patches from fedora


-------------------------------------+
 PKGBUILD                            |   12 +-
 hunspell-1.1.5-badheader.patch      |   15 ++
 hunspell-1.1.5-missingheaders.patch |  203 ++++++++++++++++++++++++++++++++++
 3 files changed, 228 insertions(+), 2 deletions(-)


Index: extra/office/hunspell/PKGBUILD
diff -u extra/office/hunspell/PKGBUILD:1.3 extra/office/hunspell/PKGBUILD:1.4
--- extra/office/hunspell/PKGBUILD:1.3	Sat May 26 18:13:29 2007
+++ extra/office/hunspell/PKGBUILD	Tue May 29 15:19:44 2007
@@ -2,20 +2,28 @@
 # Contributor: Hussam Al-Tayeb <ht990332 at gmail.com>
 pkgname=hunspell
 pkgver=1.1.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Hunspell is a spell checker and morphological analyzer library"
 arch=(i686 x86_64)
 license=('GPL' 'LGPL' 'MPL')
 url="http://hunspell.sourceforge.net/"
 depends=('gcc')
 options=('!libtool')
-source=(http://heanet.dl.sourceforge.net/sourceforge/hunspell/${pkgname}-${pkgver}.tar.gz)
+source=(http://heanet.dl.sourceforge.net/sourceforge/hunspell/${pkgname}-${pkgver}.tar.gz
+	hunspell-1.1.5-badheader.patch
+	hunspell-1.1.5-missingheaders.patch)
 md5sums=('c69950f7df9136e44a85390904445c45')
 
 build() {
   cd ${startdir}/src/${pkgname}-${pkgver}
+  patch -Np1 -i ../hunspell-1.1.5-badheader.patch || return 1
+  patch -Np1 -i ../hunspell-1.1.5-missingheaders.patch || return 1
   [ "$CARCH" = "x86_64" ] && CXXFLAGS="${CXXFLAGS} -fPIC"
   ./configure --prefix=/usr --disable-static
   make || return 1
   make DESTDIR=${startdir}/pkg install
+
+  # fix lib naming for detection by OOo
+  cd $startdir/pkg/usr/lib
+  ln -s libhunspell-1.1.so.0.0.0 libhunspell.so
 }
Index: extra/office/hunspell/hunspell-1.1.5-badheader.patch
diff -u /dev/null extra/office/hunspell/hunspell-1.1.5-badheader.patch:1.1
--- /dev/null	Tue May 29 15:19:45 2007
+++ extra/office/hunspell/hunspell-1.1.5-badheader.patch	Tue May 29 15:19:45 2007
@@ -0,0 +1,15 @@
+--- hunspell-1.1.5/src/hunspell/hunspell.hxx.orig	2007-03-20 10:44:20.000000000 +0000
++++ hunspell-1.1.5/src/hunspell/hunspell.hxx	2007-03-20 10:44:27.000000000 +0000
+@@ -1,12 +1,8 @@
+-#include "license.hunspell"
+-#include "license.myspell"
+-
+ #include "hashmgr.hxx"
+ #include "affixmgr.hxx"
+ #include "suggestmgr.hxx"
+ #include "csutil.hxx"
+ #include "langnum.hxx"
+-#include "config.h"
+ 
+ #define  SPELL_COMPOUND  (1 << 0)
+ #define  SPELL_FORBIDDEN (1 << 1)
Index: extra/office/hunspell/hunspell-1.1.5-missingheaders.patch
diff -u /dev/null extra/office/hunspell/hunspell-1.1.5-missingheaders.patch:1.1
--- /dev/null	Tue May 29 15:19:45 2007
+++ extra/office/hunspell/hunspell-1.1.5-missingheaders.patch	Tue May 29 15:19:45 2007
@@ -0,0 +1,203 @@
+--- /dev/null	2007-03-16 11:16:34.774869017 +0000
++++ hunspell-1.1.5/src/tools/munch.h	2007-03-20 09:19:49.000000000 +0000
+@@ -0,0 +1,121 @@
++/* munch header file */
++
++#define MAX_LN_LEN    200
++#define MAX_WD_LEN    200
++#define MAX_PREFIXES  256
++#define MAX_SUFFIXES  256
++#define MAX_ROOTS      20
++#define MAX_WORDS     5000
++ 
++#define ROTATE_LEN      5
++ 
++#define ROTATE(v,q) \
++   (v) = ((v) << (q)) | (((v) >> (32 - q)) & ((1 << (q))-1));
++
++#define SET_SIZE      256
++
++#define XPRODUCT  (1 << 0)
++
++/* the affix table entry */
++
++struct affent
++{
++    char *  appnd;
++    char *  strip;
++    short   appndl;
++    short   stripl;
++    char    achar;
++    char    xpflg;   
++    short   numconds;
++    char    conds[SET_SIZE];
++};
++
++
++struct affixptr
++{
++    struct affent * aep;
++    int		    num;
++};
++
++/* the prefix and suffix table */
++int	numpfx;		/* Number of prefixes in table */
++int     numsfx;		/* Number of suffixes in table */
++
++/* the prefix table */
++struct affixptr          ptable[MAX_PREFIXES];
++
++/* the suffix table */
++struct affixptr          stable[MAX_SUFFIXES];
++
++
++/* data structure to store results of lookups */
++struct matches
++{
++    struct hentry *	hashent;	/* hash table entry */
++    struct affent *	prefix;		/* Prefix used, or NULL */
++    struct affent *	suffix;		/* Suffix used, or NULL */
++};
++
++int    numroots;	          /* number of root words found */
++struct matches  roots[MAX_ROOTS]; /* list of root words found */
++
++/* hashing stuff */
++
++struct hentry
++{
++  char * word;
++  char * affstr;
++  struct hentry * next;
++  int keep;
++};
++
++ 
++int             tablesize;
++struct hentry * tableptr;
++
++/* unmunch stuff */
++
++int    numwords;	          /* number of words found */
++struct dwords
++{
++  char * word;
++  int pallow;
++};
++
++struct dwords  wlist[MAX_WORDS]; /* list words found */
++
++
++/* the routines */
++
++int parse_aff_file(FILE* afflst);
++
++void encodeit(struct affent * ptr, char * cs);
++
++int load_tables(FILE * wrdlst);
++
++int hash(const char *);
++
++int add_word(char *);
++
++struct hentry * lookup(const char *);
++
++void aff_chk (const char * word, int len);
++
++void pfx_chk (const char * word, int len, struct affent* ep, int num);
++
++void suf_chk (const char * word, int len, struct affent * ep, int num, 
++	      struct affent * pfxent, int cpflag);
++
++void add_affix_char(struct hentry * hent, char ac);
++
++int expand_rootword(const char *, int, const char*, int);
++
++void pfx_add (const char * word, int len, struct affent* ep, int num);
++
++void suf_add (const char * word, int len, struct affent * ep, int num);
++
++char * mystrsep(char ** stringp, const char delim);
++
++char * mystrdup(const char * s);
++
++void mychomp(char * s);
+--- /dev/null	2007-03-16 11:16:34.774869017 +0000
++++ hunspell-1.1.5/src/tools/unmunch.h	2007-03-20 09:19:50.000000000 +0000
+@@ -0,0 +1,76 @@
++/* unmunch header file */
++
++#define MAX_LN_LEN    200
++#define MAX_WD_LEN    200
++#define MAX_PREFIXES  256
++#define MAX_SUFFIXES  256
++#define MAX_WORDS     5000
++ 
++#define ROTATE_LEN      5
++ 
++#define ROTATE(v,q) \
++   (v) = ((v) << (q)) | (((v) >> (32 - q)) & ((1 << (q))-1));
++
++#define SET_SIZE      256
++
++#define XPRODUCT  (1 << 0)
++
++/* the affix table entry */
++
++struct affent
++{
++    char *  appnd;
++    char *  strip;
++    short   appndl;
++    short   stripl;
++    char    achar;
++    char    xpflg;   
++    short   numconds;
++    char    conds[SET_SIZE];
++};
++
++
++struct affixptr
++{
++    struct affent * aep;
++    int		    num;
++};
++
++/* the prefix and suffix table */
++int	numpfx;		/* Number of prefixes in table */
++int     numsfx;		/* Number of suffixes in table */
++
++/* the prefix table */
++struct affixptr          ptable[MAX_PREFIXES];
++
++/* the suffix table */
++struct affixptr          stable[MAX_SUFFIXES];
++
++
++int    numwords;	          /* number of words found */
++struct dwords
++{
++  char * word;
++  int pallow;
++};
++
++struct dwords  wlist[MAX_WORDS]; /* list words found */
++
++
++/* the routines */
++
++int parse_aff_file(FILE* afflst);
++
++void encodeit(struct affent * ptr, char * cs);
++
++int expand_rootword(const char *, int, const char*, int);
++
++void pfx_add (const char * word, int len, struct affent* ep, int num);
++
++void suf_add (const char * word, int len, struct affent * ep, int num);
++
++char * mystrsep(char ** stringp, const char delim);
++
++char * mystrdup(const char * s);
++
++void mychomp(char * s);




More information about the arch-commits mailing list