summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2003-10-26 20:00:28 +0000
committerMarinus Schraal <foser@gentoo.org>2003-10-26 20:00:28 +0000
commit968ea8aae4d2c35c01c288b2e19dfeb2218223a3 (patch)
tree1e58b8b559d57c3f9812dbaa0d984836863fa827 /app-text/gnome-spell
parentadd enchant patch (diff)
downloadhistorical-968ea8aae4d2c35c01c288b2e19dfeb2218223a3.tar.gz
historical-968ea8aae4d2c35c01c288b2e19dfeb2218223a3.tar.bz2
historical-968ea8aae4d2c35c01c288b2e19dfeb2218223a3.zip
add enchant patch
Diffstat (limited to 'app-text/gnome-spell')
-rw-r--r--app-text/gnome-spell/Manifest6
-rw-r--r--app-text/gnome-spell/files/digest-gnome-spell-1.0.5-r11
-rw-r--r--app-text/gnome-spell/files/gnome-spell-1.0.5-enchant.patch600
-rw-r--r--app-text/gnome-spell/gnome-spell-1.0.5-r1.ebuild40
4 files changed, 644 insertions, 3 deletions
diff --git a/app-text/gnome-spell/Manifest b/app-text/gnome-spell/Manifest
index 3d1c6e89102c..f5a1b173a83b 100644
--- a/app-text/gnome-spell/Manifest
+++ b/app-text/gnome-spell/Manifest
@@ -1,11 +1,11 @@
-MD5 066864a023c513746eda35e0495386b8 gnome-spell-1.0.5-r1.ebuild 883
+MD5 99d40c366b83c27b9be6169d8e43c1be gnome-spell-1.0.5-r1.ebuild 863
MD5 ab60bdde75843e7a3d1026cead2ac4d5 gnome-spell-0.5.ebuild 1110
MD5 cd251ce3e6c0934d00b212b54df0bbe3 gnome-spell-1.0.5.ebuild 914
MD5 388fe21c399faa3583baae176b2a64cf gnome-spell-1.0.4.ebuild 909
-MD5 a8e14d6ca2bf4ef8fab8703f7d1ab899 ChangeLog 4901
+MD5 6fa348bbf0a6e2d17dd56df9beb67358 ChangeLog 5045
MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158
MD5 d7a3ea11abf9781f4dbfca9c0b6cfecb files/digest-gnome-spell-1.0.4 70
MD5 959c92eeb724ca5380e81f09805df109 files/digest-gnome-spell-1.0.5 70
-MD5 a2f04eb1ad051e0c06e703901869afca files/gnomespell-enchant.diff 18757
+MD5 a2f04eb1ad051e0c06e703901869afca files/gnome-spell-1.0.5-enchant.patch 18757
MD5 959c92eeb724ca5380e81f09805df109 files/digest-gnome-spell-1.0.5-r1 70
MD5 c9d55e535778f7a2386f5bba1c2cfcf7 files/digest-gnome-spell-0.5 68
diff --git a/app-text/gnome-spell/files/digest-gnome-spell-1.0.5-r1 b/app-text/gnome-spell/files/digest-gnome-spell-1.0.5-r1
new file mode 100644
index 000000000000..6c195de55995
--- /dev/null
+++ b/app-text/gnome-spell/files/digest-gnome-spell-1.0.5-r1
@@ -0,0 +1 @@
+MD5 ba4dd33cb150b670756e456066bd7434 gnome-spell-1.0.5.tar.bz2 216628
diff --git a/app-text/gnome-spell/files/gnome-spell-1.0.5-enchant.patch b/app-text/gnome-spell/files/gnome-spell-1.0.5-enchant.patch
new file mode 100644
index 000000000000..be8345b1b728
--- /dev/null
+++ b/app-text/gnome-spell/files/gnome-spell-1.0.5-enchant.patch
@@ -0,0 +1,600 @@
+? autom4te-2.53.cache
+? gnomespell-enchant.diff
+? gnomespell-enchant.diff.gz
+? intltool-extract
+? intltool-extract.in
+? intltool-merge
+? intltool-merge.in
+? intltool-update
+? intltool-update.in
+? gnome-spell/GNOME_Spell.server
+? gnome-spell/GNOME_Spell.server.in
+Index: ChangeLog
+===================================================================
+RCS file: /cvs/gnome/gnome-spell/ChangeLog,v
+retrieving revision 1.44
+diff -u -r1.44 ChangeLog
+--- ChangeLog 16 May 2003 02:45:38 -0000 1.44
++++ ChangeLog 31 Aug 2003 00:17:22 -0000
+@@ -1,3 +1,8 @@
++2003-08-26 Dom Lachowicz <cinamod@hotmail.com>
++
++ * configure.in: Use Enchant instead of Aspell
++ * gnome-spell/dictionary.c: ditto
++
+ 2003-05-16 Danilo Šegan <dsegan@gmx.net>
+
+ * configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS.
+Index: README
+===================================================================
+RCS file: /cvs/gnome/gnome-spell/README,v
+retrieving revision 1.7
+diff -u -r1.7 README
+--- README 8 Oct 2001 18:57:45 -0000 1.7
++++ README 31 Aug 2003 00:17:23 -0000
+@@ -3,7 +3,7 @@
+
+ Gnome Spell is GNOME/Bonobo component for spell checking. In current 0.1 version
+ it contains GNOME::Spell::Dictionary object, which provides spell checking dictionary
+-(see Spell.idl for exact API definition). It's based on pspell package, which is required
++(see Spell.idl for exact API definition). It's based on Enchant package, which is required
+ to build gnome-spell.
+
+ Dictionary object could be used for live spell checking. Look in test-spell.c or
+@@ -12,19 +12,18 @@
+ In future it will be expanded by implementation of GNOME::Spell::Checker object (see
+ also Spell.idl) and also by spell checking dialog control with appropriate interface.
+
+-Pspell build
++Enchant build
+ ------------
+
+-From my experience with pspell I recommend you to build pspell/aspell this way:
++From my experience with Enchant I recommend you to build it this way:
+
+- 1) build and install pspell
+- 2) build and install aspell
++ 1) build and install Pspell, Aspell
++ 2) build and install Enchant
+ 4) build and install GNOME Spell
+
+-You could get Pspell and Aspell from:
++You could get Enchant from:
+
+- http://pspell.sourceforge.net/
+- http://aspell.sourceforge.net/
++ http://www.abisource.com/enchant/
+
+ End
+ ---
+Index: configure.in
+===================================================================
+RCS file: /cvs/gnome/gnome-spell/configure.in,v
+retrieving revision 1.67
+diff -u -r1.67 configure.in
+--- configure.in 30 Jul 2003 15:45:53 -0000 1.67
++++ configure.in 31 Aug 2003 00:17:23 -0000
+@@ -46,34 +46,6 @@
+ AC_SUBST(API_VERSION)
+
+ dnl
+-dnl aspell
+-dnl
+-
+-AC_ARG_WITH(aspell-prefix, [ --with-aspell-prefix=DIR
+- specify under which prefix aspell is installed.], with_aspell_prefix="$withval", )
+-
+-if test "x$with_aspell_prefix" != "x"; then
+- saved_LDFLAGS=$LDFLAGS
+- LDFLAGS="-L$with_aspell_prefix/lib "$LDFLAGS
+- ASPELL_INC="-I$with_aspell_prefix/include"
+- ASPELL_LIBS="-L$with_aspell_prefix/lib -laspell"
+- ASPELL_DATA="$with_aspell_prefix/lib/aspell"
+-else
+- LDFLAGS="-L`aspell config prefix`/lib "$LDFLAGS
+- ASPELL_INC="-I`aspell config prefix`/include"
+- ASPELL_LIBS="-L`aspell config prefix`/lib -laspell"
+- ASPELL_DICT="`aspell config dict-dir`"
+-fi
+-AC_CHECK_LIB(aspell,new_aspell_config,,AC_MSG_ERROR([gnome-spell cannot be built without aspell library]),)
+-if test "x$with_aspell_prefix" != "x"; then
+- LDFLAGS=$saved_LDFLAGS
+-fi
+-
+-AC_SUBST(ASPELL_DICT)
+-AC_SUBST(ASPELL_INC)
+-AC_SUBST(ASPELL_LIBS)
+-
+-dnl
+ dnl flags
+ dnl
+
+@@ -82,7 +54,7 @@
+ AC_SUBST(CPPFLAGS)
+ AC_SUBST(LDFLAGS)
+
+-GNOME_SPELL_MODULES="libgnomeui-2.0 >= 1.112.1 libbonoboui-2.0 >= 1.112.1 libglade-2.0 >= 1.99.9"
++GNOME_SPELL_MODULES="libgnomeui-2.0 >= 1.112.1 libbonoboui-2.0 >= 1.112.1 libglade-2.0 >= 1.99.9 enchant >= 0.4.0"
+ PKG_CHECK_MODULES(GNOME_SPELL, $GNOME_SPELL_MODULES)
+ AC_SUBST(GNOME_SPELL_CFLAGS)
+ AC_SUBST(GNOME_SPELL_LIBS)
+Index: gnome-spell.spec.in
+===================================================================
+RCS file: /cvs/gnome/gnome-spell/gnome-spell.spec.in,v
+retrieving revision 1.1
+diff -u -r1.1 gnome-spell.spec.in
+--- gnome-spell.spec.in 1 Nov 2001 22:19:22 -0000 1.1
++++ gnome-spell.spec.in 31 Aug 2003 00:17:23 -0000
+@@ -7,12 +7,10 @@
+ Source: ftp://ftp.gnome.org/pub/GNOME/unstable/sources/%{name}/%{name}-%{version}.tar.gz
+ Summary: The spelling component for bonobo
+ Group: System Environment/Libraries
+-Requires: aspell >= 0.28
+-Requires: pspell >= 0.12
++Requires: enchant >= 0.3.0
+ Requires: bonobo >= 0.28
+ Requires: gal >= 0.7.99.5
+-BuildRequires: aspell-devel >= 0.28
+-BuildRequires: pspell-devel >= 0.12
++BuildRequires: enchant-devel >= 0.3.0
+ BuildRequires: bonobo-devel >= 0.28
+ BuildRequires: libglade-devel
+ BuildRequires: gal-devel >= 0.7.99.5
+Index: gnome-spell/Makefile.am
+===================================================================
+RCS file: /cvs/gnome/gnome-spell/gnome-spell/Makefile.am,v
+retrieving revision 1.28
+diff -u -r1.28 Makefile.am
+--- gnome-spell/Makefile.am 8 May 2003 15:39:40 -0000 1.28
++++ gnome-spell/Makefile.am 31 Aug 2003 00:17:23 -0000
+@@ -7,13 +7,11 @@
+
+ INCLUDES = \
+ -I$(srcdir) \
+- $(ASPELL_INC) \
+ -DGNOMEDATADIR=\""$(datadir)"\" \
+ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
+ -DGLADE_DATADIR=\"$(gladedir)\" \
+ -DPLUGIN_DIR=\""$(PLUGIN_DIR)"\" \
+ -DGTK_DISABLE_DEPRECATED=1 \
+- -DASPELL_DICT=\""$(ASPELL_DICT)"\" \
+ $(GNOME_SPELL_CFLAGS) \
+ $(END)
+
+@@ -51,7 +49,6 @@
+ libgnome_spell_component_la_LDFLAGS = -release $(API_VERSION)
+ libgnome_spell_component_la_LIBADD = \
+ libgnome-spell-idl.la \
+- $(ASPELL_LIBS) \
+ $(GNOME_SPELL_LIBS) \
+ $(END)
+
+@@ -65,7 +62,6 @@
+
+ test_gnome_spell_component_LDADD = \
+ libgnome-spell-idl.la \
+- $(ASPELL_LIBS) \
+ $(GNOME_SPELL_LIBS) \
+ $(END)
+
+Index: gnome-spell/dictionary.c
+===================================================================
+RCS file: /cvs/gnome/gnome-spell/gnome-spell/dictionary.c,v
+retrieving revision 1.34
+diff -u -r1.34 dictionary.c
+--- gnome-spell/dictionary.c 11 Jun 2003 17:15:22 -0000 1.34
++++ gnome-spell/dictionary.c 31 Aug 2003 00:17:24 -0000
+@@ -55,13 +55,30 @@
+ return (SpellEngine *) language ? g_hash_table_lookup (dict->engines_ht, language) : NULL;
+ }
+
++/* replace any 1 hyphen with an underscore. converts en-US to en_US */
++static gchar *
++normalize_language (const gchar * language)
++{
++ gchar * dup, * hyphen;
++
++ dup = g_strdup (language);
++ hyphen = strchr (dup, '-');
++ if (hyphen)
++ *hyphen = '_';
++ return dup;
++}
++
+ static void
+ raise_error (CORBA_Environment * ev, const gchar *s)
+ {
+ GNOME_Spell_Dictionary_Error *exception;
+ exception = GNOME_Spell_Dictionary_Error__alloc ();
+-
+- exception->error = CORBA_string_dup (s);
++
++ if (s != NULL)
++ exception->error = CORBA_string_dup (s);
++ else
++ exception->error = _("Unknown error");
++
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+ ex_GNOME_Spell_Dictionary_Error,
+ exception);
+@@ -76,6 +93,7 @@
+ dict->engines = NULL;
+ dict->languages = g_hash_table_new (g_str_hash, g_str_equal);
+ dict->engines_ht = g_hash_table_new (NULL, NULL);
++ dict->broker = enchant_broker_init ();
+ }
+
+ static void
+@@ -88,6 +106,7 @@
+ dictionary->languages = NULL;
+ g_hash_table_destroy (dictionary->engines_ht);
+ dictionary->engines_ht = NULL;
++ enchant_broker_free (dictionary->broker);
+
+ G_OBJECT_CLASS (dictionary_parent_class)->finalize (object);
+ }
+@@ -98,9 +117,7 @@
+ SpellEngine *se;
+
+ se = g_new0 (SpellEngine, 1);
+- se->config = new_aspell_config ();
+- aspell_config_replace (se->config, "language-tag", language);
+- aspell_config_replace (se->config, "encoding", "utf-8");
++ se->lang = normalize_language (language);
+ se->changed = TRUE;
+
+ return se;
+@@ -129,9 +146,9 @@
+ SpellEngine *se = dict->engines->data;
+
+ if (se->speller)
+- delete_aspell_speller (se->speller);
+- if (se->config)
+- delete_aspell_config (se->config);
++ enchant_broker_free_dict (dict->broker, se->speller);
++ if (se->lang)
++ g_free (se->lang);
+ g_free (se);
+ dict->engines = g_slist_remove (dict->engines, se);
+ }
+@@ -143,13 +160,14 @@
+ dict->changed = TRUE;
+ }
+
+-#define KNOWN_LANGUAGES 25
++#define KNOWN_LANGUAGES 38
+ static gchar *known_languages [KNOWN_LANGUAGES*2 + 1] = {
+ "br", N_("Breton"),
+ "ca", N_("Catalan"),
+ "cs", N_("Czech"),
+ "da", N_("Danish"),
+ "de-DE", N_("German (Germany)"),
++ "de-AT", N_("German (Austria)"),
+ "de-CH", N_("German (Swiss)"),
+ "el", N_("Greek"),
+ "en-US", N_("English (American)"),
+@@ -157,49 +175,76 @@
+ "en-CA", N_("English (Canadian)"),
+ "eo", N_("Esperanto"),
+ "es", N_("Spanish"),
++ "fi", N_("Finnish"),
+ "fo", N_("Faroese"),
+ "fr-FR", N_("French (France)"),
+ "fr-CH", N_("French (Swiss)"),
++ "hu", N_("Hungarian"),
++ "ga", N_("Irish"),
++ "gl", N_("Galician"),
++ "he", N_("Hebrew"),
+ "it", N_("Italian"),
++ "la", N_("Latin"),
++ "lt", N_("Lithuanian"),
++ "nb-NO", N_("Norwegian (Bokmal)"),
+ "nl", N_("Dutch"),
++ "nn-NO", N_("Norwegian (Nyorsk)"),
+ "no", N_("Norwegian"),
+ "pl", N_("Polish"),
+ "pt-PT", N_("Portuguese (Portugal)"),
+ "pt-BR", N_("Portuguese (Brazilian)"),
+ "ru", N_("Russian"),
++ "sc", N_("Sardinian"),
+ "sk", N_("Slovak"),
++ "sl", N_("Slovak"),
+ "sv", N_("Swedish"),
+ "uk", N_("Ukrainian"),
++ "yi", N_("Yiddish"),
+ NULL
+ };
+
++static void
++dict_describe (const char * const lang_tag,
++ const char * const provider_name,
++ const char * const provider_desc,
++ const char * const provider_file,
++ void * user_data)
++{
++ printf ("%s | %s | %s | %s\n", lang_tag, provider_name, provider_desc, provider_file);
++}
++
+ static GSList *
+ get_languages_real (gint *ln)
+ {
++ EnchantBroker * broker;
++ gchar * lang;
++
+ GSList *langs;
+- AspellCanHaveError *err;
+- AspellConfig *config;
+- AspellSpeller *speller;
+ gint i;
+
+ DICT_DEBUG (printf ("get_languages_real\n"));
+
+ langs = NULL;
+ *ln = 0;
++
++ broker = enchant_broker_init ();
++
+ for (i=0; known_languages [i]; i++) {
+- config = new_aspell_config ();
+- aspell_config_replace (config, "language-tag", known_languages [i]);
++ lang = normalize_language (known_languages [i]);
+ i++;
+- err = new_aspell_speller (config);
+- if (aspell_error_number (err) == 0) {
+- speller = to_aspell_speller (err);
+- DICT_DEBUG (printf ("Language: %s\n", known_languages [i]));
+- delete_aspell_speller (speller);
++
++ if (enchant_broker_dict_exists (broker, lang)) {
++ DICT_DEBUG (enchant_dict_describe (dict, dict_describe, NULL));
++ DICT_DEBUG (printf ("Language: %s (%s)\n", known_languages [i], lang));
+ langs = g_slist_prepend (langs, GINT_TO_POINTER (i - 1));
+ (*ln) ++;
+ }
++
++ g_free (lang);
+ }
+
++ enchant_broker_free (broker);
++
+ return langs;
+ }
+
+@@ -210,8 +255,6 @@
+ GSList *langs = NULL;
+ gint i, lang_num;
+
+- /* printf ("get_languages_load\n"); */
+-
+ str = g_string_new (NULL);
+ *ln = gconf_client_get_int (gc, GNOME_SPELL_GCONF_DIR "/languages", NULL);
+ for (i = 0; i < *ln; i++) {
+@@ -229,7 +272,6 @@
+ GSList *langs, *l;
+ GConfClient *gc;
+ time_t mtime;
+- struct stat buf;
+ gint i, kl;
+
+ gc = gconf_client_get_default ();
+@@ -237,7 +279,7 @@
+ mtime = gconf_client_get_int (gc, GNOME_SPELL_GCONF_DIR "/mtime", NULL);
+ kl = gconf_client_get_int (gc, GNOME_SPELL_GCONF_DIR "/known_languages", NULL);
+
+- if (stat (ASPELL_DICT, &buf) || buf.st_mtime != mtime || kl != KNOWN_LANGUAGES) {
++ if (kl != KNOWN_LANGUAGES) { /* TODO: find a way to get this list generation to happen less often */
+ GString *str;
+ langs = get_languages_real (ln);
+
+@@ -248,7 +290,7 @@
+ gconf_client_set_int (gc, str->str, GPOINTER_TO_INT (l->data), NULL);
+ l = l->next;
+ }
+- gconf_client_set_int (gc, GNOME_SPELL_GCONF_DIR "/mtime", buf.st_mtime, NULL);
++ gconf_client_set_int (gc, GNOME_SPELL_GCONF_DIR "/mtime", time (NULL), NULL);
+ gconf_client_set_int (gc, GNOME_SPELL_GCONF_DIR "/known_languages", KNOWN_LANGUAGES, NULL);
+ g_string_free (str, TRUE);
+ gnome_config_sync ();
+@@ -333,22 +375,18 @@
+ }
+
+ static void
+-update_engine (SpellEngine *se, CORBA_Environment * ev)
++update_engine (GNOMESpellDictionary *dict, SpellEngine *se, CORBA_Environment * ev)
+ {
+- AspellCanHaveError *err;
+-
+- DICT_DEBUG (printf ("Dictionary: creating new aspell speller\n"));
++ DICT_DEBUG (printf ("Dictionary: creating new enchant speller\n"));
+
+ if (se->changed) {
+ if (se->speller)
+- delete_aspell_speller (se->speller);
+- err = new_aspell_speller (se->config);
+- if (aspell_error_number (err) != 0) {
+- g_warning ("aspell error: %s\n", aspell_error_message (err));
+- se->speller = NULL;
+- raise_error (ev, aspell_error_message (err));
++ enchant_broker_free_dict (dict->broker, se->speller);
++ se->speller = enchant_broker_request_dict (dict->broker, se->lang);
++ if (se->speller == NULL) {
++ g_warning ("enchant error: %s\n", se->lang);
++ raise_error (ev, enchant_broker_get_error (dict->broker));
+ } else {
+- se->speller = to_aspell_speller (err);
+ se->changed = FALSE;
+ }
+ }
+@@ -363,7 +401,7 @@
+ GSList *l;
+
+ for (l = dict->engines; l; l = l->next) {
+- update_engine ((SpellEngine *) l->data, ev);
++ update_engine (dict, (SpellEngine *) l->data, ev);
+ }
+
+ dict->changed = FALSE;
+@@ -373,20 +411,11 @@
+ static CORBA_boolean
+ engine_check_word (SpellEngine *se, const gchar *word, CORBA_Environment *ev)
+ {
+- CORBA_boolean result = CORBA_TRUE;
+- gint aspell_result;
+-
+ g_return_val_if_fail (se->speller, CORBA_TRUE);
+
+- aspell_result = aspell_speller_check (se->speller, word, strlen (word));
+- if (aspell_result == 0)
+- result = CORBA_FALSE;
+- if (aspell_result == -1) {
+- g_warning ("aspell error: %s\n", aspell_speller_error_message (se->speller));
+- raise_error (ev, aspell_speller_error_message (se->speller));
+- }
+-
+- return result;
++ if (enchant_dict_check (se->speller, word, strlen (word)) == 0)
++ return CORBA_TRUE;
++ return CORBA_FALSE;
+ }
+
+ static CORBA_boolean
+@@ -431,7 +460,7 @@
+ DICT_DEBUG (printf ("Dictionary add_word_to_session: %s\n", word));
+ for (l = dict->engines; l; l = l->next) {
+ if (((SpellEngine *) l->data)->speller)
+- aspell_speller_add_to_session (((SpellEngine *) l->data)->speller, word, strlen (word));
++ enchant_dict_add_to_session (((SpellEngine *) l->data)->speller, word, strlen (word));
+ }
+ }
+
+@@ -449,8 +478,7 @@
+ se = (SpellEngine *) g_hash_table_lookup (dict->languages, language);
+
+ if (se && se->speller) {
+- aspell_speller_add_to_personal (se->speller, word, strlen (word));
+- aspell_speller_save_all_word_lists (se->speller);
++ enchant_dict_add_to_personal (se->speller, word, strlen (word));
+ DICT_DEBUG (printf ("Added and saved.\n"));
+ }
+ }
+@@ -470,9 +498,8 @@
+ se = (SpellEngine *) g_hash_table_lookup (dict->languages, language);
+
+ if (se && se->speller) {
+- aspell_speller_store_replacement (se->speller, word, strlen (word),
+- replacement, strlen (replacement));
+- aspell_speller_save_all_word_lists (se->speller);
++ enchant_dict_store_replacement (se->speller, word, strlen (word),
++ replacement, strlen (replacement));
+ DICT_DEBUG (printf ("Set and saved.\n"));
+ }
+ }
+@@ -482,26 +509,33 @@
+ const CORBA_char *word, CORBA_Environment *ev)
+ {
+ GNOMESpellDictionary *dict = GNOME_SPELL_DICTIONARY (bonobo_object_from_servant (servant));
+- const AspellWordList *suggestions;
+- AspellStringEnumeration *elements;
+ GNOME_Spell_StringSeq *seq = NULL;
+ GSList *l, *suggestion_list = NULL;
+ gint i, len, pos;
+
++ char ** suggestions;
++ size_t n_suggs, total_suggs;
++
+ g_return_val_if_fail (word, NULL);
+
+ DICT_DEBUG (printf ("Dictionary correction: %s\n", word));
+ update_engines (dict, ev);
+
+ len = 0;
++ total_suggs = 0;
+ for (l = dict->engines; l; l = l->next) {
+ SpellEngine *se = (SpellEngine *) l->data;
+
+ if (se->speller) {
+- suggestions = aspell_speller_suggest (se->speller, word, strlen (word));
+- suggestion_list = g_slist_prepend (suggestion_list, (gpointer) suggestions);
+- len += 2*aspell_word_list_size (suggestions);
+- suggestion_list = g_slist_prepend (suggestion_list, engine_to_language (dict, se));
++ suggestions = enchant_dict_suggest (se->speller, word, strlen (word), &n_suggs);
++ if (suggestions && n_suggs) {
++ total_suggs += n_suggs;
++ suggestion_list = g_slist_prepend (suggestion_list, (gpointer) suggestions);
++ suggestion_list = g_slist_prepend (suggestion_list, engine_to_language (dict, se));
++ suggestion_list = g_slist_prepend (suggestion_list, GINT_TO_POINTER (n_suggs));
++ suggestion_list = g_slist_prepend (suggestion_list, (gpointer) se->speller);
++ len += 2*n_suggs;
++ }
+ }
+ }
+
+@@ -515,20 +549,25 @@
+
+ pos = 0;
+ for (l = suggestion_list; l; l = l->next) {
+- gint list_len;
+ gchar *language;
++ EnchantDict * en_dict;
++
++ en_dict = (EnchantDict *)l->data;
++ l = l->next;
++
++ n_suggs = GPOINTER_TO_INT (l->data);
++ l = l->next;
+
+ language = (gchar *) l->data;
+ l = l->next;
+- suggestions = (const AspellWordList *) l->data;
+- elements = aspell_word_list_elements (suggestions);
+- list_len = aspell_word_list_size (suggestions);
+- for (i = 0; i < list_len; i ++, pos ++) {
+- seq->_buffer [pos] = CORBA_string_dup (aspell_string_enumeration_next (elements));
++ suggestions = (char **) l->data;
++
++ for (i = 0; i < n_suggs; i ++, pos ++) {
++ seq->_buffer [pos] = CORBA_string_dup (suggestions[i]);
+ pos ++;
+ seq->_buffer [pos] = CORBA_string_dup (language);
+ }
+- delete_aspell_string_enumeration (elements);
++ enchant_dict_free_suggestions (en_dict, suggestions);
+ }
+ CORBA_sequence_set_release (seq, CORBA_TRUE);
+ g_slist_free (suggestion_list);
+Index: gnome-spell/dictionary.h
+===================================================================
+RCS file: /cvs/gnome/gnome-spell/gnome-spell/dictionary.h,v
+retrieving revision 1.7
+diff -u -r1.7 dictionary.h
+--- gnome-spell/dictionary.h 20 Mar 2003 14:11:39 -0000 1.7
++++ gnome-spell/dictionary.h 31 Aug 2003 00:17:24 -0000
+@@ -26,7 +26,7 @@
+ G_BEGIN_DECLS
+
+ #include <bonobo/bonobo-object.h>
+-#include <aspell.h>
++#include <enchant.h>
+
+ #define GNOME_SPELL_DICTIONARY_TYPE (gnome_spell_dictionary_get_type ())
+ #define GNOME_SPELL_DICTIONARY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+@@ -37,8 +37,8 @@
+ #define IS_GNOME_SPELL_DICTIONARY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_SPELL_DICTIONARY_TYPE))
+
+ typedef struct {
+- AspellConfig *config;
+- AspellSpeller *speller;
++ EnchantDict *speller;
++ gchar *lang;
+ gboolean changed;
+ } SpellEngine;
+
+@@ -49,6 +49,8 @@
+ GSList *engines;
+ GHashTable *languages;
+ GHashTable *engines_ht;
++
++ EnchantBroker * broker;
+ } GNOMESpellDictionary;
+
+ typedef struct {
diff --git a/app-text/gnome-spell/gnome-spell-1.0.5-r1.ebuild b/app-text/gnome-spell/gnome-spell-1.0.5-r1.ebuild
new file mode 100644
index 000000000000..1774cebd89c0
--- /dev/null
+++ b/app-text/gnome-spell/gnome-spell-1.0.5-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/gnome-spell/gnome-spell-1.0.5-r1.ebuild,v 1.1 2003/10/26 20:00:22 foser Exp $
+
+IUSE=""
+
+inherit gnome.org gnome2 libtool
+
+DESCRIPTION="Gnome spellchecking component"
+HOMEPAGE="http://www.gnome.org/"
+
+KEYWORDS="~x86 ~sparc ~ppc ~alpha ~hppa"
+SLOT="1"
+LICENSE="GPL-2"
+
+RDEPEND=">=gnome-base/libgnomeui-2.2
+ >=gnome-base/libbonoboui-2.0
+ >=gnome-base/libglade-2.0
+ >=gnome-base/libbonobo-2.0
+ >=gnome-base/ORBit2-2.0
+ >=app-text/enchant-1"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ sys-devel/gettext
+ >=dev-lang/perl-5.6.0"
+
+DOCS="AUTHORS COPYING ChangeLog NEWS README"
+
+src_unpack() {
+
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-enchant.patch
+
+ WANT_AUTOCONF_2_5=1 autoconf || die
+ automake || die
+
+}