]> git.pld-linux.org Git - packages/hunspell.git/commitdiff
- based on fedora patches: http://cvs.fedora.redhat.com/viewcvs/devel/hunspell/
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 4 Mar 2007 14:41:29 +0000 (14:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    hunspell-capi.patch -> 1.1
    hunspell-defaultdictfromlang.patch -> 1.1
    hunspell-sharedlibs.patch -> 1.1

hunspell-capi.patch [new file with mode: 0644]
hunspell-defaultdictfromlang.patch [new file with mode: 0644]
hunspell-sharedlibs.patch [new file with mode: 0644]

diff --git a/hunspell-capi.patch b/hunspell-capi.patch
new file mode 100644 (file)
index 0000000..d00d18b
--- /dev/null
@@ -0,0 +1,87 @@
+diff -ru hunspell-1.1.4.orig/src/hunspell/hunspell.cxx hunspell-1.1.4/src/hunspell/hunspell.cxx
+--- hunspell-1.1.4.orig/src/hunspell/hunspell.cxx      2006-12-14 10:48:48.000000000 +0000
++++ hunspell-1.1.4/src/hunspell/hunspell.cxx   2006-12-15 09:45:10.000000000 +0000
+@@ -6,6 +6,7 @@
+ #include <cstdio>
+ #include "hunspell.hxx"
++#include "hunspell.h"
+ #ifndef W32
+ using namespace std;
+@@ -1642,3 +1643,27 @@
+   return n;
+ }
++Hunhandle *Hunspell_create(const char * affpath, const char * dpath)
++{
++      return (Hunhandle*)(new Hunspell(affpath, dpath));
++}
++
++void Hunspell_destroy(Hunhandle *pHunspell)
++{
++      delete (Hunspell*)(pHunspell);
++}
++
++int Hunspell_spell(Hunhandle *pHunspell, const char *word)
++{
++      return ((Hunspell*)pHunspell)->spell(word);
++}
++
++char *Hunspell_get_dic_encoding(Hunhandle *pHunspell)
++{
++      return ((Hunspell*)pHunspell)->get_dic_encoding();
++}
++
++int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word)
++{
++      return ((Hunspell*)pHunspell)->suggest(slst, word);
++}
+diff -ru hunspell-1.1.4.orig/src/hunspell/Makefile.am hunspell-1.1.4/src/hunspell/Makefile.am
+--- hunspell-1.1.4.orig/src/hunspell/Makefile.am       2006-12-14 10:48:48.000000000 +0000
++++ hunspell-1.1.4/src/hunspell/Makefile.am    2006-12-14 16:28:47.000000000 +0000
+@@ -7,7 +7,7 @@
+                    suggestmgr.cxx license.myspell license.hunspell
+ libhunspell_include_HEADERS=affentry.hxx htypes.hxx affixmgr.hxx \
+-              csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx \
++              csutil.hxx hunspell.hxx hunspell.h atypes.hxx dictmgr.hxx \
+               suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx
+ EXTRA_DIST=hunspell.dsp makefile.mk README
+--- /dev/null  2006-12-11 08:20:12.802001576 +0000
++++ hunspell-1.1.4/src/hunspell/hunspell.h     2006-12-15 09:44:36.000000000 +0000
+@@ -0,0 +1,33 @@
++#ifndef _MYSPELLMGR_H_
++#define _MYSPELLMGR_H_
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++typedef struct Hunhandle Hunhandle;
++
++Hunhandle *Hunspell_create(const char * affpath, const char * dpath);
++void Hunspell_destroy(Hunhandle *pHunspell);
++
++/* spell(word) - spellcheck word
++ * output: 0 = bad word, not 0 = good word
++ */
++int Hunspell_spell(Hunhandle *pHunspell, const char *);
++
++char *Hunspell_get_dic_encoding(Hunhandle *pHunspell);
++
++/* suggest(suggestions, word) - search suggestions
++ * input: pointer to an array of strings pointer and the (bad) word
++ *   array of strings pointer (here *slst) may not be initialized
++ * output: number of suggestions in string array, and suggestions in
++ *   a newly allocated array of strings (*slts will be NULL when number
++ *   of suggestion equals 0.)
++ */
++int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
diff --git a/hunspell-defaultdictfromlang.patch b/hunspell-defaultdictfromlang.patch
new file mode 100644 (file)
index 0000000..335f051
--- /dev/null
@@ -0,0 +1,24 @@
+--- hunspell-1.1.4/src/tools/hunspell.cxx.orig 2006-11-29 12:09:52.000000000 +0000
++++ hunspell-1.1.4/src/tools/hunspell.cxx      2006-11-29 12:24:36.000000000 +0000
+@@ -1105,7 +1105,20 @@
+         if (printgood && (filter_mode == NORMAL)) filter_mode = BADWORD;
+       if (! dicname) {
+-              if (! (dicname=getenv("DICTIONARY"))) dicname = mystrdup("default");
++              if (! (dicname=getenv("DICTIONARY"))) { 
++                      if (! (dicname=getenv("LANG"))) { 
++                                dicname = mystrdup("default");
++                        }
++                        else {
++                              int len = strlen(dicname);
++                              for (int i = 0; i < len; ++i) {
++                                  if ((dicname[i] == '_') && (i+3 < len)) {
++                                          dicname[i+3] = 0;
++                                          break;
++                                  }
++                                }
++                        }
++                }
+       }
+       if (!privdicname) privdicname = mystrdup(getenv("WORDLIST"));
diff --git a/hunspell-sharedlibs.patch b/hunspell-sharedlibs.patch
new file mode 100644 (file)
index 0000000..1bb4361
--- /dev/null
@@ -0,0 +1,128 @@
+--- hunspell-1.1.4.orig/configure.ac   2006-10-25 10:34:32.000000000 +0100
++++ hunspell-1.1.4/configure.ac        2006-10-25 10:41:33.000000000 +0100
+@@ -23,7 +23,7 @@
+ # Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_CC
+-AC_PROG_RANLIB
++AC_PROG_LIBTOOL
+ # Checks for libraries.
+--- hunspell-1.1.4.orig/src/hunspell/Makefile.am       2006-10-25 10:34:32.000000000 +0100
++++ hunspell-1.1.4/src/hunspell/Makefile.am    2006-10-25 10:40:44.000000000 +0100
+@@ -1,9 +1,12 @@
+-lib_LIBRARIES = libhunspell.a
+-libhunspell_a_SOURCES=affentry.cxx affixmgr.cxx csutil.cxx \
++version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
++
++lib_LTLIBRARIES = libhunspell.la
++libhunspell_includedir = $(includedir)/hunspell
++libhunspell_la_SOURCES=affentry.cxx affixmgr.cxx csutil.cxx \
+                    dictmgr.cxx hashmgr.cxx hunspell.cxx \
+-                   suggestmgr.cxx utf_info.cxx license.myspell license.hunspell
++                   suggestmgr.cxx license.myspell license.hunspell
+-include_HEADERS=affentry.hxx htypes.hxx affixmgr.hxx \
++libhunspell_include_HEADERS=affentry.hxx htypes.hxx affixmgr.hxx \
+               csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx \
+               suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx
+--- hunspell-1.1.4.orig/src/tools/Makefile.am  2006-10-25 10:34:32.000000000 +0100
++++ hunspell-1.1.4/src/tools/Makefile.am       2006-10-25 11:43:36.000000000 +0100
+@@ -4,21 +4,20 @@
+ munch_SOURCES=munch.c
+ unmunch_SOURCES=unmunch.c
+-include_HEADERS=munch.h unmunch.h
+ example_SOURCES=example.cxx
+-example_LDADD = ../hunspell/libhunspell.a
++example_LDADD = ../hunspell/libhunspell.la
+ hunspell_SOURCES=hunspell.cxx
+-hunspell_LDADD = @LIBINTL@ ../hunspell/libhunspell.a \
++hunspell_LDADD = @LIBINTL@ ../hunspell/libhunspell.la \
+       ../parsers/libparsers.a @CURSESLIB@ @READLINELIB@
+ hunmorph_SOURCES=hunmorph.cxx
+-hunmorph_LDADD = ../hunspell/libhunspell.a
++hunmorph_LDADD = ../hunspell/libhunspell.la
+ #hunmorph_INCLUDES=-I${top_srcdir}/src/hunspell
+ hunstem_SOURCES=hunstem.cxx
+-hunstem_LDADD = ../hunspell/libhunspell.a
++hunstem_LDADD = ../hunspell/libhunspell.la
+ #hunstem_INCLUDES=-I${top_srcdir}/src/hunspell
+ EXTRA_DIST=makealias
+--- hunspell-1.1.4.orig/src/parsers/Makefile.am        2006-10-25 10:34:32.000000000 +0100
++++ hunspell-1.1.4/src/parsers/Makefile.am     2006-10-25 11:48:15.000000000 +0100
+@@ -3,15 +3,8 @@
+                     latexparser.cxx  manparser.cxx \
+                     textparser.cxx 
+-#include_hunspelldir
+-include_HEADERS = firstparser.hxx \
+-                htmlparser.hxx \
+-                latexparser.hxx \
+-                manparser.hxx \
+-                textparser.hxx
+-
+ noinst_PROGRAMS=testparser
+ testparser_SOURCES=firstparser.cxx firstparser.hxx htmlparser.cxx htmlparser.hxx latexparser.cxx latexparser.hxx manparser.cxx manparser.hxx testparser.cxx textparser.cxx textparser.hxx
+ # need mystrdup()
+-LDADD = ../hunspell/libhunspell.a
++LDADD = ../hunspell/libhunspell.la
+diff -urNad hunspell-1.1.4.orig/Makefile.am hunspell-1.1.4/Makefile.am
+--- hunspell-1.1.4.orig/Makefile.am    2007-01-18 14:46:45.000000000 +0100
++++ hunspell-1.1.4/Makefile.am 2007-01-18 14:46:51.000000000 +0100
+@@ -2,5 +2,8 @@
+ SUBDIRS= intl po src man m4 tests
++pkgconfdir = $(libdir)/pkgconfig
++pkgconf_DATA = hunspell.pc
++
+ EXTRA_DIST = BUGS README.myspell AUTHORS.myspell license.myspell license.hunspell \
+-        ChangeLog.O COPYING.MPL COPYING.LGPL
++        ChangeLog.O COPYING.MPL COPYING.LGPL hunspell.pc.in
+diff -urNad hunspell-1.1.4.orig/configure.ac hunspell-1.1.4/configure.ac
+--- hunspell-1.1.4.orig/configure.ac   2007-01-18 14:46:50.000000000 +0100
++++ hunspell-1.1.4/configure.ac        2007-01-18 14:49:06.000000000 +0100
+@@ -11,6 +11,10 @@
+ AC_SUBST(XFAILED)
+ AM_INIT_AUTOMAKE(hunspell, 1.1.4)
++HUNSPELL_VERSION_MAJOR=`echo $VERSION | cut -d"." -f1`
++HUNSPELL_VERSION_MINOR=`echo $VERSION | cut -d"." -f2`
++AC_SUBST(HUNSPELL_VERSION_MAJOR)
++AC_SUBST(HUNSPELL_VERSION_MINOR)
+ AC_CONFIG_SRCDIR([config.h.in])
+ AC_CONFIG_HEADER([config.h])
+@@ -79,6 +83,7 @@
+ AC_SUBST(READLINELIB)
+ AC_CONFIG_FILES([Makefile
++               hunspell.pc
+                  man/Makefile
+                  man/hu/Makefile
+                  intl/Makefile
+diff -urNad hunspell-1.1.4.orig/hunspell.pc.in hunspell-1.1.4/hunspell.pc.in
+--- hunspell-1.1.4.orig/hunspell.pc.in 1970-01-01 01:00:00.000000000 +0100
++++ hunspell-1.1.4/hunspell.pc.in      2007-01-18 14:50:45.000000000 +0100
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=${prefix}
++libdir=${prefix}/lib
++includedir=${prefix}/include
++
++Name: hunspell
++Description: Hunpell spellchecking library
++Version: @VERSION@
++Libs: -L${libdir} -lhunspell-@HUNSPELL_VERSION_MAJOR@.@HUNSPELL_VERSION_MINOR@
++Cflags: -I${includedir}/hunspell
+
+                
This page took 0.343938 seconds and 4 git commands to generate.